diff --git a/BackupDr/metadata/V1/Backupdr.php b/BackupDr/metadata/V1/Backupdr.php
index ad9d53d47951..fde6b0d8cfbd 100644
Binary files a/BackupDr/metadata/V1/Backupdr.php and b/BackupDr/metadata/V1/Backupdr.php differ
diff --git a/BackupDr/metadata/V1/Backupplan.php b/BackupDr/metadata/V1/Backupplan.php
new file mode 100644
index 000000000000..6bfd440367ce
Binary files /dev/null and b/BackupDr/metadata/V1/Backupplan.php differ
diff --git a/BackupDr/metadata/V1/Backupplanassociation.php b/BackupDr/metadata/V1/Backupplanassociation.php
new file mode 100644
index 000000000000..f2c6692f67f7
Binary files /dev/null and b/BackupDr/metadata/V1/Backupplanassociation.php differ
diff --git a/BackupDr/metadata/V1/Backupvault.php b/BackupDr/metadata/V1/Backupvault.php
new file mode 100644
index 000000000000..23fe82324104
Binary files /dev/null and b/BackupDr/metadata/V1/Backupvault.php differ
diff --git a/BackupDr/metadata/V1/BackupvaultBa.php b/BackupDr/metadata/V1/BackupvaultBa.php
new file mode 100644
index 000000000000..06aa2a0bd464
Binary files /dev/null and b/BackupDr/metadata/V1/BackupvaultBa.php differ
diff --git a/BackupDr/metadata/V1/BackupvaultGce.php b/BackupDr/metadata/V1/BackupvaultGce.php
new file mode 100644
index 000000000000..6a830e43e0cc
Binary files /dev/null and b/BackupDr/metadata/V1/BackupvaultGce.php differ
diff --git a/BackupDr/samples/V1/BackupDRClient/create_backup_plan.php b/BackupDr/samples/V1/BackupDRClient/create_backup_plan.php
new file mode 100644
index 000000000000..ee29ae4ff1c5
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/create_backup_plan.php
@@ -0,0 +1,174 @@
+setStartHourOfDay($backupPlanBackupRulesStandardScheduleBackupWindowStartHourOfDay)
+ ->setEndHourOfDay($backupPlanBackupRulesStandardScheduleBackupWindowEndHourOfDay);
+ $backupPlanBackupRulesStandardSchedule = (new StandardSchedule())
+ ->setRecurrenceType($backupPlanBackupRulesStandardScheduleRecurrenceType)
+ ->setBackupWindow($backupPlanBackupRulesStandardScheduleBackupWindow)
+ ->setTimeZone($backupPlanBackupRulesStandardScheduleTimeZone);
+ $backupRule = (new BackupRule())
+ ->setRuleId($backupPlanBackupRulesRuleId)
+ ->setBackupRetentionDays($backupPlanBackupRulesBackupRetentionDays)
+ ->setStandardSchedule($backupPlanBackupRulesStandardSchedule);
+ $backupPlanBackupRules = [$backupRule,];
+ $backupPlan = (new BackupPlan())
+ ->setBackupRules($backupPlanBackupRules)
+ ->setResourceType($backupPlanResourceType)
+ ->setBackupVault($formattedBackupPlanBackupVault);
+ $request = (new CreateBackupPlanRequest())
+ ->setParent($formattedParent)
+ ->setBackupPlanId($backupPlanId)
+ ->setBackupPlan($backupPlan);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->createBackupPlan($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var BackupPlan $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::locationName('[PROJECT]', '[LOCATION]');
+ $backupPlanId = '[BACKUP_PLAN_ID]';
+ $backupPlanBackupRulesRuleId = '[RULE_ID]';
+ $backupPlanBackupRulesBackupRetentionDays = 0;
+ $backupPlanBackupRulesStandardScheduleRecurrenceType = RecurrenceType::RECURRENCE_TYPE_UNSPECIFIED;
+ $backupPlanBackupRulesStandardScheduleBackupWindowStartHourOfDay = 0;
+ $backupPlanBackupRulesStandardScheduleBackupWindowEndHourOfDay = 0;
+ $backupPlanBackupRulesStandardScheduleTimeZone = '[TIME_ZONE]';
+ $backupPlanResourceType = '[RESOURCE_TYPE]';
+ $formattedBackupPlanBackupVault = BackupDRClient::backupVaultName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]'
+ );
+
+ create_backup_plan_sample(
+ $formattedParent,
+ $backupPlanId,
+ $backupPlanBackupRulesRuleId,
+ $backupPlanBackupRulesBackupRetentionDays,
+ $backupPlanBackupRulesStandardScheduleRecurrenceType,
+ $backupPlanBackupRulesStandardScheduleBackupWindowStartHourOfDay,
+ $backupPlanBackupRulesStandardScheduleBackupWindowEndHourOfDay,
+ $backupPlanBackupRulesStandardScheduleTimeZone,
+ $backupPlanResourceType,
+ $formattedBackupPlanBackupVault
+ );
+}
+// [END backupdr_v1_generated_BackupDR_CreateBackupPlan_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/create_backup_plan_association.php b/BackupDr/samples/V1/BackupDRClient/create_backup_plan_association.php
new file mode 100644
index 000000000000..16cba9b49c8c
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/create_backup_plan_association.php
@@ -0,0 +1,114 @@
+setResource($backupPlanAssociationResource)
+ ->setBackupPlan($formattedBackupPlanAssociationBackupPlan);
+ $request = (new CreateBackupPlanAssociationRequest())
+ ->setParent($formattedParent)
+ ->setBackupPlanAssociationId($backupPlanAssociationId)
+ ->setBackupPlanAssociation($backupPlanAssociation);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->createBackupPlanAssociation($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var BackupPlanAssociation $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::locationName('[PROJECT]', '[LOCATION]');
+ $backupPlanAssociationId = '[BACKUP_PLAN_ASSOCIATION_ID]';
+ $backupPlanAssociationResource = '[RESOURCE]';
+ $formattedBackupPlanAssociationBackupPlan = BackupDRClient::backupPlanName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN]'
+ );
+
+ create_backup_plan_association_sample(
+ $formattedParent,
+ $backupPlanAssociationId,
+ $backupPlanAssociationResource,
+ $formattedBackupPlanAssociationBackupPlan
+ );
+}
+// [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/create_backup_vault.php b/BackupDr/samples/V1/BackupDRClient/create_backup_vault.php
new file mode 100644
index 000000000000..0eb8a39cdfc9
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/create_backup_vault.php
@@ -0,0 +1,93 @@
+setBackupMinimumEnforcedRetentionDuration($backupVaultBackupMinimumEnforcedRetentionDuration);
+ $request = (new CreateBackupVaultRequest())
+ ->setParent($formattedParent)
+ ->setBackupVaultId($backupVaultId)
+ ->setBackupVault($backupVault);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->createBackupVault($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var BackupVault $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::locationName('[PROJECT]', '[LOCATION]');
+ $backupVaultId = '[BACKUP_VAULT_ID]';
+
+ create_backup_vault_sample($formattedParent, $backupVaultId);
+}
+// [END backupdr_v1_generated_BackupDR_CreateBackupVault_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/create_management_server.php b/BackupDr/samples/V1/BackupDRClient/create_management_server.php
index 363df2a44dd8..c453145930c7 100644
--- a/BackupDr/samples/V1/BackupDRClient/create_management_server.php
+++ b/BackupDr/samples/V1/BackupDRClient/create_management_server.php
@@ -35,8 +35,8 @@
* Creates a new ManagementServer in a given project and location.
*
* @param string $formattedParent The management server project and location in the format
- * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR
- * locations map to GCP regions, for example **us-central1**. Please see
+ * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
+ * locations map to Google Cloud regions, for example **us-central1**. Please see
* {@see BackupDRClient::locationName()} for help formatting this field.
* @param string $managementServerId The name of the management server to create. The name must be
* unique for the specified project and location.
diff --git a/BackupDr/samples/V1/BackupDRClient/delete_backup.php b/BackupDr/samples/V1/BackupDRClient/delete_backup.php
new file mode 100644
index 000000000000..e57d2bbfa7fe
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/delete_backup.php
@@ -0,0 +1,89 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->deleteBackup($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var Backup $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+
+ delete_backup_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_DeleteBackup_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/delete_backup_plan.php b/BackupDr/samples/V1/BackupDRClient/delete_backup_plan.php
new file mode 100644
index 000000000000..ceefc320aa66
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/delete_backup_plan.php
@@ -0,0 +1,82 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->deleteBackupPlan($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ printf('Operation completed successfully.' . PHP_EOL);
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]');
+
+ delete_backup_plan_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/delete_backup_plan_association.php b/BackupDr/samples/V1/BackupDRClient/delete_backup_plan_association.php
new file mode 100644
index 000000000000..8ebdabee84f5
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/delete_backup_plan_association.php
@@ -0,0 +1,85 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->deleteBackupPlanAssociation($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ printf('Operation completed successfully.' . PHP_EOL);
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+
+ delete_backup_plan_association_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/delete_backup_vault.php b/BackupDr/samples/V1/BackupDRClient/delete_backup_vault.php
new file mode 100644
index 000000000000..d1035e0287a1
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/delete_backup_vault.php
@@ -0,0 +1,80 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->deleteBackupVault($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ printf('Operation completed successfully.' . PHP_EOL);
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+
+ delete_backup_vault_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_DeleteBackupVault_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/fetch_usable_backup_vaults.php b/BackupDr/samples/V1/BackupDRClient/fetch_usable_backup_vaults.php
new file mode 100644
index 000000000000..ca3baa61001d
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/fetch_usable_backup_vaults.php
@@ -0,0 +1,83 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $backupDRClient->fetchUsableBackupVaults($request);
+
+ /** @var BackupVault $element */
+ foreach ($response as $element) {
+ printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::locationName('[PROJECT]', '[LOCATION]');
+
+ fetch_usable_backup_vaults_sample($formattedParent);
+}
+// [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/get_backup.php b/BackupDr/samples/V1/BackupDRClient/get_backup.php
new file mode 100644
index 000000000000..d022b8e9926a
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/get_backup.php
@@ -0,0 +1,78 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var Backup $response */
+ $response = $backupDRClient->getBackup($request);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+
+ get_backup_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_GetBackup_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/get_backup_plan.php b/BackupDr/samples/V1/BackupDRClient/get_backup_plan.php
new file mode 100644
index 000000000000..bafab40279bf
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/get_backup_plan.php
@@ -0,0 +1,73 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var BackupPlan $response */
+ $response = $backupDRClient->getBackupPlan($request);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]');
+
+ get_backup_plan_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_GetBackupPlan_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/get_backup_plan_association.php b/BackupDr/samples/V1/BackupDRClient/get_backup_plan_association.php
new file mode 100644
index 000000000000..9eec0a558560
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/get_backup_plan_association.php
@@ -0,0 +1,76 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var BackupPlanAssociation $response */
+ $response = $backupDRClient->getBackupPlanAssociation($request);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+
+ get_backup_plan_association_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/get_backup_vault.php b/BackupDr/samples/V1/BackupDRClient/get_backup_vault.php
new file mode 100644
index 000000000000..7eda9342994a
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/get_backup_vault.php
@@ -0,0 +1,72 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var BackupVault $response */
+ $response = $backupDRClient->getBackupVault($request);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+
+ get_backup_vault_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_GetBackupVault_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/get_data_source.php b/BackupDr/samples/V1/BackupDRClient/get_data_source.php
new file mode 100644
index 000000000000..53f3211d7c1a
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/get_data_source.php
@@ -0,0 +1,77 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var DataSource $response */
+ $response = $backupDRClient->getDataSource($request);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::dataSourceName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]'
+ );
+
+ get_data_source_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_GetDataSource_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/get_management_server.php b/BackupDr/samples/V1/BackupDRClient/get_management_server.php
index c6ad450d29fa..f7fa6231f8c0 100644
--- a/BackupDr/samples/V1/BackupDRClient/get_management_server.php
+++ b/BackupDr/samples/V1/BackupDRClient/get_management_server.php
@@ -32,7 +32,7 @@
* Gets details of a single ManagementServer.
*
* @param string $formattedName Name of the management server resource name, in the format
- * `projects/{project_id}/locations/{location}/managementServers/{resource_name}`
+ * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
* Please see {@see BackupDRClient::managementServerName()} for help formatting this field.
*/
function get_management_server_sample(string $formattedName): void
diff --git a/BackupDr/samples/V1/BackupDRClient/list_backup_plan_associations.php b/BackupDr/samples/V1/BackupDRClient/list_backup_plan_associations.php
new file mode 100644
index 000000000000..8f286295c44b
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/list_backup_plan_associations.php
@@ -0,0 +1,81 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $backupDRClient->listBackupPlanAssociations($request);
+
+ /** @var BackupPlanAssociation $element */
+ foreach ($response as $element) {
+ printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::locationName('[PROJECT]', '[LOCATION]');
+
+ list_backup_plan_associations_sample($formattedParent);
+}
+// [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/list_backup_plans.php b/BackupDr/samples/V1/BackupDRClient/list_backup_plans.php
new file mode 100644
index 000000000000..7e5f8ceee6a8
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/list_backup_plans.php
@@ -0,0 +1,80 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $backupDRClient->listBackupPlans($request);
+
+ /** @var BackupPlan $element */
+ foreach ($response as $element) {
+ printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::locationName('[PROJECT]', '[LOCATION]');
+
+ list_backup_plans_sample($formattedParent);
+}
+// [END backupdr_v1_generated_BackupDR_ListBackupPlans_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/list_backup_vaults.php b/BackupDr/samples/V1/BackupDRClient/list_backup_vaults.php
new file mode 100644
index 000000000000..3ebc85f7ddef
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/list_backup_vaults.php
@@ -0,0 +1,81 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $backupDRClient->listBackupVaults($request);
+
+ /** @var BackupVault $element */
+ foreach ($response as $element) {
+ printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::locationName('[PROJECT]', '[LOCATION]');
+
+ list_backup_vaults_sample($formattedParent);
+}
+// [END backupdr_v1_generated_BackupDR_ListBackupVaults_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/list_backups.php b/BackupDr/samples/V1/BackupDRClient/list_backups.php
new file mode 100644
index 000000000000..def0a0a36513
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/list_backups.php
@@ -0,0 +1,86 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $backupDRClient->listBackups($request);
+
+ /** @var Backup $element */
+ foreach ($response as $element) {
+ printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::dataSourceName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]'
+ );
+
+ list_backups_sample($formattedParent);
+}
+// [END backupdr_v1_generated_BackupDR_ListBackups_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/list_data_sources.php b/BackupDr/samples/V1/BackupDRClient/list_data_sources.php
new file mode 100644
index 000000000000..833e650fed27
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/list_data_sources.php
@@ -0,0 +1,81 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $backupDRClient->listDataSources($request);
+
+ /** @var DataSource $element */
+ foreach ($response as $element) {
+ printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedParent = BackupDRClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+
+ list_data_sources_sample($formattedParent);
+}
+// [END backupdr_v1_generated_BackupDR_ListDataSources_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/list_management_servers.php b/BackupDr/samples/V1/BackupDRClient/list_management_servers.php
index 5d3871049b33..c1a2219808e9 100644
--- a/BackupDr/samples/V1/BackupDRClient/list_management_servers.php
+++ b/BackupDr/samples/V1/BackupDRClient/list_management_servers.php
@@ -33,10 +33,11 @@
* Lists ManagementServers in a given project and location.
*
* @param string $formattedParent The project and location for which to retrieve management servers
- * information, in the format `projects/{project_id}/locations/{location}`. In
- * Cloud BackupDR, locations map to GCP regions, for example **us-central1**.
- * To retrieve management servers for all locations, use "-" for the
- * `{location}` value. Please see
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * Cloud BackupDR, locations map to Google Cloud regions, for example
+ * **us-central1**. To retrieve management servers for all locations, use "-"
+ * for the
+ * '{location}' value. Please see
* {@see BackupDRClient::locationName()} for help formatting this field.
*/
function list_management_servers_sample(string $formattedParent): void
diff --git a/BackupDr/samples/V1/BackupDRClient/restore_backup.php b/BackupDr/samples/V1/BackupDRClient/restore_backup.php
new file mode 100644
index 000000000000..6a6199b2a611
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/restore_backup.php
@@ -0,0 +1,90 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->restoreBackup($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var RestoreBackupResponse $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+
+ restore_backup_sample($formattedName);
+}
+// [END backupdr_v1_generated_BackupDR_RestoreBackup_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/trigger_backup.php b/BackupDr/samples/V1/BackupDRClient/trigger_backup.php
new file mode 100644
index 000000000000..e5d82046cf0e
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/trigger_backup.php
@@ -0,0 +1,91 @@
+setName($formattedName)
+ ->setRuleId($ruleId);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->triggerBackup($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var BackupPlanAssociation $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $formattedName = BackupDRClient::backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+ $ruleId = '[RULE_ID]';
+
+ trigger_backup_sample($formattedName, $ruleId);
+}
+// [END backupdr_v1_generated_BackupDR_TriggerBackup_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/update_backup.php b/BackupDr/samples/V1/BackupDRClient/update_backup.php
new file mode 100644
index 000000000000..0986bd437465
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/update_backup.php
@@ -0,0 +1,74 @@
+setUpdateMask($updateMask)
+ ->setBackup($backup);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->updateBackup($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var Backup $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+// [END backupdr_v1_generated_BackupDR_UpdateBackup_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/update_backup_vault.php b/BackupDr/samples/V1/BackupDRClient/update_backup_vault.php
new file mode 100644
index 000000000000..6cc6d590003a
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/update_backup_vault.php
@@ -0,0 +1,77 @@
+setBackupMinimumEnforcedRetentionDuration($backupVaultBackupMinimumEnforcedRetentionDuration);
+ $request = (new UpdateBackupVaultRequest())
+ ->setUpdateMask($updateMask)
+ ->setBackupVault($backupVault);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->updateBackupVault($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var BackupVault $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+// [END backupdr_v1_generated_BackupDR_UpdateBackupVault_sync]
diff --git a/BackupDr/samples/V1/BackupDRClient/update_data_source.php b/BackupDr/samples/V1/BackupDRClient/update_data_source.php
new file mode 100644
index 000000000000..e62566e4e330
--- /dev/null
+++ b/BackupDr/samples/V1/BackupDRClient/update_data_source.php
@@ -0,0 +1,74 @@
+setUpdateMask($updateMask)
+ ->setDataSource($dataSource);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $backupDRClient->updateDataSource($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var DataSource $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+// [END backupdr_v1_generated_BackupDR_UpdateDataSource_sync]
diff --git a/BackupDr/src/V1/AcceleratorConfig.php b/BackupDr/src/V1/AcceleratorConfig.php
new file mode 100644
index 000000000000..5a0f3dce0b04
--- /dev/null
+++ b/BackupDr/src/V1/AcceleratorConfig.php
@@ -0,0 +1,130 @@
+google.cloud.backupdr.v1.AcceleratorConfig
+ */
+class AcceleratorConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Full or partial URL of the accelerator type resource to attach to
+ * this instance.
+ *
+ * Generated from protobuf field optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $accelerator_type = null;
+ /**
+ * Optional. The number of the guest accelerator cards exposed to this
+ * instance.
+ *
+ * Generated from protobuf field optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $accelerator_count = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $accelerator_type
+ * Optional. Full or partial URL of the accelerator type resource to attach to
+ * this instance.
+ * @type int $accelerator_count
+ * Optional. The number of the guest accelerator cards exposed to this
+ * instance.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Full or partial URL of the accelerator type resource to attach to
+ * this instance.
+ *
+ * Generated from protobuf field optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getAcceleratorType()
+ {
+ return isset($this->accelerator_type) ? $this->accelerator_type : '';
+ }
+
+ public function hasAcceleratorType()
+ {
+ return isset($this->accelerator_type);
+ }
+
+ public function clearAcceleratorType()
+ {
+ unset($this->accelerator_type);
+ }
+
+ /**
+ * Optional. Full or partial URL of the accelerator type resource to attach to
+ * this instance.
+ *
+ * Generated from protobuf field optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setAcceleratorType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->accelerator_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The number of the guest accelerator cards exposed to this
+ * instance.
+ *
+ * Generated from protobuf field optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getAcceleratorCount()
+ {
+ return isset($this->accelerator_count) ? $this->accelerator_count : 0;
+ }
+
+ public function hasAcceleratorCount()
+ {
+ return isset($this->accelerator_count);
+ }
+
+ public function clearAcceleratorCount()
+ {
+ unset($this->accelerator_count);
+ }
+
+ /**
+ * Optional. The number of the guest accelerator cards exposed to this
+ * instance.
+ *
+ * Generated from protobuf field optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setAcceleratorCount($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->accelerator_count = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/AccessConfig.php b/BackupDr/src/V1/AccessConfig.php
new file mode 100644
index 000000000000..325e5e49dd31
--- /dev/null
+++ b/BackupDr/src/V1/AccessConfig.php
@@ -0,0 +1,406 @@
+google.cloud.backupdr.v1.AccessConfig
+ */
+class AccessConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. In accessConfigs (IPv4), the
+ * default and only option is ONE_TO_ONE_NAT. In
+ * ipv6AccessConfigs, the default and only option is
+ * DIRECT_IPV6.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $type = null;
+ /**
+ * Optional. The name of this access configuration.
+ *
+ * Generated from protobuf field optional string name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $name = null;
+ /**
+ * Optional. The external IP address of this access configuration.
+ *
+ * Generated from protobuf field optional string external_ip = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $external_ip = null;
+ /**
+ * Optional. The external IPv6 address of this access configuration.
+ *
+ * Generated from protobuf field optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $external_ipv6 = null;
+ /**
+ * Optional. The prefix length of the external IPv6 range.
+ *
+ * Generated from protobuf field optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $external_ipv6_prefix_length = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $set_public_ptr = null;
+ /**
+ * Optional. The DNS domain name for the public PTR record.
+ *
+ * Generated from protobuf field optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $public_ptr_domain_name = null;
+ /**
+ * Optional. This signifies the networking tier used for configuring this
+ * access
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $network_tier = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $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.
+ * @type string $name
+ * Optional. The name of this access configuration.
+ * @type string $external_ip
+ * Optional. The external IP address of this access configuration.
+ * @type string $external_ipv6
+ * Optional. The external IPv6 address of this access configuration.
+ * @type int $external_ipv6_prefix_length
+ * Optional. The prefix length of the external IPv6 range.
+ * @type bool $set_public_ptr
+ * 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.
+ * @type string $public_ptr_domain_name
+ * Optional. The DNS domain name for the public PTR record.
+ * @type int $network_tier
+ * Optional. This signifies the networking tier used for configuring this
+ * access
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. In accessConfigs (IPv4), the
+ * default and only option is ONE_TO_ONE_NAT. In
+ * ipv6AccessConfigs, the default and only option is
+ * DIRECT_IPV6.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getType()
+ {
+ return isset($this->type) ? $this->type : 0;
+ }
+
+ public function hasType()
+ {
+ return isset($this->type);
+ }
+
+ public function clearType()
+ {
+ unset($this->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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\AccessConfig\AccessType::class);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The name of this access configuration.
+ *
+ * Generated from protobuf field optional string name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Optional. The name of this access configuration.
+ *
+ * Generated from protobuf field optional string name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The external IP address of this access configuration.
+ *
+ * Generated from protobuf field optional string external_ip = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getExternalIp()
+ {
+ return isset($this->external_ip) ? $this->external_ip : '';
+ }
+
+ public function hasExternalIp()
+ {
+ return isset($this->external_ip);
+ }
+
+ public function clearExternalIp()
+ {
+ unset($this->external_ip);
+ }
+
+ /**
+ * Optional. The external IP address of this access configuration.
+ *
+ * Generated from protobuf field optional string external_ip = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setExternalIp($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->external_ip = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The external IPv6 address of this access configuration.
+ *
+ * Generated from protobuf field optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getExternalIpv6()
+ {
+ return isset($this->external_ipv6) ? $this->external_ipv6 : '';
+ }
+
+ public function hasExternalIpv6()
+ {
+ return isset($this->external_ipv6);
+ }
+
+ public function clearExternalIpv6()
+ {
+ unset($this->external_ipv6);
+ }
+
+ /**
+ * Optional. The external IPv6 address of this access configuration.
+ *
+ * Generated from protobuf field optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setExternalIpv6($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->external_ipv6 = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The prefix length of the external IPv6 range.
+ *
+ * Generated from protobuf field optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getExternalIpv6PrefixLength()
+ {
+ return isset($this->external_ipv6_prefix_length) ? $this->external_ipv6_prefix_length : 0;
+ }
+
+ public function hasExternalIpv6PrefixLength()
+ {
+ return isset($this->external_ipv6_prefix_length);
+ }
+
+ public function clearExternalIpv6PrefixLength()
+ {
+ unset($this->external_ipv6_prefix_length);
+ }
+
+ /**
+ * Optional. The prefix length of the external IPv6 range.
+ *
+ * Generated from protobuf field optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setExternalIpv6PrefixLength($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->external_ipv6_prefix_length = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getSetPublicPtr()
+ {
+ return isset($this->set_public_ptr) ? $this->set_public_ptr : false;
+ }
+
+ public function hasSetPublicPtr()
+ {
+ return isset($this->set_public_ptr);
+ }
+
+ public function clearSetPublicPtr()
+ {
+ unset($this->set_public_ptr);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setSetPublicPtr($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->set_public_ptr = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The DNS domain name for the public PTR record.
+ *
+ * Generated from protobuf field optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getPublicPtrDomainName()
+ {
+ return isset($this->public_ptr_domain_name) ? $this->public_ptr_domain_name : '';
+ }
+
+ public function hasPublicPtrDomainName()
+ {
+ return isset($this->public_ptr_domain_name);
+ }
+
+ public function clearPublicPtrDomainName()
+ {
+ unset($this->public_ptr_domain_name);
+ }
+
+ /**
+ * Optional. The DNS domain name for the public PTR record.
+ *
+ * Generated from protobuf field optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setPublicPtrDomainName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->public_ptr_domain_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. This signifies the networking tier used for configuring this
+ * access
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getNetworkTier()
+ {
+ return isset($this->network_tier) ? $this->network_tier : 0;
+ }
+
+ public function hasNetworkTier()
+ {
+ return isset($this->network_tier);
+ }
+
+ public function clearNetworkTier()
+ {
+ unset($this->network_tier);
+ }
+
+ /**
+ * Optional. This signifies the networking tier used for configuring this
+ * access
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setNetworkTier($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\AccessConfig\NetworkTier::class);
+ $this->network_tier = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/AccessConfig/AccessType.php b/BackupDr/src/V1/AccessConfig/AccessType.php
new file mode 100644
index 000000000000..b8aba7880571
--- /dev/null
+++ b/BackupDr/src/V1/AccessConfig/AccessType.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.AccessConfig.AccessType
+ */
+class AccessType
+{
+ /**
+ * Default value. This value is unused.
+ *
+ * Generated from protobuf enum ACCESS_TYPE_UNSPECIFIED = 0;
+ */
+ const ACCESS_TYPE_UNSPECIFIED = 0;
+ /**
+ * ONE_TO_ONE_NAT
+ *
+ * Generated from protobuf enum ONE_TO_ONE_NAT = 1;
+ */
+ const ONE_TO_ONE_NAT = 1;
+ /**
+ * Direct IPv6 access.
+ *
+ * Generated from protobuf enum DIRECT_IPV6 = 2;
+ */
+ const DIRECT_IPV6 = 2;
+
+ private static $valueToName = [
+ self::ACCESS_TYPE_UNSPECIFIED => 'ACCESS_TYPE_UNSPECIFIED',
+ self::ONE_TO_ONE_NAT => 'ONE_TO_ONE_NAT',
+ self::DIRECT_IPV6 => 'DIRECT_IPV6',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/AccessConfig/NetworkTier.php b/BackupDr/src/V1/AccessConfig/NetworkTier.php
new file mode 100644
index 000000000000..f99138563a34
--- /dev/null
+++ b/BackupDr/src/V1/AccessConfig/NetworkTier.php
@@ -0,0 +1,64 @@
+google.cloud.backupdr.v1.AccessConfig.NetworkTier
+ */
+class NetworkTier
+{
+ /**
+ * Default value. This value is unused.
+ *
+ * Generated from protobuf enum NETWORK_TIER_UNSPECIFIED = 0;
+ */
+ const NETWORK_TIER_UNSPECIFIED = 0;
+ /**
+ * High quality, Google-grade network tier, support for all networking
+ * products.
+ *
+ * Generated from protobuf enum PREMIUM = 1;
+ */
+ const PREMIUM = 1;
+ /**
+ * Public internet quality, only limited support for other networking
+ * products.
+ *
+ * Generated from protobuf enum STANDARD = 2;
+ */
+ const STANDARD = 2;
+
+ private static $valueToName = [
+ self::NETWORK_TIER_UNSPECIFIED => 'NETWORK_TIER_UNSPECIFIED',
+ self::PREMIUM => 'PREMIUM',
+ self::STANDARD => 'STANDARD',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/AdvancedMachineFeatures.php b/BackupDr/src/V1/AdvancedMachineFeatures.php
new file mode 100644
index 000000000000..29901b19bd41
--- /dev/null
+++ b/BackupDr/src/V1/AdvancedMachineFeatures.php
@@ -0,0 +1,241 @@
+google.cloud.backupdr.v1.AdvancedMachineFeatures
+ */
+class AdvancedMachineFeatures extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Whether to enable nested virtualization or not (default is
+ * false).
+ *
+ * Generated from protobuf field optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $enable_nested_virtualization = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $threads_per_core = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $visible_core_count = null;
+ /**
+ * Optional. Whether to enable UEFI networking for instance creation.
+ *
+ * Generated from protobuf field optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $enable_uefi_networking = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $enable_nested_virtualization
+ * Optional. Whether to enable nested virtualization or not (default is
+ * false).
+ * @type int $threads_per_core
+ * 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.
+ * @type int $visible_core_count
+ * 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.
+ * @type bool $enable_uefi_networking
+ * Optional. Whether to enable UEFI networking for instance creation.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Whether to enable nested virtualization or not (default is
+ * false).
+ *
+ * Generated from protobuf field optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getEnableNestedVirtualization()
+ {
+ return isset($this->enable_nested_virtualization) ? $this->enable_nested_virtualization : false;
+ }
+
+ public function hasEnableNestedVirtualization()
+ {
+ return isset($this->enable_nested_virtualization);
+ }
+
+ public function clearEnableNestedVirtualization()
+ {
+ unset($this->enable_nested_virtualization);
+ }
+
+ /**
+ * Optional. Whether to enable nested virtualization or not (default is
+ * false).
+ *
+ * Generated from protobuf field optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setEnableNestedVirtualization($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->enable_nested_virtualization = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getThreadsPerCore()
+ {
+ return isset($this->threads_per_core) ? $this->threads_per_core : 0;
+ }
+
+ public function hasThreadsPerCore()
+ {
+ return isset($this->threads_per_core);
+ }
+
+ public function clearThreadsPerCore()
+ {
+ unset($this->threads_per_core);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setThreadsPerCore($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->threads_per_core = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getVisibleCoreCount()
+ {
+ return isset($this->visible_core_count) ? $this->visible_core_count : 0;
+ }
+
+ public function hasVisibleCoreCount()
+ {
+ return isset($this->visible_core_count);
+ }
+
+ public function clearVisibleCoreCount()
+ {
+ unset($this->visible_core_count);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setVisibleCoreCount($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->visible_core_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Whether to enable UEFI networking for instance creation.
+ *
+ * Generated from protobuf field optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getEnableUefiNetworking()
+ {
+ return isset($this->enable_uefi_networking) ? $this->enable_uefi_networking : false;
+ }
+
+ public function hasEnableUefiNetworking()
+ {
+ return isset($this->enable_uefi_networking);
+ }
+
+ public function clearEnableUefiNetworking()
+ {
+ unset($this->enable_uefi_networking);
+ }
+
+ /**
+ * Optional. Whether to enable UEFI networking for instance creation.
+ *
+ * Generated from protobuf field optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setEnableUefiNetworking($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->enable_uefi_networking = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/AliasIpRange.php b/BackupDr/src/V1/AliasIpRange.php
new file mode 100644
index 000000000000..c7fa6c80788b
--- /dev/null
+++ b/BackupDr/src/V1/AliasIpRange.php
@@ -0,0 +1,129 @@
+google.cloud.backupdr.v1.AliasIpRange
+ */
+class AliasIpRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The IP alias ranges to allocate for this interface.
+ *
+ * Generated from protobuf field optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $ip_cidr_range = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $subnetwork_range_name = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $ip_cidr_range
+ * Optional. The IP alias ranges to allocate for this interface.
+ * @type string $subnetwork_range_name
+ * 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.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The IP alias ranges to allocate for this interface.
+ *
+ * Generated from protobuf field optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getIpCidrRange()
+ {
+ return isset($this->ip_cidr_range) ? $this->ip_cidr_range : '';
+ }
+
+ public function hasIpCidrRange()
+ {
+ return isset($this->ip_cidr_range);
+ }
+
+ public function clearIpCidrRange()
+ {
+ unset($this->ip_cidr_range);
+ }
+
+ /**
+ * Optional. The IP alias ranges to allocate for this interface.
+ *
+ * Generated from protobuf field optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setIpCidrRange($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->ip_cidr_range = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getSubnetworkRangeName()
+ {
+ return isset($this->subnetwork_range_name) ? $this->subnetwork_range_name : '';
+ }
+
+ public function hasSubnetworkRangeName()
+ {
+ return isset($this->subnetwork_range_name);
+ }
+
+ public function clearSubnetworkRangeName()
+ {
+ unset($this->subnetwork_range_name);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setSubnetworkRangeName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->subnetwork_range_name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/AllocationAffinity.php b/BackupDr/src/V1/AllocationAffinity.php
new file mode 100644
index 000000000000..6eb73d7b0b92
--- /dev/null
+++ b/BackupDr/src/V1/AllocationAffinity.php
@@ -0,0 +1,159 @@
+google.cloud.backupdr.v1.AllocationAffinity
+ */
+class AllocationAffinity extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Specifies the type of reservation from which this instance can
+ * consume
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AllocationAffinity.Type consume_allocation_type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $consume_allocation_type = null;
+ /**
+ * Optional. Corresponds to the label key of a reservation resource.
+ *
+ * Generated from protobuf field optional string key = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $key = null;
+ /**
+ * Optional. Corresponds to the label values of a reservation resource.
+ *
+ * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $values;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $consume_allocation_type
+ * Optional. Specifies the type of reservation from which this instance can
+ * consume
+ * @type string $key
+ * Optional. Corresponds to the label key of a reservation resource.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $values
+ * Optional. Corresponds to the label values of a reservation resource.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Specifies the type of reservation from which this instance can
+ * consume
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AllocationAffinity.Type consume_allocation_type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getConsumeAllocationType()
+ {
+ return isset($this->consume_allocation_type) ? $this->consume_allocation_type : 0;
+ }
+
+ public function hasConsumeAllocationType()
+ {
+ return isset($this->consume_allocation_type);
+ }
+
+ public function clearConsumeAllocationType()
+ {
+ unset($this->consume_allocation_type);
+ }
+
+ /**
+ * Optional. Specifies the type of reservation from which this instance can
+ * consume
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AllocationAffinity.Type consume_allocation_type = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setConsumeAllocationType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\AllocationAffinity\Type::class);
+ $this->consume_allocation_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Corresponds to the label key of a reservation resource.
+ *
+ * Generated from protobuf field optional string key = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getKey()
+ {
+ return isset($this->key) ? $this->key : '';
+ }
+
+ public function hasKey()
+ {
+ return isset($this->key);
+ }
+
+ public function clearKey()
+ {
+ unset($this->key);
+ }
+
+ /**
+ * Optional. Corresponds to the label key of a reservation resource.
+ *
+ * Generated from protobuf field optional string key = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->key = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Corresponds to the label values of a reservation resource.
+ *
+ * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * Optional. Corresponds to the label values of a reservation resource.
+ *
+ * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->values = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/AllocationAffinity/Type.php b/BackupDr/src/V1/AllocationAffinity/Type.php
new file mode 100644
index 000000000000..949d11e75468
--- /dev/null
+++ b/BackupDr/src/V1/AllocationAffinity/Type.php
@@ -0,0 +1,70 @@
+google.cloud.backupdr.v1.AllocationAffinity.Type
+ */
+class Type
+{
+ /**
+ * Default value. This value is unused.
+ *
+ * Generated from protobuf enum TYPE_UNSPECIFIED = 0;
+ */
+ const TYPE_UNSPECIFIED = 0;
+ /**
+ * Do not consume from any allocated capacity.
+ *
+ * Generated from protobuf enum NO_RESERVATION = 1;
+ */
+ const NO_RESERVATION = 1;
+ /**
+ * Consume any allocation available.
+ *
+ * Generated from protobuf enum ANY_RESERVATION = 2;
+ */
+ const ANY_RESERVATION = 2;
+ /**
+ * Must consume from a specific reservation. Must specify key value fields
+ * for specifying the reservations.
+ *
+ * Generated from protobuf enum SPECIFIC_RESERVATION = 3;
+ */
+ const SPECIFIC_RESERVATION = 3;
+
+ private static $valueToName = [
+ self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED',
+ self::NO_RESERVATION => 'NO_RESERVATION',
+ self::ANY_RESERVATION => 'ANY_RESERVATION',
+ self::SPECIFIC_RESERVATION => 'SPECIFIC_RESERVATION',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/AttachedDisk.php b/BackupDr/src/V1/AttachedDisk.php
new file mode 100644
index 000000000000..6d06c12af671
--- /dev/null
+++ b/BackupDr/src/V1/AttachedDisk.php
@@ -0,0 +1,804 @@
+google.cloud.backupdr.v1.AttachedDisk
+ */
+class AttachedDisk extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Specifies the parameters to initialize this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $initialize_params = null;
+ /**
+ * 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)
+ *
+ * Generated from protobuf field optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $device_name = null;
+ /**
+ * Optional. Type of the resource.
+ *
+ * Generated from protobuf field optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $kind = null;
+ /**
+ * Specifies the type of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true];
+ * @deprecated
+ */
+ protected $disk_type_deprecated = null;
+ /**
+ * Optional. The mode in which to attach this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $mode = null;
+ /**
+ * Optional. Specifies a valid partial or full URL to an existing Persistent
+ * Disk resource.
+ *
+ * Generated from protobuf field optional string source = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $source = null;
+ /**
+ * Optional. A zero-based index to this disk, where 0 is reserved for the
+ * boot disk.
+ *
+ * Generated from protobuf field optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $index = null;
+ /**
+ * Optional. Indicates that this is a boot disk. The virtual machine will use
+ * the first partition of the disk for its root filesystem.
+ *
+ * Generated from protobuf field optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $boot = null;
+ /**
+ * Optional. Specifies whether the disk will be auto-deleted when the instance
+ * is deleted (but not when the disk is detached from the instance).
+ *
+ * Generated from protobuf field optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $auto_delete = null;
+ /**
+ * Optional. Any valid publicly visible licenses.
+ *
+ * Generated from protobuf field repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $license;
+ /**
+ * Optional. Specifies the disk interface to use for attaching this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $disk_interface = null;
+ /**
+ * Optional. A list of features to enable on the guest operating system.
+ * Applicable only for bootable images.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $guest_os_feature;
+ /**
+ * Optional. Encrypts or decrypts a disk using a customer-supplied
+ * encryption key.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $disk_encryption_key = null;
+ /**
+ * Optional. The size of the disk in GB.
+ *
+ * Generated from protobuf field optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $disk_size_gb = null;
+ /**
+ * Optional. Output only. The state of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $saved_state = null;
+ /**
+ * Optional. Output only. The URI of the disk type resource. For example:
+ * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+ *
+ * Generated from protobuf field optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $disk_type = null;
+ /**
+ * Optional. Specifies the type of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $type = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\BackupDR\V1\AttachedDisk\InitializeParams $initialize_params
+ * Optional. Specifies the parameters to initialize this disk.
+ * @type string $device_name
+ * 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)
+ * @type string $kind
+ * Optional. Type of the resource.
+ * @type int $disk_type_deprecated
+ * Specifies the type of the disk.
+ * @type int $mode
+ * Optional. The mode in which to attach this disk.
+ * @type string $source
+ * Optional. Specifies a valid partial or full URL to an existing Persistent
+ * Disk resource.
+ * @type int|string $index
+ * Optional. A zero-based index to this disk, where 0 is reserved for the
+ * boot disk.
+ * @type bool $boot
+ * Optional. Indicates that this is a boot disk. The virtual machine will use
+ * the first partition of the disk for its root filesystem.
+ * @type bool $auto_delete
+ * Optional. Specifies whether the disk will be auto-deleted when the instance
+ * is deleted (but not when the disk is detached from the instance).
+ * @type array|\Google\Protobuf\Internal\RepeatedField $license
+ * Optional. Any valid publicly visible licenses.
+ * @type int $disk_interface
+ * Optional. Specifies the disk interface to use for attaching this disk.
+ * @type array<\Google\Cloud\BackupDR\V1\GuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $guest_os_feature
+ * Optional. A list of features to enable on the guest operating system.
+ * Applicable only for bootable images.
+ * @type \Google\Cloud\BackupDR\V1\CustomerEncryptionKey $disk_encryption_key
+ * Optional. Encrypts or decrypts a disk using a customer-supplied
+ * encryption key.
+ * @type int|string $disk_size_gb
+ * Optional. The size of the disk in GB.
+ * @type int $saved_state
+ * Optional. Output only. The state of the disk.
+ * @type string $disk_type
+ * Optional. Output only. The URI of the disk type resource. For example:
+ * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+ * @type int $type
+ * Optional. Specifies the type of the disk.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Specifies the parameters to initialize this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\AttachedDisk\InitializeParams|null
+ */
+ public function getInitializeParams()
+ {
+ return $this->initialize_params;
+ }
+
+ public function hasInitializeParams()
+ {
+ return isset($this->initialize_params);
+ }
+
+ public function clearInitializeParams()
+ {
+ unset($this->initialize_params);
+ }
+
+ /**
+ * Optional. Specifies the parameters to initialize this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\AttachedDisk\InitializeParams $var
+ * @return $this
+ */
+ public function setInitializeParams($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\AttachedDisk\InitializeParams::class);
+ $this->initialize_params = $var;
+
+ 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)
+ *
+ * Generated from protobuf field optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDeviceName()
+ {
+ return isset($this->device_name) ? $this->device_name : '';
+ }
+
+ public function hasDeviceName()
+ {
+ return isset($this->device_name);
+ }
+
+ public function clearDeviceName()
+ {
+ unset($this->device_name);
+ }
+
+ /**
+ * 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)
+ *
+ * Generated from protobuf field optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDeviceName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->device_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Type of the resource.
+ *
+ * Generated from protobuf field optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getKind()
+ {
+ return isset($this->kind) ? $this->kind : '';
+ }
+
+ public function hasKind()
+ {
+ return isset($this->kind);
+ }
+
+ public function clearKind()
+ {
+ unset($this->kind);
+ }
+
+ /**
+ * Optional. Type of the resource.
+ *
+ * Generated from protobuf field optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setKind($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->kind = $var;
+
+ return $this;
+ }
+
+ /**
+ * Specifies the type of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true];
+ * @return int
+ * @deprecated
+ */
+ public function getDiskTypeDeprecated()
+ {
+ @trigger_error('disk_type_deprecated is deprecated.', E_USER_DEPRECATED);
+ return isset($this->disk_type_deprecated) ? $this->disk_type_deprecated : 0;
+ }
+
+ public function hasDiskTypeDeprecated()
+ {
+ @trigger_error('disk_type_deprecated is deprecated.', E_USER_DEPRECATED);
+ return isset($this->disk_type_deprecated);
+ }
+
+ public function clearDiskTypeDeprecated()
+ {
+ @trigger_error('disk_type_deprecated is deprecated.', E_USER_DEPRECATED);
+ unset($this->disk_type_deprecated);
+ }
+
+ /**
+ * Specifies the type of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true];
+ * @param int $var
+ * @return $this
+ * @deprecated
+ */
+ public function setDiskTypeDeprecated($var)
+ {
+ @trigger_error('disk_type_deprecated is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\AttachedDisk\DiskType::class);
+ $this->disk_type_deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The mode in which to attach this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getMode()
+ {
+ return isset($this->mode) ? $this->mode : 0;
+ }
+
+ public function hasMode()
+ {
+ return isset($this->mode);
+ }
+
+ public function clearMode()
+ {
+ unset($this->mode);
+ }
+
+ /**
+ * Optional. The mode in which to attach this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setMode($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\AttachedDisk\DiskMode::class);
+ $this->mode = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Specifies a valid partial or full URL to an existing Persistent
+ * Disk resource.
+ *
+ * Generated from protobuf field optional string source = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getSource()
+ {
+ return isset($this->source) ? $this->source : '';
+ }
+
+ public function hasSource()
+ {
+ return isset($this->source);
+ }
+
+ public function clearSource()
+ {
+ unset($this->source);
+ }
+
+ /**
+ * Optional. Specifies a valid partial or full URL to an existing Persistent
+ * Disk resource.
+ *
+ * Generated from protobuf field optional string source = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setSource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->source = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A zero-based index to this disk, where 0 is reserved for the
+ * boot disk.
+ *
+ * Generated from protobuf field optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int|string
+ */
+ public function getIndex()
+ {
+ return isset($this->index) ? $this->index : 0;
+ }
+
+ public function hasIndex()
+ {
+ return isset($this->index);
+ }
+
+ public function clearIndex()
+ {
+ unset($this->index);
+ }
+
+ /**
+ * Optional. A zero-based index to this disk, where 0 is reserved for the
+ * boot disk.
+ *
+ * Generated from protobuf field optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int|string $var
+ * @return $this
+ */
+ public function setIndex($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->index = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getBoot()
+ {
+ return isset($this->boot) ? $this->boot : false;
+ }
+
+ public function hasBoot()
+ {
+ return isset($this->boot);
+ }
+
+ public function clearBoot()
+ {
+ unset($this->boot);
+ }
+
+ /**
+ * Optional. Indicates that this is a boot disk. The virtual machine will use
+ * the first partition of the disk for its root filesystem.
+ *
+ * Generated from protobuf field optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setBoot($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->boot = $var;
+
+ 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).
+ *
+ * Generated from protobuf field optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAutoDelete()
+ {
+ return isset($this->auto_delete) ? $this->auto_delete : false;
+ }
+
+ public function hasAutoDelete()
+ {
+ return isset($this->auto_delete);
+ }
+
+ public function clearAutoDelete()
+ {
+ unset($this->auto_delete);
+ }
+
+ /**
+ * Optional. Specifies whether the disk will be auto-deleted when the instance
+ * is deleted (but not when the disk is detached from the instance).
+ *
+ * Generated from protobuf field optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAutoDelete($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->auto_delete = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Any valid publicly visible licenses.
+ *
+ * Generated from protobuf field repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLicense()
+ {
+ return $this->license;
+ }
+
+ /**
+ * Optional. Any valid publicly visible licenses.
+ *
+ * Generated from protobuf field repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLicense($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->license = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Specifies the disk interface to use for attaching this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getDiskInterface()
+ {
+ return isset($this->disk_interface) ? $this->disk_interface : 0;
+ }
+
+ public function hasDiskInterface()
+ {
+ return isset($this->disk_interface);
+ }
+
+ public function clearDiskInterface()
+ {
+ unset($this->disk_interface);
+ }
+
+ /**
+ * Optional. Specifies the disk interface to use for attaching this disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setDiskInterface($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\AttachedDisk\DiskInterface::class);
+ $this->disk_interface = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A list of features to enable on the guest operating system.
+ * Applicable only for bootable images.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getGuestOsFeature()
+ {
+ return $this->guest_os_feature;
+ }
+
+ /**
+ * Optional. A list of features to enable on the guest operating system.
+ * Applicable only for bootable images.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\GuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setGuestOsFeature($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\GuestOsFeature::class);
+ $this->guest_os_feature = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Encrypts or decrypts a disk using a customer-supplied
+ * encryption key.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\CustomerEncryptionKey|null
+ */
+ public function getDiskEncryptionKey()
+ {
+ return $this->disk_encryption_key;
+ }
+
+ public function hasDiskEncryptionKey()
+ {
+ return isset($this->disk_encryption_key);
+ }
+
+ public function clearDiskEncryptionKey()
+ {
+ unset($this->disk_encryption_key);
+ }
+
+ /**
+ * Optional. Encrypts or decrypts a disk using a customer-supplied
+ * encryption key.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\CustomerEncryptionKey $var
+ * @return $this
+ */
+ public function setDiskEncryptionKey($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\CustomerEncryptionKey::class);
+ $this->disk_encryption_key = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The size of the disk in GB.
+ *
+ * Generated from protobuf field optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int|string
+ */
+ public function getDiskSizeGb()
+ {
+ return isset($this->disk_size_gb) ? $this->disk_size_gb : 0;
+ }
+
+ public function hasDiskSizeGb()
+ {
+ return isset($this->disk_size_gb);
+ }
+
+ public function clearDiskSizeGb()
+ {
+ unset($this->disk_size_gb);
+ }
+
+ /**
+ * Optional. The size of the disk in GB.
+ *
+ * Generated from protobuf field optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int|string $var
+ * @return $this
+ */
+ public function setDiskSizeGb($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->disk_size_gb = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Output only. The state of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getSavedState()
+ {
+ return isset($this->saved_state) ? $this->saved_state : 0;
+ }
+
+ public function hasSavedState()
+ {
+ return isset($this->saved_state);
+ }
+
+ public function clearSavedState()
+ {
+ unset($this->saved_state);
+ }
+
+ /**
+ * Optional. Output only. The state of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setSavedState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\AttachedDisk\DiskSavedState::class);
+ $this->saved_state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Output only. The URI of the disk type resource. For example:
+ * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+ *
+ * Generated from protobuf field optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getDiskType()
+ {
+ return isset($this->disk_type) ? $this->disk_type : '';
+ }
+
+ public function hasDiskType()
+ {
+ return isset($this->disk_type);
+ }
+
+ public function clearDiskType()
+ {
+ unset($this->disk_type);
+ }
+
+ /**
+ * Optional. Output only. The URI of the disk type resource. For example:
+ * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+ *
+ * Generated from protobuf field optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setDiskType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->disk_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Specifies the type of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getType()
+ {
+ return isset($this->type) ? $this->type : 0;
+ }
+
+ public function hasType()
+ {
+ return isset($this->type);
+ }
+
+ public function clearType()
+ {
+ unset($this->type);
+ }
+
+ /**
+ * Optional. Specifies the type of the disk.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\AttachedDisk\DiskType::class);
+ $this->type = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/AttachedDisk/DiskInterface.php b/BackupDr/src/V1/AttachedDisk/DiskInterface.php
new file mode 100644
index 000000000000..69ac3c141578
--- /dev/null
+++ b/BackupDr/src/V1/AttachedDisk/DiskInterface.php
@@ -0,0 +1,76 @@
+google.cloud.backupdr.v1.AttachedDisk.DiskInterface
+ */
+class DiskInterface
+{
+ /**
+ * Default value, which is unused.
+ *
+ * Generated from protobuf enum DISK_INTERFACE_UNSPECIFIED = 0;
+ */
+ const DISK_INTERFACE_UNSPECIFIED = 0;
+ /**
+ * SCSI Disk Interface.
+ *
+ * Generated from protobuf enum SCSI = 1;
+ */
+ const SCSI = 1;
+ /**
+ * NVME Disk Interface.
+ *
+ * Generated from protobuf enum NVME = 2;
+ */
+ const NVME = 2;
+ /**
+ * NVDIMM Disk Interface.
+ *
+ * Generated from protobuf enum NVDIMM = 3;
+ */
+ const NVDIMM = 3;
+ /**
+ * ISCSI Disk Interface.
+ *
+ * Generated from protobuf enum ISCSI = 4;
+ */
+ const ISCSI = 4;
+
+ private static $valueToName = [
+ self::DISK_INTERFACE_UNSPECIFIED => 'DISK_INTERFACE_UNSPECIFIED',
+ self::SCSI => 'SCSI',
+ self::NVME => 'NVME',
+ self::NVDIMM => 'NVDIMM',
+ self::ISCSI => 'ISCSI',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/AttachedDisk/DiskMode.php b/BackupDr/src/V1/AttachedDisk/DiskMode.php
new file mode 100644
index 000000000000..57c501a544cb
--- /dev/null
+++ b/BackupDr/src/V1/AttachedDisk/DiskMode.php
@@ -0,0 +1,74 @@
+google.cloud.backupdr.v1.AttachedDisk.DiskMode
+ */
+class DiskMode
+{
+ /**
+ * Default value, which is unused.
+ *
+ * Generated from protobuf enum DISK_MODE_UNSPECIFIED = 0;
+ */
+ const 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.
+ *
+ * Generated from protobuf enum READ_WRITE = 1;
+ */
+ const READ_WRITE = 1;
+ /**
+ * Attaches this disk in read-only mode. Multiple virtual machines can use
+ * a disk in read-only mode at a time.
+ *
+ * Generated from protobuf enum READ_ONLY = 2;
+ */
+ const 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.
+ *
+ * Generated from protobuf enum LOCKED = 3;
+ */
+ const LOCKED = 3;
+
+ private static $valueToName = [
+ self::DISK_MODE_UNSPECIFIED => 'DISK_MODE_UNSPECIFIED',
+ self::READ_WRITE => 'READ_WRITE',
+ self::READ_ONLY => 'READ_ONLY',
+ self::LOCKED => 'LOCKED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/AttachedDisk/DiskSavedState.php b/BackupDr/src/V1/AttachedDisk/DiskSavedState.php
new file mode 100644
index 000000000000..c17852da2280
--- /dev/null
+++ b/BackupDr/src/V1/AttachedDisk/DiskSavedState.php
@@ -0,0 +1,55 @@
+google.cloud.backupdr.v1.AttachedDisk.DiskSavedState
+ */
+class DiskSavedState
+{
+ /**
+ * Default Disk state has not been preserved.
+ *
+ * Generated from protobuf enum DISK_SAVED_STATE_UNSPECIFIED = 0;
+ */
+ const DISK_SAVED_STATE_UNSPECIFIED = 0;
+ /**
+ * Disk state has been preserved.
+ *
+ * Generated from protobuf enum PRESERVED = 1;
+ */
+ const PRESERVED = 1;
+
+ private static $valueToName = [
+ self::DISK_SAVED_STATE_UNSPECIFIED => 'DISK_SAVED_STATE_UNSPECIFIED',
+ self::PRESERVED => 'PRESERVED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/AttachedDisk/DiskType.php b/BackupDr/src/V1/AttachedDisk/DiskType.php
new file mode 100644
index 000000000000..323c3423bf3d
--- /dev/null
+++ b/BackupDr/src/V1/AttachedDisk/DiskType.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.AttachedDisk.DiskType
+ */
+class DiskType
+{
+ /**
+ * Default value, which is unused.
+ *
+ * Generated from protobuf enum DISK_TYPE_UNSPECIFIED = 0;
+ */
+ const DISK_TYPE_UNSPECIFIED = 0;
+ /**
+ * A scratch disk type.
+ *
+ * Generated from protobuf enum SCRATCH = 1;
+ */
+ const SCRATCH = 1;
+ /**
+ * A persistent disk type.
+ *
+ * Generated from protobuf enum PERSISTENT = 2;
+ */
+ const PERSISTENT = 2;
+
+ private static $valueToName = [
+ self::DISK_TYPE_UNSPECIFIED => 'DISK_TYPE_UNSPECIFIED',
+ self::SCRATCH => 'SCRATCH',
+ self::PERSISTENT => 'PERSISTENT',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/AttachedDisk/InitializeParams.php b/BackupDr/src/V1/AttachedDisk/InitializeParams.php
new file mode 100644
index 000000000000..549109c5f495
--- /dev/null
+++ b/BackupDr/src/V1/AttachedDisk/InitializeParams.php
@@ -0,0 +1,120 @@
+google.cloud.backupdr.v1.AttachedDisk.InitializeParams
+ */
+class InitializeParams extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Specifies the disk name. If not specified, the default is to
+ * use the name of the instance.
+ *
+ * Generated from protobuf field optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $disk_name = null;
+ /**
+ * Optional. URL of the zone where the disk should be created.
+ * Required for each regional disk associated with the instance.
+ *
+ * Generated from protobuf field repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $replica_zones;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $disk_name
+ * Optional. Specifies the disk name. If not specified, the default is to
+ * use the name of the instance.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $replica_zones
+ * Optional. URL of the zone where the disk should be created.
+ * Required for each regional disk associated with the instance.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Specifies the disk name. If not specified, the default is to
+ * use the name of the instance.
+ *
+ * Generated from protobuf field optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDiskName()
+ {
+ return isset($this->disk_name) ? $this->disk_name : '';
+ }
+
+ public function hasDiskName()
+ {
+ return isset($this->disk_name);
+ }
+
+ public function clearDiskName()
+ {
+ unset($this->disk_name);
+ }
+
+ /**
+ * Optional. Specifies the disk name. If not specified, the default is to
+ * use the name of the instance.
+ *
+ * Generated from protobuf field optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDiskName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->disk_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. URL of the zone where the disk should be created.
+ * Required for each regional disk associated with the instance.
+ *
+ * Generated from protobuf field repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReplicaZones()
+ {
+ return $this->replica_zones;
+ }
+
+ /**
+ * Optional. URL of the zone where the disk should be created.
+ * Required for each regional disk associated with the instance.
+ *
+ * Generated from protobuf field repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setReplicaZones($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->replica_zones = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/BackupDr/src/V1/Backup.php b/BackupDr/src/V1/Backup.php
new file mode 100644
index 000000000000..5639d7923c1e
--- /dev/null
+++ b/BackupDr/src/V1/Backup.php
@@ -0,0 +1,728 @@
+google.cloud.backupdr.v1.Backup
+ */
+class Backup extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ */
+ protected $name = '';
+ /**
+ * Output only. The description of the Backup instance (2048 characters or
+ * less).
+ *
+ * Generated from protobuf field optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $description = null;
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined.
+ *
+ * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Optional. The backup can not be deleted before this time.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $enforced_retention_end_time = null;
+ /**
+ * Optional. When this backup is automatically expired.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $expire_time = null;
+ /**
+ * Output only. The point in time when this backup was captured from the
+ * source.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $consistency_time = null;
+ /**
+ * Optional. Server specified ETag to prevent updates from overwriting each
+ * other.
+ *
+ * Generated from protobuf field optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $etag = null;
+ /**
+ * Output only. The Backup resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $state = 0;
+ /**
+ * Output only. The list of BackupLocks taken by the service to prevent the
+ * deletion of the backup.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $service_locks;
+ /**
+ * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $backup_appliance_locks;
+ /**
+ * Output only. Type of the backup, unspecified, scheduled or ondemand.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $backup_type = 0;
+ /**
+ * Output only. source resource size in bytes at the time of the backup.
+ *
+ * Generated from protobuf field int64 resource_size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $resource_size_bytes = 0;
+ protected $backup_properties;
+ protected $plan_info;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * 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.
+ * @type string $description
+ * Output only. The description of the Backup instance (2048 characters or
+ * less).
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The time when the instance was created.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The time when the instance was updated.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined.
+ * @type \Google\Protobuf\Timestamp $enforced_retention_end_time
+ * Optional. The backup can not be deleted before this time.
+ * @type \Google\Protobuf\Timestamp $expire_time
+ * Optional. When this backup is automatically expired.
+ * @type \Google\Protobuf\Timestamp $consistency_time
+ * Output only. The point in time when this backup was captured from the
+ * source.
+ * @type string $etag
+ * Optional. Server specified ETag to prevent updates from overwriting each
+ * other.
+ * @type int $state
+ * Output only. The Backup resource instance state.
+ * @type array<\Google\Cloud\BackupDR\V1\BackupLock>|\Google\Protobuf\Internal\RepeatedField $service_locks
+ * Output only. The list of BackupLocks taken by the service to prevent the
+ * deletion of the backup.
+ * @type array<\Google\Cloud\BackupDR\V1\BackupLock>|\Google\Protobuf\Internal\RepeatedField $backup_appliance_locks
+ * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+ * @type \Google\Cloud\BackupDR\V1\ComputeInstanceBackupProperties $compute_instance_backup_properties
+ * Output only. Compute Engine specific backup properties.
+ * @type \Google\Cloud\BackupDR\V1\BackupApplianceBackupProperties $backup_appliance_backup_properties
+ * Output only. Backup Appliance specific backup properties.
+ * @type int $backup_type
+ * Output only. Type of the backup, unspecified, scheduled or ondemand.
+ * @type \Google\Cloud\BackupDR\V1\Backup\GCPBackupPlanInfo $gcp_backup_plan_info
+ * Output only. Configuration for a Google Cloud resource.
+ * @type int|string $resource_size_bytes
+ * Output only. source resource size in bytes at the time of the backup.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The description of the Backup instance (2048 characters or
+ * less).
+ *
+ * Generated from protobuf field optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getDescription()
+ {
+ return isset($this->description) ? $this->description : '';
+ }
+
+ public function hasDescription()
+ {
+ return isset($this->description);
+ }
+
+ public function clearDescription()
+ {
+ unset($this->description);
+ }
+
+ /**
+ * Output only. The description of the Backup instance (2048 characters or
+ * less).
+ *
+ * Generated from protobuf field optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getUpdateTime()
+ {
+ return $this->update_time;
+ }
+
+ public function hasUpdateTime()
+ {
+ return isset($this->update_time);
+ }
+
+ public function clearUpdateTime()
+ {
+ unset($this->update_time);
+ }
+
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setUpdateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->update_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined.
+ *
+ * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined.
+ *
+ * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The backup can not be deleted before this time.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getEnforcedRetentionEndTime()
+ {
+ return $this->enforced_retention_end_time;
+ }
+
+ public function hasEnforcedRetentionEndTime()
+ {
+ return isset($this->enforced_retention_end_time);
+ }
+
+ public function clearEnforcedRetentionEndTime()
+ {
+ unset($this->enforced_retention_end_time);
+ }
+
+ /**
+ * Optional. The backup can not be deleted before this time.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setEnforcedRetentionEndTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->enforced_retention_end_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. When this backup is automatically expired.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getExpireTime()
+ {
+ return $this->expire_time;
+ }
+
+ public function hasExpireTime()
+ {
+ return isset($this->expire_time);
+ }
+
+ public function clearExpireTime()
+ {
+ unset($this->expire_time);
+ }
+
+ /**
+ * Optional. When this backup is automatically expired.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setExpireTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->expire_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The point in time when this backup was captured from the
+ * source.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getConsistencyTime()
+ {
+ return $this->consistency_time;
+ }
+
+ public function hasConsistencyTime()
+ {
+ return isset($this->consistency_time);
+ }
+
+ public function clearConsistencyTime()
+ {
+ unset($this->consistency_time);
+ }
+
+ /**
+ * Output only. The point in time when this backup was captured from the
+ * source.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setConsistencyTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->consistency_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Server specified ETag to prevent updates from overwriting each
+ * other.
+ *
+ * Generated from protobuf field optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return isset($this->etag) ? $this->etag : '';
+ }
+
+ public function hasEtag()
+ {
+ return isset($this->etag);
+ }
+
+ public function clearEtag()
+ {
+ unset($this->etag);
+ }
+
+ /**
+ * Optional. Server specified ETag to prevent updates from overwriting each
+ * other.
+ *
+ * Generated from protobuf field optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The Backup resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getState()
+ {
+ return $this->state;
+ }
+
+ /**
+ * Output only. The Backup resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\Backup\State::class);
+ $this->state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The list of BackupLocks taken by the service to prevent the
+ * deletion of the backup.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getServiceLocks()
+ {
+ return $this->service_locks;
+ }
+
+ /**
+ * Output only. The list of BackupLocks taken by the service to prevent the
+ * deletion of the backup.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param array<\Google\Cloud\BackupDR\V1\BackupLock>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setServiceLocks($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\BackupLock::class);
+ $this->service_locks = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBackupApplianceLocks()
+ {
+ return $this->backup_appliance_locks;
+ }
+
+ /**
+ * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\BackupLock>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBackupApplianceLocks($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\BackupLock::class);
+ $this->backup_appliance_locks = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Compute Engine specific backup properties.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Cloud\BackupDR\V1\ComputeInstanceBackupProperties|null
+ */
+ public function getComputeInstanceBackupProperties()
+ {
+ return $this->readOneof(19);
+ }
+
+ public function hasComputeInstanceBackupProperties()
+ {
+ return $this->hasOneof(19);
+ }
+
+ /**
+ * Output only. Compute Engine specific backup properties.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Cloud\BackupDR\V1\ComputeInstanceBackupProperties $var
+ * @return $this
+ */
+ public function setComputeInstanceBackupProperties($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\ComputeInstanceBackupProperties::class);
+ $this->writeOneof(19, $var);
+
+ return $this;
+ }
+
+ /**
+ * Output only. Backup Appliance specific backup properties.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Cloud\BackupDR\V1\BackupApplianceBackupProperties|null
+ */
+ public function getBackupApplianceBackupProperties()
+ {
+ return $this->readOneof(21);
+ }
+
+ public function hasBackupApplianceBackupProperties()
+ {
+ return $this->hasOneof(21);
+ }
+
+ /**
+ * Output only. Backup Appliance specific backup properties.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Cloud\BackupDR\V1\BackupApplianceBackupProperties $var
+ * @return $this
+ */
+ public function setBackupApplianceBackupProperties($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupApplianceBackupProperties::class);
+ $this->writeOneof(21, $var);
+
+ return $this;
+ }
+
+ /**
+ * Output only. Type of the backup, unspecified, scheduled or ondemand.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getBackupType()
+ {
+ return $this->backup_type;
+ }
+
+ /**
+ * Output only. Type of the backup, unspecified, scheduled or ondemand.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setBackupType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\Backup\BackupType::class);
+ $this->backup_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Configuration for a Google Cloud resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Cloud\BackupDR\V1\Backup\GCPBackupPlanInfo|null
+ */
+ public function getGcpBackupPlanInfo()
+ {
+ return $this->readOneof(22);
+ }
+
+ public function hasGcpBackupPlanInfo()
+ {
+ return $this->hasOneof(22);
+ }
+
+ /**
+ * Output only. Configuration for a Google Cloud resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Cloud\BackupDR\V1\Backup\GCPBackupPlanInfo $var
+ * @return $this
+ */
+ public function setGcpBackupPlanInfo($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\Backup\GCPBackupPlanInfo::class);
+ $this->writeOneof(22, $var);
+
+ return $this;
+ }
+
+ /**
+ * Output only. source resource size in bytes at the time of the backup.
+ *
+ * Generated from protobuf field int64 resource_size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int|string
+ */
+ public function getResourceSizeBytes()
+ {
+ return $this->resource_size_bytes;
+ }
+
+ /**
+ * Output only. source resource size in bytes at the time of the backup.
+ *
+ * Generated from protobuf field int64 resource_size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int|string $var
+ * @return $this
+ */
+ public function setResourceSizeBytes($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->resource_size_bytes = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getBackupProperties()
+ {
+ return $this->whichOneof("backup_properties");
+ }
+
+ /**
+ * @return string
+ */
+ public function getPlanInfo()
+ {
+ return $this->whichOneof("plan_info");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/Backup/BackupType.php b/BackupDr/src/V1/Backup/BackupType.php
new file mode 100644
index 000000000000..5858858dc7d8
--- /dev/null
+++ b/BackupDr/src/V1/Backup/BackupType.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.Backup.BackupType
+ */
+class BackupType
+{
+ /**
+ * Backup type is unspecified.
+ *
+ * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0;
+ */
+ const BACKUP_TYPE_UNSPECIFIED = 0;
+ /**
+ * Scheduled backup.
+ *
+ * Generated from protobuf enum SCHEDULED = 1;
+ */
+ const SCHEDULED = 1;
+ /**
+ * On demand backup.
+ *
+ * Generated from protobuf enum ON_DEMAND = 2;
+ */
+ const ON_DEMAND = 2;
+
+ private static $valueToName = [
+ self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED',
+ self::SCHEDULED => 'SCHEDULED',
+ self::ON_DEMAND => 'ON_DEMAND',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/Backup/GCPBackupPlanInfo.php b/BackupDr/src/V1/Backup/GCPBackupPlanInfo.php
new file mode 100644
index 000000000000..b8c387cdfd06
--- /dev/null
+++ b/BackupDr/src/V1/Backup/GCPBackupPlanInfo.php
@@ -0,0 +1,119 @@
+google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo
+ */
+class GCPBackupPlanInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Resource name of backup plan by which workload is protected at the time
+ * of the backup.
+ * Format:
+ * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+ *
+ * Generated from protobuf field string backup_plan = 1 [(.google.api.resource_reference) = {
+ */
+ protected $backup_plan = '';
+ /**
+ * The rule id of the backup plan which triggered this backup in case of
+ * scheduled backup or used for
+ *
+ * Generated from protobuf field string backup_plan_rule_id = 2;
+ */
+ protected $backup_plan_rule_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $backup_plan
+ * Resource name of backup plan by which workload is protected at the time
+ * of the backup.
+ * Format:
+ * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+ * @type string $backup_plan_rule_id
+ * The rule id of the backup plan which triggered this backup in case of
+ * scheduled backup or used for
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Resource name of backup plan by which workload is protected at the time
+ * of the backup.
+ * Format:
+ * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+ *
+ * Generated from protobuf field string backup_plan = 1 [(.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getBackupPlan()
+ {
+ return $this->backup_plan;
+ }
+
+ /**
+ * Resource name of backup plan by which workload is protected at the time
+ * of the backup.
+ * Format:
+ * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+ *
+ * Generated from protobuf field string backup_plan = 1 [(.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupPlan($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_plan = $var;
+
+ return $this;
+ }
+
+ /**
+ * The rule id of the backup plan which triggered this backup in case of
+ * scheduled backup or used for
+ *
+ * Generated from protobuf field string backup_plan_rule_id = 2;
+ * @return string
+ */
+ public function getBackupPlanRuleId()
+ {
+ return $this->backup_plan_rule_id;
+ }
+
+ /**
+ * The rule id of the backup plan which triggered this backup in case of
+ * scheduled backup or used for
+ *
+ * Generated from protobuf field string backup_plan_rule_id = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupPlanRuleId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_plan_rule_id = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/BackupDr/src/V1/Backup/State.php b/BackupDr/src/V1/Backup/State.php
new file mode 100644
index 000000000000..a82ffb90bab8
--- /dev/null
+++ b/BackupDr/src/V1/Backup/State.php
@@ -0,0 +1,76 @@
+google.cloud.backupdr.v1.Backup.State
+ */
+class State
+{
+ /**
+ * State not set.
+ *
+ * Generated from protobuf enum STATE_UNSPECIFIED = 0;
+ */
+ const STATE_UNSPECIFIED = 0;
+ /**
+ * The backup is being created.
+ *
+ * Generated from protobuf enum CREATING = 1;
+ */
+ const CREATING = 1;
+ /**
+ * The backup has been created and is fully usable.
+ *
+ * Generated from protobuf enum ACTIVE = 2;
+ */
+ const ACTIVE = 2;
+ /**
+ * The backup is being deleted.
+ *
+ * Generated from protobuf enum DELETING = 3;
+ */
+ const DELETING = 3;
+ /**
+ * The backup is experiencing an issue and might be unusable.
+ *
+ * Generated from protobuf enum ERROR = 4;
+ */
+ const ERROR = 4;
+
+ private static $valueToName = [
+ self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
+ self::CREATING => 'CREATING',
+ self::ACTIVE => 'ACTIVE',
+ self::DELETING => 'DELETING',
+ self::ERROR => 'ERROR',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/BackupApplianceBackupConfig.php b/BackupDr/src/V1/BackupApplianceBackupConfig.php
new file mode 100644
index 000000000000..b5d4c27f9480
--- /dev/null
+++ b/BackupDr/src/V1/BackupApplianceBackupConfig.php
@@ -0,0 +1,272 @@
+google.cloud.backupdr.v1.BackupApplianceBackupConfig
+ */
+class BackupApplianceBackupConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the backup appliance.
+ *
+ * Generated from protobuf field string backup_appliance_name = 1;
+ */
+ protected $backup_appliance_name = '';
+ /**
+ * The ID of the backup appliance.
+ *
+ * Generated from protobuf field int64 backup_appliance_id = 2;
+ */
+ protected $backup_appliance_id = 0;
+ /**
+ * The ID of the SLA of this application.
+ *
+ * Generated from protobuf field int64 sla_id = 3;
+ */
+ protected $sla_id = 0;
+ /**
+ * The name of the application.
+ *
+ * Generated from protobuf field string application_name = 4;
+ */
+ protected $application_name = '';
+ /**
+ * The name of the host where the application is running.
+ *
+ * Generated from protobuf field string host_name = 5;
+ */
+ protected $host_name = '';
+ /**
+ * The name of the SLT associated with the application.
+ *
+ * Generated from protobuf field string slt_name = 6;
+ */
+ protected $slt_name = '';
+ /**
+ * The name of the SLP associated with the application.
+ *
+ * Generated from protobuf field string slp_name = 7;
+ */
+ protected $slp_name = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $backup_appliance_name
+ * The name of the backup appliance.
+ * @type int|string $backup_appliance_id
+ * The ID of the backup appliance.
+ * @type int|string $sla_id
+ * The ID of the SLA of this application.
+ * @type string $application_name
+ * The name of the application.
+ * @type string $host_name
+ * The name of the host where the application is running.
+ * @type string $slt_name
+ * The name of the SLT associated with the application.
+ * @type string $slp_name
+ * The name of the SLP associated with the application.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the backup appliance.
+ *
+ * Generated from protobuf field string backup_appliance_name = 1;
+ * @return string
+ */
+ public function getBackupApplianceName()
+ {
+ return $this->backup_appliance_name;
+ }
+
+ /**
+ * The name of the backup appliance.
+ *
+ * Generated from protobuf field string backup_appliance_name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupApplianceName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_appliance_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The ID of the backup appliance.
+ *
+ * Generated from protobuf field int64 backup_appliance_id = 2;
+ * @return int|string
+ */
+ public function getBackupApplianceId()
+ {
+ return $this->backup_appliance_id;
+ }
+
+ /**
+ * The ID of the backup appliance.
+ *
+ * Generated from protobuf field int64 backup_appliance_id = 2;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setBackupApplianceId($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->backup_appliance_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The ID of the SLA of this application.
+ *
+ * Generated from protobuf field int64 sla_id = 3;
+ * @return int|string
+ */
+ public function getSlaId()
+ {
+ return $this->sla_id;
+ }
+
+ /**
+ * The ID of the SLA of this application.
+ *
+ * Generated from protobuf field int64 sla_id = 3;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSlaId($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->sla_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The name of the application.
+ *
+ * Generated from protobuf field string application_name = 4;
+ * @return string
+ */
+ public function getApplicationName()
+ {
+ return $this->application_name;
+ }
+
+ /**
+ * The name of the application.
+ *
+ * Generated from protobuf field string application_name = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setApplicationName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->application_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The name of the host where the application is running.
+ *
+ * Generated from protobuf field string host_name = 5;
+ * @return string
+ */
+ public function getHostName()
+ {
+ return $this->host_name;
+ }
+
+ /**
+ * The name of the host where the application is running.
+ *
+ * Generated from protobuf field string host_name = 5;
+ * @param string $var
+ * @return $this
+ */
+ public function setHostName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->host_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The name of the SLT associated with the application.
+ *
+ * Generated from protobuf field string slt_name = 6;
+ * @return string
+ */
+ public function getSltName()
+ {
+ return $this->slt_name;
+ }
+
+ /**
+ * The name of the SLT associated with the application.
+ *
+ * Generated from protobuf field string slt_name = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setSltName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->slt_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The name of the SLP associated with the application.
+ *
+ * Generated from protobuf field string slp_name = 7;
+ * @return string
+ */
+ public function getSlpName()
+ {
+ return $this->slp_name;
+ }
+
+ /**
+ * The name of the SLP associated with the application.
+ *
+ * Generated from protobuf field string slp_name = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setSlpName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->slp_name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupApplianceBackupProperties.php b/BackupDr/src/V1/BackupApplianceBackupProperties.php
new file mode 100644
index 000000000000..62bf277eea5e
--- /dev/null
+++ b/BackupDr/src/V1/BackupApplianceBackupProperties.php
@@ -0,0 +1,218 @@
+google.cloud.backupdr.v1.BackupApplianceBackupProperties
+ */
+class BackupApplianceBackupProperties extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. The numeric generation ID of the backup (monotonically
+ * increasing).
+ *
+ * Generated from protobuf field optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $generation_id = null;
+ /**
+ * Output only. The time when this backup object was finalized (if none,
+ * backup is not finalized).
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $finalize_time = null;
+ /**
+ * Optional. The earliest timestamp of data available in this Backup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $recovery_range_start_time = null;
+ /**
+ * Optional. The latest timestamp of data available in this Backup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $recovery_range_end_time = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $generation_id
+ * Output only. The numeric generation ID of the backup (monotonically
+ * increasing).
+ * @type \Google\Protobuf\Timestamp $finalize_time
+ * Output only. The time when this backup object was finalized (if none,
+ * backup is not finalized).
+ * @type \Google\Protobuf\Timestamp $recovery_range_start_time
+ * Optional. The earliest timestamp of data available in this Backup.
+ * @type \Google\Protobuf\Timestamp $recovery_range_end_time
+ * Optional. The latest timestamp of data available in this Backup.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultBa::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. The numeric generation ID of the backup (monotonically
+ * increasing).
+ *
+ * Generated from protobuf field optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getGenerationId()
+ {
+ return isset($this->generation_id) ? $this->generation_id : 0;
+ }
+
+ public function hasGenerationId()
+ {
+ return isset($this->generation_id);
+ }
+
+ public function clearGenerationId()
+ {
+ unset($this->generation_id);
+ }
+
+ /**
+ * Output only. The numeric generation ID of the backup (monotonically
+ * increasing).
+ *
+ * Generated from protobuf field optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setGenerationId($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->generation_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when this backup object was finalized (if none,
+ * backup is not finalized).
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getFinalizeTime()
+ {
+ return $this->finalize_time;
+ }
+
+ public function hasFinalizeTime()
+ {
+ return isset($this->finalize_time);
+ }
+
+ public function clearFinalizeTime()
+ {
+ unset($this->finalize_time);
+ }
+
+ /**
+ * Output only. The time when this backup object was finalized (if none,
+ * backup is not finalized).
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setFinalizeTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->finalize_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The earliest timestamp of data available in this Backup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getRecoveryRangeStartTime()
+ {
+ return $this->recovery_range_start_time;
+ }
+
+ public function hasRecoveryRangeStartTime()
+ {
+ return isset($this->recovery_range_start_time);
+ }
+
+ public function clearRecoveryRangeStartTime()
+ {
+ unset($this->recovery_range_start_time);
+ }
+
+ /**
+ * Optional. The earliest timestamp of data available in this Backup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setRecoveryRangeStartTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->recovery_range_start_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The latest timestamp of data available in this Backup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getRecoveryRangeEndTime()
+ {
+ return $this->recovery_range_end_time;
+ }
+
+ public function hasRecoveryRangeEndTime()
+ {
+ return isset($this->recovery_range_end_time);
+ }
+
+ public function clearRecoveryRangeEndTime()
+ {
+ unset($this->recovery_range_end_time);
+ }
+
+ /**
+ * Optional. The latest timestamp of data available in this Backup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setRecoveryRangeEndTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->recovery_range_end_time = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupApplianceLockInfo.php b/BackupDr/src/V1/BackupApplianceLockInfo.php
new file mode 100644
index 000000000000..f024d90f7bd8
--- /dev/null
+++ b/BackupDr/src/V1/BackupApplianceLockInfo.php
@@ -0,0 +1,252 @@
+google.cloud.backupdr.v1.BackupApplianceLockInfo
+ */
+class BackupApplianceLockInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The ID of the backup/recovery appliance that created this lock.
+ *
+ * Generated from protobuf field int64 backup_appliance_id = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_appliance_id = 0;
+ /**
+ * Required. The name of the backup/recovery appliance that created this lock.
+ *
+ * Generated from protobuf field string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_appliance_name = '';
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $lock_reason = '';
+ protected $lock_source;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $backup_appliance_id
+ * Required. The ID of the backup/recovery appliance that created this lock.
+ * @type string $backup_appliance_name
+ * Required. The name of the backup/recovery appliance that created this lock.
+ * @type string $lock_reason
+ * 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.
+ * @type string $job_name
+ * The job name on the backup/recovery appliance that created this lock.
+ * @type string $backup_image
+ * The image name that depends on this Backup.
+ * @type int|string $sla_id
+ * The SLA on the backup/recovery appliance that owns the lock.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The ID of the backup/recovery appliance that created this lock.
+ *
+ * Generated from protobuf field int64 backup_appliance_id = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return int|string
+ */
+ public function getBackupApplianceId()
+ {
+ return $this->backup_appliance_id;
+ }
+
+ /**
+ * Required. The ID of the backup/recovery appliance that created this lock.
+ *
+ * Generated from protobuf field int64 backup_appliance_id = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param int|string $var
+ * @return $this
+ */
+ public function setBackupApplianceId($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->backup_appliance_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The name of the backup/recovery appliance that created this lock.
+ *
+ * Generated from protobuf field string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getBackupApplianceName()
+ {
+ return $this->backup_appliance_name;
+ }
+
+ /**
+ * Required. The name of the backup/recovery appliance that created this lock.
+ *
+ * Generated from protobuf field string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupApplianceName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_appliance_name = $var;
+
+ 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.
+ *
+ * Generated from protobuf field string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getLockReason()
+ {
+ return $this->lock_reason;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setLockReason($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->lock_reason = $var;
+
+ return $this;
+ }
+
+ /**
+ * The job name on the backup/recovery appliance that created this lock.
+ *
+ * Generated from protobuf field string job_name = 6;
+ * @return string
+ */
+ public function getJobName()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasJobName()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * The job name on the backup/recovery appliance that created this lock.
+ *
+ * Generated from protobuf field string job_name = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setJobName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * The image name that depends on this Backup.
+ *
+ * Generated from protobuf field string backup_image = 7;
+ * @return string
+ */
+ public function getBackupImage()
+ {
+ return $this->readOneof(7);
+ }
+
+ public function hasBackupImage()
+ {
+ return $this->hasOneof(7);
+ }
+
+ /**
+ * The image name that depends on this Backup.
+ *
+ * Generated from protobuf field string backup_image = 7;
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupImage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(7, $var);
+
+ return $this;
+ }
+
+ /**
+ * The SLA on the backup/recovery appliance that owns the lock.
+ *
+ * Generated from protobuf field int64 sla_id = 8;
+ * @return int|string
+ */
+ public function getSlaId()
+ {
+ return $this->readOneof(8);
+ }
+
+ public function hasSlaId()
+ {
+ return $this->hasOneof(8);
+ }
+
+ /**
+ * The SLA on the backup/recovery appliance that owns the lock.
+ *
+ * Generated from protobuf field int64 sla_id = 8;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSlaId($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->writeOneof(8, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getLockSource()
+ {
+ return $this->whichOneof("lock_source");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupConfigInfo.php b/BackupDr/src/V1/BackupConfigInfo.php
new file mode 100644
index 000000000000..910ef56ebd1e
--- /dev/null
+++ b/BackupDr/src/V1/BackupConfigInfo.php
@@ -0,0 +1,235 @@
+google.cloud.backupdr.v1.BackupConfigInfo
+ */
+class BackupConfigInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. The status of the last backup to this BackupVault
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $last_backup_state = 0;
+ /**
+ * Output only. If the last backup were successful, this field has the
+ * consistency date.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $last_successful_backup_consistency_time = null;
+ /**
+ * Output only. If the last backup failed, this field has the error message.
+ *
+ * Generated from protobuf field .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $last_backup_error = null;
+ protected $backup_config;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $last_backup_state
+ * Output only. The status of the last backup to this BackupVault
+ * @type \Google\Protobuf\Timestamp $last_successful_backup_consistency_time
+ * Output only. If the last backup were successful, this field has the
+ * consistency date.
+ * @type \Google\Rpc\Status $last_backup_error
+ * Output only. If the last backup failed, this field has the error message.
+ * @type \Google\Cloud\BackupDR\V1\GcpBackupConfig $gcp_backup_config
+ * Configuration for a Google Cloud resource.
+ * @type \Google\Cloud\BackupDR\V1\BackupApplianceBackupConfig $backup_appliance_backup_config
+ * Configuration for an application backed up by a Backup Appliance.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. The status of the last backup to this BackupVault
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getLastBackupState()
+ {
+ return $this->last_backup_state;
+ }
+
+ /**
+ * Output only. The status of the last backup to this BackupVault
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setLastBackupState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupConfigInfo\LastBackupState::class);
+ $this->last_backup_state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. If the last backup were successful, this field has the
+ * consistency date.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getLastSuccessfulBackupConsistencyTime()
+ {
+ return $this->last_successful_backup_consistency_time;
+ }
+
+ public function hasLastSuccessfulBackupConsistencyTime()
+ {
+ return isset($this->last_successful_backup_consistency_time);
+ }
+
+ public function clearLastSuccessfulBackupConsistencyTime()
+ {
+ unset($this->last_successful_backup_consistency_time);
+ }
+
+ /**
+ * Output only. If the last backup were successful, this field has the
+ * consistency date.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setLastSuccessfulBackupConsistencyTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->last_successful_backup_consistency_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. If the last backup failed, this field has the error message.
+ *
+ * Generated from protobuf field .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Rpc\Status|null
+ */
+ public function getLastBackupError()
+ {
+ return $this->last_backup_error;
+ }
+
+ public function hasLastBackupError()
+ {
+ return isset($this->last_backup_error);
+ }
+
+ public function clearLastBackupError()
+ {
+ unset($this->last_backup_error);
+ }
+
+ /**
+ * Output only. If the last backup failed, this field has the error message.
+ *
+ * Generated from protobuf field .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Rpc\Status $var
+ * @return $this
+ */
+ public function setLastBackupError($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
+ $this->last_backup_error = $var;
+
+ return $this;
+ }
+
+ /**
+ * Configuration for a Google Cloud resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.GcpBackupConfig gcp_backup_config = 4;
+ * @return \Google\Cloud\BackupDR\V1\GcpBackupConfig|null
+ */
+ public function getGcpBackupConfig()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasGcpBackupConfig()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Configuration for a Google Cloud resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.GcpBackupConfig gcp_backup_config = 4;
+ * @param \Google\Cloud\BackupDR\V1\GcpBackupConfig $var
+ * @return $this
+ */
+ public function setGcpBackupConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\GcpBackupConfig::class);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Configuration for an application backed up by a Backup Appliance.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupApplianceBackupConfig backup_appliance_backup_config = 5;
+ * @return \Google\Cloud\BackupDR\V1\BackupApplianceBackupConfig|null
+ */
+ public function getBackupApplianceBackupConfig()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasBackupApplianceBackupConfig()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * Configuration for an application backed up by a Backup Appliance.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupApplianceBackupConfig backup_appliance_backup_config = 5;
+ * @param \Google\Cloud\BackupDR\V1\BackupApplianceBackupConfig $var
+ * @return $this
+ */
+ public function setBackupApplianceBackupConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupApplianceBackupConfig::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getBackupConfig()
+ {
+ return $this->whichOneof("backup_config");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupConfigInfo/LastBackupState.php b/BackupDr/src/V1/BackupConfigInfo/LastBackupState.php
new file mode 100644
index 000000000000..a451de244b95
--- /dev/null
+++ b/BackupDr/src/V1/BackupConfigInfo/LastBackupState.php
@@ -0,0 +1,78 @@
+google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState
+ */
+class LastBackupState
+{
+ /**
+ * Status not set.
+ *
+ * Generated from protobuf enum LAST_BACKUP_STATE_UNSPECIFIED = 0;
+ */
+ const LAST_BACKUP_STATE_UNSPECIFIED = 0;
+ /**
+ * The first backup has not yet completed
+ *
+ * Generated from protobuf enum FIRST_BACKUP_PENDING = 1;
+ */
+ const FIRST_BACKUP_PENDING = 1;
+ /**
+ * The most recent backup was successful
+ *
+ * Generated from protobuf enum SUCCEEDED = 2;
+ */
+ const SUCCEEDED = 2;
+ /**
+ * The most recent backup failed
+ *
+ * Generated from protobuf enum FAILED = 3;
+ */
+ const FAILED = 3;
+ /**
+ * The most recent backup could not be run/failed because of the lack of
+ * permissions
+ *
+ * Generated from protobuf enum PERMISSION_DENIED = 4;
+ */
+ const PERMISSION_DENIED = 4;
+
+ private static $valueToName = [
+ self::LAST_BACKUP_STATE_UNSPECIFIED => 'LAST_BACKUP_STATE_UNSPECIFIED',
+ self::FIRST_BACKUP_PENDING => 'FIRST_BACKUP_PENDING',
+ self::SUCCEEDED => 'SUCCEEDED',
+ self::FAILED => 'FAILED',
+ self::PERMISSION_DENIED => 'PERMISSION_DENIED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/BackupConfigState.php b/BackupDr/src/V1/BackupConfigState.php
new file mode 100644
index 000000000000..8c760774704c
--- /dev/null
+++ b/BackupDr/src/V1/BackupConfigState.php
@@ -0,0 +1,63 @@
+google.cloud.backupdr.v1.BackupConfigState
+ */
+class BackupConfigState
+{
+ /**
+ * The possible states of backup configuration.
+ * Status not set.
+ *
+ * Generated from protobuf enum BACKUP_CONFIG_STATE_UNSPECIFIED = 0;
+ */
+ const BACKUP_CONFIG_STATE_UNSPECIFIED = 0;
+ /**
+ * The data source is actively protected (i.e. there is a
+ * BackupPlanAssociation or Appliance SLA pointing to it)
+ *
+ * Generated from protobuf enum ACTIVE = 1;
+ */
+ const ACTIVE = 1;
+ /**
+ * The data source is no longer protected (but may have backups under it)
+ *
+ * Generated from protobuf enum PASSIVE = 2;
+ */
+ const PASSIVE = 2;
+
+ private static $valueToName = [
+ self::BACKUP_CONFIG_STATE_UNSPECIFIED => 'BACKUP_CONFIG_STATE_UNSPECIFIED',
+ self::ACTIVE => 'ACTIVE',
+ self::PASSIVE => 'PASSIVE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/BackupDr/src/V1/BackupLock.php b/BackupDr/src/V1/BackupLock.php
new file mode 100644
index 000000000000..16c344cda822
--- /dev/null
+++ b/BackupDr/src/V1/BackupLock.php
@@ -0,0 +1,163 @@
+google.cloud.backupdr.v1.BackupLock
+ */
+class BackupLock extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The time after which this lock is not considered valid and will
+ * no longer protect the Backup from deletion.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $lock_until_time = null;
+ protected $ClientLockInfo;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Timestamp $lock_until_time
+ * Required. The time after which this lock is not considered valid and will
+ * no longer protect the Backup from deletion.
+ * @type \Google\Cloud\BackupDR\V1\BackupApplianceLockInfo $backup_appliance_lock_info
+ * If the client is a backup and recovery appliance, this
+ * contains metadata about why the lock exists.
+ * @type \Google\Cloud\BackupDR\V1\ServiceLockInfo $service_lock_info
+ * Output only. Contains metadata about the lock exist for Google Cloud
+ * native backups.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The time after which this lock is not considered valid and will
+ * no longer protect the Backup from deletion.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getLockUntilTime()
+ {
+ return $this->lock_until_time;
+ }
+
+ public function hasLockUntilTime()
+ {
+ return isset($this->lock_until_time);
+ }
+
+ public function clearLockUntilTime()
+ {
+ unset($this->lock_until_time);
+ }
+
+ /**
+ * Required. The time after which this lock is not considered valid and will
+ * no longer protect the Backup from deletion.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setLockUntilTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->lock_until_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * If the client is a backup and recovery appliance, this
+ * contains metadata about why the lock exists.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupApplianceLockInfo backup_appliance_lock_info = 3;
+ * @return \Google\Cloud\BackupDR\V1\BackupApplianceLockInfo|null
+ */
+ public function getBackupApplianceLockInfo()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasBackupApplianceLockInfo()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * If the client is a backup and recovery appliance, this
+ * contains metadata about why the lock exists.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupApplianceLockInfo backup_appliance_lock_info = 3;
+ * @param \Google\Cloud\BackupDR\V1\BackupApplianceLockInfo $var
+ * @return $this
+ */
+ public function setBackupApplianceLockInfo($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupApplianceLockInfo::class);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Output only. Contains metadata about the lock exist for Google Cloud
+ * native backups.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Cloud\BackupDR\V1\ServiceLockInfo|null
+ */
+ public function getServiceLockInfo()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasServiceLockInfo()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Output only. Contains metadata about the lock exist for Google Cloud
+ * native backups.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Cloud\BackupDR\V1\ServiceLockInfo $var
+ * @return $this
+ */
+ public function setServiceLockInfo($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\ServiceLockInfo::class);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getClientLockInfo()
+ {
+ return $this->whichOneof("ClientLockInfo");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupPlan.php b/BackupDr/src/V1/BackupPlan.php
new file mode 100644
index 000000000000..5f4feca856b7
--- /dev/null
+++ b/BackupDr/src/V1/BackupPlan.php
@@ -0,0 +1,490 @@
+google.cloud.backupdr.v1.BackupPlan
+ */
+class BackupPlan extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. Identifier. The resource name of the `BackupPlan`.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ */
+ protected $name = '';
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $description = '';
+ /**
+ * Optional. This collection of key/value pairs allows for custom labels to be
+ * supplied by the user. Example, {"tag": "Weekly"}.
+ *
+ * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Output only. When the `BackupPlan` was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. When the `BackupPlan` was last updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Required. The backup rules for this `BackupPlan`. There must be at least
+ * one `BackupRule` message.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $backup_rules;
+ /**
+ * Output only. The `State` for the `BackupPlan`.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $state = 0;
+ /**
+ * Required. The resource type to which the `BackupPlan` will be applied.
+ * Examples include, "compute.googleapis.com/Instance" and
+ * "storage.googleapis.com/Bucket".
+ *
+ * Generated from protobuf field string resource_type = 8 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $resource_type = '';
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string etag = 9 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $etag = '';
+ /**
+ * Required. Resource name of backup vault which will be used as storage
+ * location for backups. Format:
+ * projects/{project}/locations/{location}/backupVaults/{backupvault}
+ *
+ * Generated from protobuf field string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $backup_vault = '';
+ /**
+ * Output only. The Google Cloud Platform Service Account to be used by the
+ * BackupVault for taking backups. Specify the email address of the Backup
+ * Vault Service Account.
+ *
+ * Generated from protobuf field string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $backup_vault_service_account = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Output only. Identifier. The resource name of the `BackupPlan`.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ * @type string $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.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. This collection of key/value pairs allows for custom labels to be
+ * supplied by the user. Example, {"tag": "Weekly"}.
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. When the `BackupPlan` was created.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. When the `BackupPlan` was last updated.
+ * @type array<\Google\Cloud\BackupDR\V1\BackupRule>|\Google\Protobuf\Internal\RepeatedField $backup_rules
+ * Required. The backup rules for this `BackupPlan`. There must be at least
+ * one `BackupRule` message.
+ * @type int $state
+ * Output only. The `State` for the `BackupPlan`.
+ * @type string $resource_type
+ * Required. The resource type to which the `BackupPlan` will be applied.
+ * Examples include, "compute.googleapis.com/Instance" and
+ * "storage.googleapis.com/Bucket".
+ * @type string $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.
+ * @type string $backup_vault
+ * Required. Resource name of backup vault which will be used as storage
+ * location for backups. Format:
+ * projects/{project}/locations/{location}/backupVaults/{backupvault}
+ * @type string $backup_vault_service_account
+ * Output only. The Google Cloud Platform Service Account to be used by the
+ * BackupVault for taking backups. Specify the email address of the Backup
+ * Vault Service Account.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. Identifier. The resource name of the `BackupPlan`.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Output only. Identifier. The resource name of the `BackupPlan`.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ 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.
+ *
+ * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->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.
+ *
+ * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. This collection of key/value pairs allows for custom labels to be
+ * supplied by the user. Example, {"tag": "Weekly"}.
+ *
+ * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. This collection of key/value pairs allows for custom labels to be
+ * supplied by the user. Example, {"tag": "Weekly"}.
+ *
+ * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Output only. When the `BackupPlan` was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. When the `BackupPlan` was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. When the `BackupPlan` was last updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getUpdateTime()
+ {
+ return $this->update_time;
+ }
+
+ public function hasUpdateTime()
+ {
+ return isset($this->update_time);
+ }
+
+ public function clearUpdateTime()
+ {
+ unset($this->update_time);
+ }
+
+ /**
+ * Output only. When the `BackupPlan` was last updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setUpdateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->update_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The backup rules for this `BackupPlan`. There must be at least
+ * one `BackupRule` message.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBackupRules()
+ {
+ return $this->backup_rules;
+ }
+
+ /**
+ * Required. The backup rules for this `BackupPlan`. There must be at least
+ * one `BackupRule` message.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];
+ * @param array<\Google\Cloud\BackupDR\V1\BackupRule>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBackupRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\BackupRule::class);
+ $this->backup_rules = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The `State` for the `BackupPlan`.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getState()
+ {
+ return $this->state;
+ }
+
+ /**
+ * Output only. The `State` for the `BackupPlan`.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupPlan\State::class);
+ $this->state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The resource type to which the `BackupPlan` will be applied.
+ * Examples include, "compute.googleapis.com/Instance" and
+ * "storage.googleapis.com/Bucket".
+ *
+ * Generated from protobuf field string resource_type = 8 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getResourceType()
+ {
+ return $this->resource_type;
+ }
+
+ /**
+ * Required. The resource type to which the `BackupPlan` will be applied.
+ * Examples include, "compute.googleapis.com/Instance" and
+ * "storage.googleapis.com/Bucket".
+ *
+ * Generated from protobuf field string resource_type = 8 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setResourceType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource_type = $var;
+
+ 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.
+ *
+ * Generated from protobuf field string etag = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->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.
+ *
+ * Generated from protobuf field string etag = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Resource name of backup vault which will be used as storage
+ * location for backups. Format:
+ * projects/{project}/locations/{location}/backupVaults/{backupvault}
+ *
+ * Generated from protobuf field string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getBackupVault()
+ {
+ return $this->backup_vault;
+ }
+
+ /**
+ * Required. Resource name of backup vault which will be used as storage
+ * location for backups. Format:
+ * projects/{project}/locations/{location}/backupVaults/{backupvault}
+ *
+ * Generated from protobuf field string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupVault($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_vault = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The Google Cloud Platform Service Account to be used by the
+ * BackupVault for taking backups. Specify the email address of the Backup
+ * Vault Service Account.
+ *
+ * Generated from protobuf field string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getBackupVaultServiceAccount()
+ {
+ return $this->backup_vault_service_account;
+ }
+
+ /**
+ * Output only. The Google Cloud Platform Service Account to be used by the
+ * BackupVault for taking backups. Specify the email address of the Backup
+ * Vault Service Account.
+ *
+ * Generated from protobuf field string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupVaultServiceAccount($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_vault_service_account = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupPlan/State.php b/BackupDr/src/V1/BackupPlan/State.php
new file mode 100644
index 000000000000..81636c4e541e
--- /dev/null
+++ b/BackupDr/src/V1/BackupPlan/State.php
@@ -0,0 +1,76 @@
+google.cloud.backupdr.v1.BackupPlan.State
+ */
+class State
+{
+ /**
+ * State not set.
+ *
+ * Generated from protobuf enum STATE_UNSPECIFIED = 0;
+ */
+ const STATE_UNSPECIFIED = 0;
+ /**
+ * The resource is being created.
+ *
+ * Generated from protobuf enum CREATING = 1;
+ */
+ const CREATING = 1;
+ /**
+ * The resource has been created and is fully usable.
+ *
+ * Generated from protobuf enum ACTIVE = 2;
+ */
+ const ACTIVE = 2;
+ /**
+ * The resource is being deleted.
+ *
+ * Generated from protobuf enum DELETING = 3;
+ */
+ const DELETING = 3;
+ /**
+ * The resource has been created but is not usable.
+ *
+ * Generated from protobuf enum INACTIVE = 4;
+ */
+ const INACTIVE = 4;
+
+ private static $valueToName = [
+ self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
+ self::CREATING => 'CREATING',
+ self::ACTIVE => 'ACTIVE',
+ self::DELETING => 'DELETING',
+ self::INACTIVE => 'INACTIVE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/BackupPlanAssociation.php b/BackupDr/src/V1/BackupPlanAssociation.php
new file mode 100644
index 000000000000..2a5804c13ae5
--- /dev/null
+++ b/BackupDr/src/V1/BackupPlanAssociation.php
@@ -0,0 +1,396 @@
+google.cloud.backupdr.v1.BackupPlanAssociation
+ */
+class BackupPlanAssociation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. Identifier. The resource name of BackupPlanAssociation in
+ * below format Format :
+ * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $name = '';
+ /**
+ * Optional. Resource type of workload on which backupplan is applied
+ *
+ * Generated from protobuf field string resource_type = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $resource_type = '';
+ /**
+ * Required. Immutable. Resource name of workload on which backupplan is
+ * applied
+ *
+ * Generated from protobuf field string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
+ */
+ protected $resource = '';
+ /**
+ * Required. Resource name of backup plan which needs to be applied on
+ * workload. Format:
+ * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+ *
+ * Generated from protobuf field string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $backup_plan = '';
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Output only. The BackupPlanAssociation resource state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $state = 0;
+ /**
+ * Output only. The config info related to backup rules.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $rules_config_info;
+ /**
+ * 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}
+ *
+ * Generated from protobuf field string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $data_source = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Output only. Identifier. The resource name of BackupPlanAssociation in
+ * below format Format :
+ * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+ * @type string $resource_type
+ * Optional. Resource type of workload on which backupplan is applied
+ * @type string $resource
+ * Required. Immutable. Resource name of workload on which backupplan is
+ * applied
+ * @type string $backup_plan
+ * Required. Resource name of backup plan which needs to be applied on
+ * workload. Format:
+ * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The time when the instance was created.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The time when the instance was updated.
+ * @type int $state
+ * Output only. The BackupPlanAssociation resource state.
+ * @type array<\Google\Cloud\BackupDR\V1\RuleConfigInfo>|\Google\Protobuf\Internal\RepeatedField $rules_config_info
+ * Output only. The config info related to backup rules.
+ * @type string $data_source
+ * 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}
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplanassociation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. Identifier. The resource name of BackupPlanAssociation in
+ * below format Format :
+ * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Output only. Identifier. The resource name of BackupPlanAssociation in
+ * below format Format :
+ * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource type of workload on which backupplan is applied
+ *
+ * Generated from protobuf field string resource_type = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getResourceType()
+ {
+ return $this->resource_type;
+ }
+
+ /**
+ * Optional. Resource type of workload on which backupplan is applied
+ *
+ * Generated from protobuf field string resource_type = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setResourceType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Immutable. Resource name of workload on which backupplan is
+ * applied
+ *
+ * Generated from protobuf field string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * Required. Immutable. Resource name of workload on which backupplan is
+ * applied
+ *
+ * Generated from protobuf field string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Resource name of backup plan which needs to be applied on
+ * workload. Format:
+ * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+ *
+ * Generated from protobuf field string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getBackupPlan()
+ {
+ return $this->backup_plan;
+ }
+
+ /**
+ * Required. Resource name of backup plan which needs to be applied on
+ * workload. Format:
+ * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+ *
+ * Generated from protobuf field string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupPlan($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_plan = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getUpdateTime()
+ {
+ return $this->update_time;
+ }
+
+ public function hasUpdateTime()
+ {
+ return isset($this->update_time);
+ }
+
+ public function clearUpdateTime()
+ {
+ unset($this->update_time);
+ }
+
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setUpdateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->update_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The BackupPlanAssociation resource state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getState()
+ {
+ return $this->state;
+ }
+
+ /**
+ * Output only. The BackupPlanAssociation resource state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupPlanAssociation\State::class);
+ $this->state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The config info related to backup rules.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getRulesConfigInfo()
+ {
+ return $this->rules_config_info;
+ }
+
+ /**
+ * Output only. The config info related to backup rules.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param array<\Google\Cloud\BackupDR\V1\RuleConfigInfo>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setRulesConfigInfo($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\RuleConfigInfo::class);
+ $this->rules_config_info = $arr;
+
+ return $this;
+ }
+
+ /**
+ * 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}
+ *
+ * Generated from protobuf field string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getDataSource()
+ {
+ return $this->data_source;
+ }
+
+ /**
+ * 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}
+ *
+ * Generated from protobuf field string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setDataSource($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->data_source = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupPlanAssociation/State.php b/BackupDr/src/V1/BackupPlanAssociation/State.php
new file mode 100644
index 000000000000..5b9acba42bd6
--- /dev/null
+++ b/BackupDr/src/V1/BackupPlanAssociation/State.php
@@ -0,0 +1,76 @@
+google.cloud.backupdr.v1.BackupPlanAssociation.State
+ */
+class State
+{
+ /**
+ * State not set.
+ *
+ * Generated from protobuf enum STATE_UNSPECIFIED = 0;
+ */
+ const STATE_UNSPECIFIED = 0;
+ /**
+ * The resource is being created.
+ *
+ * Generated from protobuf enum CREATING = 1;
+ */
+ const CREATING = 1;
+ /**
+ * The resource has been created and is fully usable.
+ *
+ * Generated from protobuf enum ACTIVE = 2;
+ */
+ const ACTIVE = 2;
+ /**
+ * The resource is being deleted.
+ *
+ * Generated from protobuf enum DELETING = 3;
+ */
+ const DELETING = 3;
+ /**
+ * The resource has been created but is not usable.
+ *
+ * Generated from protobuf enum INACTIVE = 4;
+ */
+ const INACTIVE = 4;
+
+ private static $valueToName = [
+ self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
+ self::CREATING => 'CREATING',
+ self::ACTIVE => 'ACTIVE',
+ self::DELETING => 'DELETING',
+ self::INACTIVE => 'INACTIVE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/BackupRule.php b/BackupDr/src/V1/BackupRule.php
new file mode 100644
index 000000000000..a66eb5362db0
--- /dev/null
+++ b/BackupDr/src/V1/BackupRule.php
@@ -0,0 +1,166 @@
+google.cloud.backupdr.v1.BackupRule
+ */
+class BackupRule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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}/.
+ *
+ * Generated from protobuf field string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
+ */
+ protected $rule_id = '';
+ /**
+ * 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.
+ *
+ * Generated from protobuf field int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_retention_days = 0;
+ protected $backup_schedule_oneof;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $rule_id
+ * 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}/.
+ * @type int $backup_retention_days
+ * 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.
+ * @type \Google\Cloud\BackupDR\V1\StandardSchedule $standard_schedule
+ * Required. Defines a schedule that runs within the confines of a defined
+ * window of time.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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}/.
+ *
+ * Generated from protobuf field string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
+ * @return string
+ */
+ public function getRuleId()
+ {
+ return $this->rule_id;
+ }
+
+ /**
+ * 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}/.
+ *
+ * Generated from protobuf field string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
+ * @param string $var
+ * @return $this
+ */
+ public function setRuleId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->rule_id = $var;
+
+ 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.
+ *
+ * Generated from protobuf field int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED];
+ * @return int
+ */
+ public function getBackupRetentionDays()
+ {
+ return $this->backup_retention_days;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED];
+ * @param int $var
+ * @return $this
+ */
+ public function setBackupRetentionDays($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->backup_retention_days = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Defines a schedule that runs within the confines of a defined
+ * window of time.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\BackupDR\V1\StandardSchedule|null
+ */
+ public function getStandardSchedule()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasStandardSchedule()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * Required. Defines a schedule that runs within the confines of a defined
+ * window of time.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\BackupDR\V1\StandardSchedule $var
+ * @return $this
+ */
+ public function setStandardSchedule($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\StandardSchedule::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getBackupScheduleOneof()
+ {
+ return $this->whichOneof("backup_schedule_oneof");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupVault.php b/BackupDr/src/V1/BackupVault.php
new file mode 100644
index 000000000000..03d965e14bae
--- /dev/null
+++ b/BackupDr/src/V1/BackupVault.php
@@ -0,0 +1,715 @@
+google.cloud.backupdr.v1.BackupVault
+ */
+class BackupVault extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ */
+ protected $name = '';
+ /**
+ * Optional. The description of the BackupVault instance (2048 characters or
+ * less).
+ *
+ * Generated from protobuf field optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $description = null;
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined:
+ *
+ * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Required. The default and minimum enforced retention for each backup within
+ * the backup vault. The enforced retention for each backup can be extended.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_minimum_enforced_retention_duration = null;
+ /**
+ * Output only. Set to true when there are no backups nested under this
+ * resource.
+ *
+ * Generated from protobuf field optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $deletable = null;
+ /**
+ * Optional. Server specified ETag for the backup vault resource to
+ * prevent simultaneous updates from overwiting each other.
+ *
+ * Generated from protobuf field optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $etag = null;
+ /**
+ * Output only. The BackupVault resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $state = 0;
+ /**
+ * Optional. Time after which the BackupVault resource is locked.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $effective_time = null;
+ /**
+ * Output only. The number of backups in this backup vault.
+ *
+ * Generated from protobuf field int64 backup_count = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $backup_count = 0;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $service_account = '';
+ /**
+ * Output only. Total size of the storage used by all backup resources.
+ *
+ * Generated from protobuf field int64 total_stored_bytes = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $total_stored_bytes = 0;
+ /**
+ * Output only. Output only
+ * Immutable after resource creation until resource deletion.
+ *
+ * Generated from protobuf field string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ */
+ protected $uid = '';
+ /**
+ * Optional. User annotations. See https://google.aip.dev/128#annotations
+ * Stores small amounts of arbitrary data.
+ *
+ * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $annotations;
+ /**
+ * Optional. Note: This field is added for future use case and will not be
+ * supported in the current release.
+ * Optional.
+ * Access restriction for the backup vault.
+ * Default value is WITHIN_ORGANIZATION if not provided during creation.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $access_restriction = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $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.
+ * @type string $description
+ * Optional. The description of the BackupVault instance (2048 characters or
+ * less).
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined:
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The time when the instance was created.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The time when the instance was updated.
+ * @type \Google\Protobuf\Duration $backup_minimum_enforced_retention_duration
+ * Required. The default and minimum enforced retention for each backup within
+ * the backup vault. The enforced retention for each backup can be extended.
+ * @type bool $deletable
+ * Output only. Set to true when there are no backups nested under this
+ * resource.
+ * @type string $etag
+ * Optional. Server specified ETag for the backup vault resource to
+ * prevent simultaneous updates from overwiting each other.
+ * @type int $state
+ * Output only. The BackupVault resource instance state.
+ * @type \Google\Protobuf\Timestamp $effective_time
+ * Optional. Time after which the BackupVault resource is locked.
+ * @type int|string $backup_count
+ * Output only. The number of backups in this backup vault.
+ * @type string $service_account
+ * 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.
+ * @type int|string $total_stored_bytes
+ * Output only. Total size of the storage used by all backup resources.
+ * @type string $uid
+ * Output only. Output only
+ * Immutable after resource creation until resource deletion.
+ * @type array|\Google\Protobuf\Internal\MapField $annotations
+ * Optional. User annotations. See https://google.aip.dev/128#annotations
+ * Stores small amounts of arbitrary data.
+ * @type int $access_restriction
+ * Optional. Note: This field is added for future use case and will not be
+ * supported in the current release.
+ * Optional.
+ * Access restriction for the backup vault.
+ * Default value is WITHIN_ORGANIZATION if not provided during creation.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The description of the BackupVault instance (2048 characters or
+ * less).
+ *
+ * Generated from protobuf field optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDescription()
+ {
+ return isset($this->description) ? $this->description : '';
+ }
+
+ public function hasDescription()
+ {
+ return isset($this->description);
+ }
+
+ public function clearDescription()
+ {
+ unset($this->description);
+ }
+
+ /**
+ * Optional. The description of the BackupVault instance (2048 characters or
+ * less).
+ *
+ * Generated from protobuf field optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined:
+ *
+ * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined:
+ *
+ * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getUpdateTime()
+ {
+ return $this->update_time;
+ }
+
+ public function hasUpdateTime()
+ {
+ return isset($this->update_time);
+ }
+
+ public function clearUpdateTime()
+ {
+ unset($this->update_time);
+ }
+
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setUpdateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->update_time = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getBackupMinimumEnforcedRetentionDuration()
+ {
+ return $this->backup_minimum_enforced_retention_duration;
+ }
+
+ public function hasBackupMinimumEnforcedRetentionDuration()
+ {
+ return isset($this->backup_minimum_enforced_retention_duration);
+ }
+
+ public function clearBackupMinimumEnforcedRetentionDuration()
+ {
+ unset($this->backup_minimum_enforced_retention_duration);
+ }
+
+ /**
+ * Required. The default and minimum enforced retention for each backup within
+ * the backup vault. The enforced retention for each backup can be extended.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setBackupMinimumEnforcedRetentionDuration($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->backup_minimum_enforced_retention_duration = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Set to true when there are no backups nested under this
+ * resource.
+ *
+ * Generated from protobuf field optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getDeletable()
+ {
+ return isset($this->deletable) ? $this->deletable : false;
+ }
+
+ public function hasDeletable()
+ {
+ return isset($this->deletable);
+ }
+
+ public function clearDeletable()
+ {
+ unset($this->deletable);
+ }
+
+ /**
+ * Output only. Set to true when there are no backups nested under this
+ * resource.
+ *
+ * Generated from protobuf field optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeletable($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deletable = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Server specified ETag for the backup vault resource to
+ * prevent simultaneous updates from overwiting each other.
+ *
+ * Generated from protobuf field optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return isset($this->etag) ? $this->etag : '';
+ }
+
+ public function hasEtag()
+ {
+ return isset($this->etag);
+ }
+
+ public function clearEtag()
+ {
+ unset($this->etag);
+ }
+
+ /**
+ * Optional. Server specified ETag for the backup vault resource to
+ * prevent simultaneous updates from overwiting each other.
+ *
+ * Generated from protobuf field optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The BackupVault resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getState()
+ {
+ return $this->state;
+ }
+
+ /**
+ * Output only. The BackupVault resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupVault\State::class);
+ $this->state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Time after which the BackupVault resource is locked.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getEffectiveTime()
+ {
+ return $this->effective_time;
+ }
+
+ public function hasEffectiveTime()
+ {
+ return isset($this->effective_time);
+ }
+
+ public function clearEffectiveTime()
+ {
+ unset($this->effective_time);
+ }
+
+ /**
+ * Optional. Time after which the BackupVault resource is locked.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setEffectiveTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->effective_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The number of backups in this backup vault.
+ *
+ * Generated from protobuf field int64 backup_count = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int|string
+ */
+ public function getBackupCount()
+ {
+ return $this->backup_count;
+ }
+
+ /**
+ * Output only. The number of backups in this backup vault.
+ *
+ * Generated from protobuf field int64 backup_count = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int|string $var
+ * @return $this
+ */
+ public function setBackupCount($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->backup_count = $var;
+
+ 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.
+ *
+ * Generated from protobuf field string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getServiceAccount()
+ {
+ return $this->service_account;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceAccount($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_account = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Total size of the storage used by all backup resources.
+ *
+ * Generated from protobuf field int64 total_stored_bytes = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int|string
+ */
+ public function getTotalStoredBytes()
+ {
+ return $this->total_stored_bytes;
+ }
+
+ /**
+ * Output only. Total size of the storage used by all backup resources.
+ *
+ * Generated from protobuf field int64 total_stored_bytes = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTotalStoredBytes($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->total_stored_bytes = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Output only
+ * Immutable after resource creation until resource deletion.
+ *
+ * Generated from protobuf field string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getUid()
+ {
+ return $this->uid;
+ }
+
+ /**
+ * Output only. Output only
+ * Immutable after resource creation until resource deletion.
+ *
+ * Generated from protobuf field string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setUid($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->uid = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. User annotations. See https://google.aip.dev/128#annotations
+ * Stores small amounts of arbitrary data.
+ *
+ * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getAnnotations()
+ {
+ return $this->annotations;
+ }
+
+ /**
+ * Optional. User annotations. See https://google.aip.dev/128#annotations
+ * Stores small amounts of arbitrary data.
+ *
+ * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setAnnotations($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->annotations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Note: This field is added for future use case and will not be
+ * supported in the current release.
+ * Optional.
+ * Access restriction for the backup vault.
+ * Default value is WITHIN_ORGANIZATION if not provided during creation.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getAccessRestriction()
+ {
+ return $this->access_restriction;
+ }
+
+ /**
+ * Optional. Note: This field is added for future use case and will not be
+ * supported in the current release.
+ * Optional.
+ * Access restriction for the backup vault.
+ * Default value is WITHIN_ORGANIZATION if not provided during creation.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setAccessRestriction($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupVault\AccessRestriction::class);
+ $this->access_restriction = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/BackupVault/AccessRestriction.php b/BackupDr/src/V1/BackupVault/AccessRestriction.php
new file mode 100644
index 000000000000..a48fa59cab20
--- /dev/null
+++ b/BackupDr/src/V1/BackupVault/AccessRestriction.php
@@ -0,0 +1,70 @@
+google.cloud.backupdr.v1.BackupVault.AccessRestriction
+ */
+class AccessRestriction
+{
+ /**
+ * Access restriction not set.
+ *
+ * Generated from protobuf enum ACCESS_RESTRICTION_UNSPECIFIED = 0;
+ */
+ const ACCESS_RESTRICTION_UNSPECIFIED = 0;
+ /**
+ * Access to or from resources outside your current project will be denied.
+ *
+ * Generated from protobuf enum WITHIN_PROJECT = 1;
+ */
+ const WITHIN_PROJECT = 1;
+ /**
+ * Access to or from resources outside your current organization will be
+ * denied.
+ *
+ * Generated from protobuf enum WITHIN_ORGANIZATION = 2;
+ */
+ const WITHIN_ORGANIZATION = 2;
+ /**
+ * No access restriction.
+ *
+ * Generated from protobuf enum UNRESTRICTED = 3;
+ */
+ const UNRESTRICTED = 3;
+
+ private static $valueToName = [
+ self::ACCESS_RESTRICTION_UNSPECIFIED => 'ACCESS_RESTRICTION_UNSPECIFIED',
+ self::WITHIN_PROJECT => 'WITHIN_PROJECT',
+ self::WITHIN_ORGANIZATION => 'WITHIN_ORGANIZATION',
+ self::UNRESTRICTED => 'UNRESTRICTED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/BackupVault/State.php b/BackupDr/src/V1/BackupVault/State.php
new file mode 100644
index 000000000000..04633e6f97d1
--- /dev/null
+++ b/BackupDr/src/V1/BackupVault/State.php
@@ -0,0 +1,76 @@
+google.cloud.backupdr.v1.BackupVault.State
+ */
+class State
+{
+ /**
+ * State not set.
+ *
+ * Generated from protobuf enum STATE_UNSPECIFIED = 0;
+ */
+ const STATE_UNSPECIFIED = 0;
+ /**
+ * The backup vault is being created.
+ *
+ * Generated from protobuf enum CREATING = 1;
+ */
+ const CREATING = 1;
+ /**
+ * The backup vault has been created and is fully usable.
+ *
+ * Generated from protobuf enum ACTIVE = 2;
+ */
+ const ACTIVE = 2;
+ /**
+ * The backup vault is being deleted.
+ *
+ * Generated from protobuf enum DELETING = 3;
+ */
+ const DELETING = 3;
+ /**
+ * The backup vault is experiencing an issue and might be unusable.
+ *
+ * Generated from protobuf enum ERROR = 4;
+ */
+ const ERROR = 4;
+
+ private static $valueToName = [
+ self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
+ self::CREATING => 'CREATING',
+ self::ACTIVE => 'ACTIVE',
+ self::DELETING => 'DELETING',
+ self::ERROR => 'ERROR',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/BackupVaultView.php b/BackupDr/src/V1/BackupVaultView.php
new file mode 100644
index 000000000000..2fb4c1492dc7
--- /dev/null
+++ b/BackupDr/src/V1/BackupVaultView.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.BackupVaultView
+ */
+class BackupVaultView
+{
+ /**
+ * If the value is not set, the default 'FULL' view is used.
+ *
+ * Generated from protobuf enum BACKUP_VAULT_VIEW_UNSPECIFIED = 0;
+ */
+ const BACKUP_VAULT_VIEW_UNSPECIFIED = 0;
+ /**
+ * Includes basic data about the Backup Vault, but not the full contents.
+ *
+ * Generated from protobuf enum BACKUP_VAULT_VIEW_BASIC = 1;
+ */
+ const BACKUP_VAULT_VIEW_BASIC = 1;
+ /**
+ * Includes all data about the Backup Vault.
+ * This is the default value (for both ListBackupVaults and GetBackupVault).
+ *
+ * Generated from protobuf enum BACKUP_VAULT_VIEW_FULL = 2;
+ */
+ const BACKUP_VAULT_VIEW_FULL = 2;
+
+ private static $valueToName = [
+ self::BACKUP_VAULT_VIEW_UNSPECIFIED => 'BACKUP_VAULT_VIEW_UNSPECIFIED',
+ self::BACKUP_VAULT_VIEW_BASIC => 'BACKUP_VAULT_VIEW_BASIC',
+ self::BACKUP_VAULT_VIEW_FULL => 'BACKUP_VAULT_VIEW_FULL',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/BackupDr/src/V1/BackupView.php b/BackupDr/src/V1/BackupView.php
new file mode 100644
index 000000000000..27ea4394600a
--- /dev/null
+++ b/BackupDr/src/V1/BackupView.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.BackupView
+ */
+class BackupView
+{
+ /**
+ * If the value is not set, the default 'FULL' view is used.
+ *
+ * Generated from protobuf enum BACKUP_VIEW_UNSPECIFIED = 0;
+ */
+ const BACKUP_VIEW_UNSPECIFIED = 0;
+ /**
+ * Includes basic data about the Backup, but not the full contents.
+ *
+ * Generated from protobuf enum BACKUP_VIEW_BASIC = 1;
+ */
+ const BACKUP_VIEW_BASIC = 1;
+ /**
+ * Includes all data about the Backup.
+ * This is the default value (for both ListBackups and GetBackup).
+ *
+ * Generated from protobuf enum BACKUP_VIEW_FULL = 2;
+ */
+ const BACKUP_VIEW_FULL = 2;
+
+ private static $valueToName = [
+ self::BACKUP_VIEW_UNSPECIFIED => 'BACKUP_VIEW_UNSPECIFIED',
+ self::BACKUP_VIEW_BASIC => 'BACKUP_VIEW_BASIC',
+ self::BACKUP_VIEW_FULL => 'BACKUP_VIEW_FULL',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/BackupDr/src/V1/BackupWindow.php b/BackupDr/src/V1/BackupWindow.php
new file mode 100644
index 000000000000..8e4da2ca5064
--- /dev/null
+++ b/BackupDr/src/V1/BackupWindow.php
@@ -0,0 +1,125 @@
+google.cloud.backupdr.v1.BackupWindow
+ */
+class BackupWindow extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field int32 start_hour_of_day = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $start_hour_of_day = 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.
+ *
+ * Generated from protobuf field int32 end_hour_of_day = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $end_hour_of_day = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $start_hour_of_day
+ * 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.
+ * @type int $end_hour_of_day
+ * 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.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field int32 start_hour_of_day = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return int
+ */
+ public function getStartHourOfDay()
+ {
+ return $this->start_hour_of_day;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field int32 start_hour_of_day = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param int $var
+ * @return $this
+ */
+ public function setStartHourOfDay($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start_hour_of_day = $var;
+
+ 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.
+ *
+ * Generated from protobuf field int32 end_hour_of_day = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return int
+ */
+ public function getEndHourOfDay()
+ {
+ return $this->end_hour_of_day;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field int32 end_hour_of_day = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param int $var
+ * @return $this
+ */
+ public function setEndHourOfDay($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end_hour_of_day = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/Client/BackupDRClient.php b/BackupDr/src/V1/Client/BackupDRClient.php
index b3150d620337..05d8d344e49c 100644
--- a/BackupDr/src/V1/Client/BackupDRClient.php
+++ b/BackupDr/src/V1/Client/BackupDRClient.php
@@ -34,11 +34,39 @@
use Google\ApiCore\Transport\TransportInterface;
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
+use Google\Cloud\BackupDR\V1\Backup;
+use Google\Cloud\BackupDR\V1\BackupPlan;
+use Google\Cloud\BackupDR\V1\BackupPlanAssociation;
+use Google\Cloud\BackupDR\V1\BackupVault;
+use Google\Cloud\BackupDR\V1\CreateBackupPlanAssociationRequest;
+use Google\Cloud\BackupDR\V1\CreateBackupPlanRequest;
+use Google\Cloud\BackupDR\V1\CreateBackupVaultRequest;
use Google\Cloud\BackupDR\V1\CreateManagementServerRequest;
+use Google\Cloud\BackupDR\V1\DataSource;
+use Google\Cloud\BackupDR\V1\DeleteBackupPlanAssociationRequest;
+use Google\Cloud\BackupDR\V1\DeleteBackupPlanRequest;
+use Google\Cloud\BackupDR\V1\DeleteBackupRequest;
+use Google\Cloud\BackupDR\V1\DeleteBackupVaultRequest;
use Google\Cloud\BackupDR\V1\DeleteManagementServerRequest;
+use Google\Cloud\BackupDR\V1\FetchUsableBackupVaultsRequest;
+use Google\Cloud\BackupDR\V1\GetBackupPlanAssociationRequest;
+use Google\Cloud\BackupDR\V1\GetBackupPlanRequest;
+use Google\Cloud\BackupDR\V1\GetBackupRequest;
+use Google\Cloud\BackupDR\V1\GetBackupVaultRequest;
+use Google\Cloud\BackupDR\V1\GetDataSourceRequest;
use Google\Cloud\BackupDR\V1\GetManagementServerRequest;
+use Google\Cloud\BackupDR\V1\ListBackupPlanAssociationsRequest;
+use Google\Cloud\BackupDR\V1\ListBackupPlansRequest;
+use Google\Cloud\BackupDR\V1\ListBackupVaultsRequest;
+use Google\Cloud\BackupDR\V1\ListBackupsRequest;
+use Google\Cloud\BackupDR\V1\ListDataSourcesRequest;
use Google\Cloud\BackupDR\V1\ListManagementServersRequest;
use Google\Cloud\BackupDR\V1\ManagementServer;
+use Google\Cloud\BackupDR\V1\RestoreBackupRequest;
+use Google\Cloud\BackupDR\V1\TriggerBackupRequest;
+use Google\Cloud\BackupDR\V1\UpdateBackupRequest;
+use Google\Cloud\BackupDR\V1\UpdateBackupVaultRequest;
+use Google\Cloud\BackupDR\V1\UpdateDataSourceRequest;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
@@ -62,10 +90,33 @@
* name, and additionally a parseName method to extract the individual identifiers
* contained within formatted names that are returned by the API.
*
+ * @method PromiseInterface createBackupPlanAsync(CreateBackupPlanRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface createBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface createBackupVaultAsync(CreateBackupVaultRequest $request, array $optionalArgs = [])
* @method PromiseInterface createManagementServerAsync(CreateManagementServerRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deleteBackupPlanAsync(DeleteBackupPlanRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deleteBackupVaultAsync(DeleteBackupVaultRequest $request, array $optionalArgs = [])
* @method PromiseInterface deleteManagementServerAsync(DeleteManagementServerRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface fetchUsableBackupVaultsAsync(FetchUsableBackupVaultsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getBackupPlanAsync(GetBackupPlanRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getBackupPlanAssociationAsync(GetBackupPlanAssociationRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getBackupVaultAsync(GetBackupVaultRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getDataSourceAsync(GetDataSourceRequest $request, array $optionalArgs = [])
* @method PromiseInterface getManagementServerAsync(GetManagementServerRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listBackupPlanAssociationsAsync(ListBackupPlanAssociationsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listBackupPlansAsync(ListBackupPlansRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listBackupVaultsAsync(ListBackupVaultsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listDataSourcesAsync(ListDataSourcesRequest $request, array $optionalArgs = [])
* @method PromiseInterface listManagementServersAsync(ListManagementServersRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface restoreBackupAsync(RestoreBackupRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface triggerBackupAsync(TriggerBackupRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface updateBackupVaultAsync(UpdateBackupVaultRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface updateDataSourceAsync(UpdateDataSourceRequest $request, array $optionalArgs = [])
* @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = [])
* @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = [])
* @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = [])
@@ -170,6 +221,119 @@ private function createOperationsClient(array $options)
return new OperationsClient($options);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a backup
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $backupvault
+ * @param string $datasource
+ * @param string $backup
+ *
+ * @return string The formatted backup resource.
+ */
+ public static function backupName(
+ string $project,
+ string $location,
+ string $backupvault,
+ string $datasource,
+ string $backup
+ ): string {
+ return self::getPathTemplate('backup')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'backupvault' => $backupvault,
+ 'datasource' => $datasource,
+ 'backup' => $backup,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a backup_plan
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $backupPlan
+ *
+ * @return string The formatted backup_plan resource.
+ */
+ public static function backupPlanName(string $project, string $location, string $backupPlan): string
+ {
+ return self::getPathTemplate('backupPlan')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'backup_plan' => $backupPlan,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * backup_plan_association resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $backupPlanAssociation
+ *
+ * @return string The formatted backup_plan_association resource.
+ */
+ public static function backupPlanAssociationName(
+ string $project,
+ string $location,
+ string $backupPlanAssociation
+ ): string {
+ return self::getPathTemplate('backupPlanAssociation')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'backup_plan_association' => $backupPlanAssociation,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a backup_vault
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $backupvault
+ *
+ * @return string The formatted backup_vault resource.
+ */
+ public static function backupVaultName(string $project, string $location, string $backupvault): string
+ {
+ return self::getPathTemplate('backupVault')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'backupvault' => $backupvault,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a data_source
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $backupvault
+ * @param string $datasource
+ *
+ * @return string The formatted data_source resource.
+ */
+ public static function dataSourceName(
+ string $project,
+ string $location,
+ string $backupvault,
+ string $datasource
+ ): string {
+ return self::getPathTemplate('dataSource')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'backupvault' => $backupvault,
+ 'datasource' => $datasource,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a location
* resource.
@@ -210,6 +374,11 @@ public static function managementServerName(string $project, string $location, s
* Parses a formatted name string and returns an associative array of the components in the name.
* The following name formats are supported:
* Template: Pattern
+ * - backup: projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}
+ * - backupPlan: projects/{project}/locations/{location}/backupPlans/{backup_plan}
+ * - backupPlanAssociation: projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}
+ * - backupVault: projects/{project}/locations/{location}/backupVaults/{backupvault}
+ * - dataSource: projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
* - location: projects/{project}/locations/{location}
* - managementServer: projects/{project}/locations/{location}/managementServers/{managementserver}
*
@@ -303,6 +472,86 @@ public function __call($method, $args)
return call_user_func_array([$this, 'startAsyncCall'], $args);
}
+ /**
+ * Create a BackupPlan
+ *
+ * The async variant is {@see BackupDRClient::createBackupPlanAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/create_backup_plan.php
+ *
+ * @param CreateBackupPlanRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function createBackupPlan(CreateBackupPlanRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('CreateBackupPlan', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Create a BackupPlanAssociation
+ *
+ * The async variant is {@see BackupDRClient::createBackupPlanAssociationAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/create_backup_plan_association.php
+ *
+ * @param CreateBackupPlanAssociationRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function createBackupPlanAssociation(
+ CreateBackupPlanAssociationRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
+ return $this->startApiCall('CreateBackupPlanAssociation', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Creates a new BackupVault in a given project and location.
+ *
+ * The async variant is {@see BackupDRClient::createBackupVaultAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/create_backup_vault.php
+ *
+ * @param CreateBackupVaultRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function createBackupVault(CreateBackupVaultRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('CreateBackupVault', $request, $callOptions)->wait();
+ }
+
/**
* Creates a new ManagementServer in a given project and location.
*
@@ -331,6 +580,112 @@ public function createManagementServer(
return $this->startApiCall('CreateManagementServer', $request, $callOptions)->wait();
}
+ /**
+ * Deletes a Backup.
+ *
+ * The async variant is {@see BackupDRClient::deleteBackupAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/delete_backup.php
+ *
+ * @param DeleteBackupRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deleteBackup(DeleteBackupRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('DeleteBackup', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Deletes a single BackupPlan.
+ *
+ * The async variant is {@see BackupDRClient::deleteBackupPlanAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/delete_backup_plan.php
+ *
+ * @param DeleteBackupPlanRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deleteBackupPlan(DeleteBackupPlanRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('DeleteBackupPlan', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Deletes a single BackupPlanAssociation.
+ *
+ * The async variant is {@see BackupDRClient::deleteBackupPlanAssociationAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/delete_backup_plan_association.php
+ *
+ * @param DeleteBackupPlanAssociationRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deleteBackupPlanAssociation(
+ DeleteBackupPlanAssociationRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
+ return $this->startApiCall('DeleteBackupPlanAssociation', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Deletes a BackupVault.
+ *
+ * The async variant is {@see BackupDRClient::deleteBackupVaultAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/delete_backup_vault.php
+ *
+ * @param DeleteBackupVaultRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deleteBackupVault(DeleteBackupVaultRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('DeleteBackupVault', $request, $callOptions)->wait();
+ }
+
/**
* Deletes a single ManagementServer.
*
@@ -359,6 +714,168 @@ public function deleteManagementServer(
return $this->startApiCall('DeleteManagementServer', $request, $callOptions)->wait();
}
+ /**
+ * FetchUsableBackupVaults lists usable BackupVaults in a given project and
+ * location. Usable BackupVault are the ones that user has
+ * backupdr.backupVaults.get permission.
+ *
+ * The async variant is {@see BackupDRClient::fetchUsableBackupVaultsAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/fetch_usable_backup_vaults.php
+ *
+ * @param FetchUsableBackupVaultsRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return PagedListResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function fetchUsableBackupVaults(
+ FetchUsableBackupVaultsRequest $request,
+ array $callOptions = []
+ ): PagedListResponse {
+ return $this->startApiCall('FetchUsableBackupVaults', $request, $callOptions);
+ }
+
+ /**
+ * Gets details of a Backup.
+ *
+ * The async variant is {@see BackupDRClient::getBackupAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/get_backup.php
+ *
+ * @param GetBackupRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return Backup
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup
+ {
+ return $this->startApiCall('GetBackup', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Gets details of a single BackupPlan.
+ *
+ * The async variant is {@see BackupDRClient::getBackupPlanAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/get_backup_plan.php
+ *
+ * @param GetBackupPlanRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return BackupPlan
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getBackupPlan(GetBackupPlanRequest $request, array $callOptions = []): BackupPlan
+ {
+ return $this->startApiCall('GetBackupPlan', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Gets details of a single BackupPlanAssociation.
+ *
+ * The async variant is {@see BackupDRClient::getBackupPlanAssociationAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/get_backup_plan_association.php
+ *
+ * @param GetBackupPlanAssociationRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return BackupPlanAssociation
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getBackupPlanAssociation(
+ GetBackupPlanAssociationRequest $request,
+ array $callOptions = []
+ ): BackupPlanAssociation {
+ return $this->startApiCall('GetBackupPlanAssociation', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Gets details of a BackupVault.
+ *
+ * The async variant is {@see BackupDRClient::getBackupVaultAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/get_backup_vault.php
+ *
+ * @param GetBackupVaultRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return BackupVault
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getBackupVault(GetBackupVaultRequest $request, array $callOptions = []): BackupVault
+ {
+ return $this->startApiCall('GetBackupVault', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Gets details of a DataSource.
+ *
+ * The async variant is {@see BackupDRClient::getDataSourceAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/get_data_source.php
+ *
+ * @param GetDataSourceRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return DataSource
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getDataSource(GetDataSourceRequest $request, array $callOptions = []): DataSource
+ {
+ return $this->startApiCall('GetDataSource', $request, $callOptions)->wait();
+ }
+
/**
* Gets details of a single ManagementServer.
*
@@ -385,6 +902,138 @@ public function getManagementServer(GetManagementServerRequest $request, array $
return $this->startApiCall('GetManagementServer', $request, $callOptions)->wait();
}
+ /**
+ * Lists BackupPlanAssociations in a given project and location.
+ *
+ * The async variant is {@see BackupDRClient::listBackupPlanAssociationsAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/list_backup_plan_associations.php
+ *
+ * @param ListBackupPlanAssociationsRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return PagedListResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function listBackupPlanAssociations(
+ ListBackupPlanAssociationsRequest $request,
+ array $callOptions = []
+ ): PagedListResponse {
+ return $this->startApiCall('ListBackupPlanAssociations', $request, $callOptions);
+ }
+
+ /**
+ * Lists BackupPlans in a given project and location.
+ *
+ * The async variant is {@see BackupDRClient::listBackupPlansAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/list_backup_plans.php
+ *
+ * @param ListBackupPlansRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return PagedListResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function listBackupPlans(ListBackupPlansRequest $request, array $callOptions = []): PagedListResponse
+ {
+ return $this->startApiCall('ListBackupPlans', $request, $callOptions);
+ }
+
+ /**
+ * Lists BackupVaults in a given project and location.
+ *
+ * The async variant is {@see BackupDRClient::listBackupVaultsAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/list_backup_vaults.php
+ *
+ * @param ListBackupVaultsRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return PagedListResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function listBackupVaults(ListBackupVaultsRequest $request, array $callOptions = []): PagedListResponse
+ {
+ return $this->startApiCall('ListBackupVaults', $request, $callOptions);
+ }
+
+ /**
+ * Lists Backups in a given project and location.
+ *
+ * The async variant is {@see BackupDRClient::listBackupsAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/list_backups.php
+ *
+ * @param ListBackupsRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return PagedListResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse
+ {
+ return $this->startApiCall('ListBackups', $request, $callOptions);
+ }
+
+ /**
+ * Lists DataSources in a given project and location.
+ *
+ * The async variant is {@see BackupDRClient::listDataSourcesAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/list_data_sources.php
+ *
+ * @param ListDataSourcesRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return PagedListResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function listDataSources(ListDataSourcesRequest $request, array $callOptions = []): PagedListResponse
+ {
+ return $this->startApiCall('ListDataSources', $request, $callOptions);
+ }
+
/**
* Lists ManagementServers in a given project and location.
*
@@ -413,6 +1062,136 @@ public function listManagementServers(
return $this->startApiCall('ListManagementServers', $request, $callOptions);
}
+ /**
+ * Restore from a Backup
+ *
+ * The async variant is {@see BackupDRClient::restoreBackupAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/restore_backup.php
+ *
+ * @param RestoreBackupRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function restoreBackup(RestoreBackupRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('RestoreBackup', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Triggers a new Backup.
+ *
+ * The async variant is {@see BackupDRClient::triggerBackupAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/trigger_backup.php
+ *
+ * @param TriggerBackupRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function triggerBackup(TriggerBackupRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('TriggerBackup', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Updates the settings of a Backup.
+ *
+ * The async variant is {@see BackupDRClient::updateBackupAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/update_backup.php
+ *
+ * @param UpdateBackupRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function updateBackup(UpdateBackupRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Updates the settings of a BackupVault.
+ *
+ * The async variant is {@see BackupDRClient::updateBackupVaultAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/update_backup_vault.php
+ *
+ * @param UpdateBackupVaultRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function updateBackupVault(UpdateBackupVaultRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('UpdateBackupVault', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Updates the settings of a DataSource.
+ *
+ * The async variant is {@see BackupDRClient::updateDataSourceAsync()} .
+ *
+ * @example samples/V1/BackupDRClient/update_data_source.php
+ *
+ * @param UpdateDataSourceRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function updateDataSource(UpdateDataSourceRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('UpdateDataSource', $request, $callOptions)->wait();
+ }
+
/**
* Gets information about a location.
*
diff --git a/BackupDr/src/V1/ComputeInstanceBackupProperties.php b/BackupDr/src/V1/ComputeInstanceBackupProperties.php
new file mode 100644
index 000000000000..8f9a6f915880
--- /dev/null
+++ b/BackupDr/src/V1/ComputeInstanceBackupProperties.php
@@ -0,0 +1,716 @@
+google.cloud.backupdr.v1.ComputeInstanceBackupProperties
+ */
+class ComputeInstanceBackupProperties extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An optional text description for the instances that are created from these
+ * properties.
+ *
+ * Generated from protobuf field optional string description = 1;
+ */
+ protected $description = null;
+ /**
+ * 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).
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Tags tags = 2;
+ */
+ protected $tags = null;
+ /**
+ * The machine type to use for instances that are created from these
+ * properties.
+ *
+ * Generated from protobuf field optional string machine_type = 3;
+ */
+ protected $machine_type = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional bool can_ip_forward = 4;
+ */
+ protected $can_ip_forward = null;
+ /**
+ * An array of network access configurations for this interface.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.NetworkInterface network_interface = 5;
+ */
+ private $network_interface;
+ /**
+ * An array of disks that are associated with the instances that are created
+ * from these properties.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AttachedDisk disk = 6;
+ */
+ private $disk;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Metadata metadata = 7;
+ */
+ protected $metadata = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.ServiceAccount service_account = 8;
+ */
+ private $service_account;
+ /**
+ * Specifies the scheduling options for the instances that are created from
+ * these properties.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling scheduling = 9;
+ */
+ protected $scheduling = null;
+ /**
+ * A list of guest accelerator cards' type and count to use for instances
+ * created from these properties.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AcceleratorConfig guest_accelerator = 10;
+ */
+ private $guest_accelerator;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string min_cpu_platform = 11;
+ */
+ protected $min_cpu_platform = null;
+ /**
+ * KeyRevocationActionType of the instance. Supported options are "STOP" and
+ * "NONE". The default value is "NONE" if it is not specified.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.KeyRevocationActionType key_revocation_action_type = 12;
+ */
+ protected $key_revocation_action_type = null;
+ /**
+ * 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
+ *
+ * Generated from protobuf field optional string source_instance = 13;
+ */
+ protected $source_instance = null;
+ /**
+ * Labels to apply to instances that are created from these properties.
+ *
+ * Generated from protobuf field map labels = 14;
+ */
+ private $labels;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $description
+ * An optional text description for the instances that are created from these
+ * properties.
+ * @type \Google\Cloud\BackupDR\V1\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).
+ * @type string $machine_type
+ * The machine type to use for instances that are created from these
+ * properties.
+ * @type bool $can_ip_forward
+ * 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.
+ * @type array<\Google\Cloud\BackupDR\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interface
+ * An array of network access configurations for this interface.
+ * @type array<\Google\Cloud\BackupDR\V1\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $disk
+ * An array of disks that are associated with the instances that are created
+ * from these properties.
+ * @type \Google\Cloud\BackupDR\V1\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.
+ * @type array<\Google\Cloud\BackupDR\V1\ServiceAccount>|\Google\Protobuf\Internal\RepeatedField $service_account
+ * 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.
+ * @type \Google\Cloud\BackupDR\V1\Scheduling $scheduling
+ * Specifies the scheduling options for the instances that are created from
+ * these properties.
+ * @type array<\Google\Cloud\BackupDR\V1\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $guest_accelerator
+ * A list of guest accelerator cards' type and count to use for instances
+ * created from these properties.
+ * @type string $min_cpu_platform
+ * 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.
+ * @type int $key_revocation_action_type
+ * KeyRevocationActionType of the instance. Supported options are "STOP" and
+ * "NONE". The default value is "NONE" if it is not specified.
+ * @type string $source_instance
+ * 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
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Labels to apply to instances that are created from these properties.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An optional text description for the instances that are created from these
+ * properties.
+ *
+ * Generated from protobuf field optional string description = 1;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return isset($this->description) ? $this->description : '';
+ }
+
+ public function hasDescription()
+ {
+ return isset($this->description);
+ }
+
+ public function clearDescription()
+ {
+ unset($this->description);
+ }
+
+ /**
+ * An optional text description for the instances that are created from these
+ * properties.
+ *
+ * Generated from protobuf field optional string description = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ 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).
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Tags tags = 2;
+ * @return \Google\Cloud\BackupDR\V1\Tags|null
+ */
+ public function getTags()
+ {
+ return $this->tags;
+ }
+
+ public function hasTags()
+ {
+ return isset($this->tags);
+ }
+
+ public function clearTags()
+ {
+ unset($this->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).
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Tags tags = 2;
+ * @param \Google\Cloud\BackupDR\V1\Tags $var
+ * @return $this
+ */
+ public function setTags($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\Tags::class);
+ $this->tags = $var;
+
+ return $this;
+ }
+
+ /**
+ * The machine type to use for instances that are created from these
+ * properties.
+ *
+ * Generated from protobuf field optional string machine_type = 3;
+ * @return string
+ */
+ public function getMachineType()
+ {
+ return isset($this->machine_type) ? $this->machine_type : '';
+ }
+
+ public function hasMachineType()
+ {
+ return isset($this->machine_type);
+ }
+
+ public function clearMachineType()
+ {
+ unset($this->machine_type);
+ }
+
+ /**
+ * The machine type to use for instances that are created from these
+ * properties.
+ *
+ * Generated from protobuf field optional string machine_type = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setMachineType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->machine_type = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional bool can_ip_forward = 4;
+ * @return bool
+ */
+ public function getCanIpForward()
+ {
+ return isset($this->can_ip_forward) ? $this->can_ip_forward : false;
+ }
+
+ public function hasCanIpForward()
+ {
+ return isset($this->can_ip_forward);
+ }
+
+ public function clearCanIpForward()
+ {
+ unset($this->can_ip_forward);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional bool can_ip_forward = 4;
+ * @param bool $var
+ * @return $this
+ */
+ public function setCanIpForward($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->can_ip_forward = $var;
+
+ return $this;
+ }
+
+ /**
+ * An array of network access configurations for this interface.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.NetworkInterface network_interface = 5;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getNetworkInterface()
+ {
+ return $this->network_interface;
+ }
+
+ /**
+ * An array of network access configurations for this interface.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.NetworkInterface network_interface = 5;
+ * @param array<\Google\Cloud\BackupDR\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setNetworkInterface($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\NetworkInterface::class);
+ $this->network_interface = $arr;
+
+ return $this;
+ }
+
+ /**
+ * An array of disks that are associated with the instances that are created
+ * from these properties.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AttachedDisk disk = 6;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDisk()
+ {
+ return $this->disk;
+ }
+
+ /**
+ * An array of disks that are associated with the instances that are created
+ * from these properties.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AttachedDisk disk = 6;
+ * @param array<\Google\Cloud\BackupDR\V1\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDisk($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\AttachedDisk::class);
+ $this->disk = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Metadata metadata = 7;
+ * @return \Google\Cloud\BackupDR\V1\Metadata|null
+ */
+ public function getMetadata()
+ {
+ return $this->metadata;
+ }
+
+ public function hasMetadata()
+ {
+ return isset($this->metadata);
+ }
+
+ public function clearMetadata()
+ {
+ unset($this->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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Metadata metadata = 7;
+ * @param \Google\Cloud\BackupDR\V1\Metadata $var
+ * @return $this
+ */
+ public function setMetadata($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\Metadata::class);
+ $this->metadata = $var;
+
+ 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.ServiceAccount service_account = 8;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getServiceAccount()
+ {
+ return $this->service_account;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.ServiceAccount service_account = 8;
+ * @param array<\Google\Cloud\BackupDR\V1\ServiceAccount>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setServiceAccount($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\ServiceAccount::class);
+ $this->service_account = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Specifies the scheduling options for the instances that are created from
+ * these properties.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling scheduling = 9;
+ * @return \Google\Cloud\BackupDR\V1\Scheduling|null
+ */
+ public function getScheduling()
+ {
+ return $this->scheduling;
+ }
+
+ public function hasScheduling()
+ {
+ return isset($this->scheduling);
+ }
+
+ public function clearScheduling()
+ {
+ unset($this->scheduling);
+ }
+
+ /**
+ * Specifies the scheduling options for the instances that are created from
+ * these properties.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling scheduling = 9;
+ * @param \Google\Cloud\BackupDR\V1\Scheduling $var
+ * @return $this
+ */
+ public function setScheduling($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\Scheduling::class);
+ $this->scheduling = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of guest accelerator cards' type and count to use for instances
+ * created from these properties.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AcceleratorConfig guest_accelerator = 10;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getGuestAccelerator()
+ {
+ return $this->guest_accelerator;
+ }
+
+ /**
+ * A list of guest accelerator cards' type and count to use for instances
+ * created from these properties.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AcceleratorConfig guest_accelerator = 10;
+ * @param array<\Google\Cloud\BackupDR\V1\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setGuestAccelerator($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\AcceleratorConfig::class);
+ $this->guest_accelerator = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field optional string min_cpu_platform = 11;
+ * @return string
+ */
+ public function getMinCpuPlatform()
+ {
+ return isset($this->min_cpu_platform) ? $this->min_cpu_platform : '';
+ }
+
+ public function hasMinCpuPlatform()
+ {
+ return isset($this->min_cpu_platform);
+ }
+
+ public function clearMinCpuPlatform()
+ {
+ unset($this->min_cpu_platform);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string min_cpu_platform = 11;
+ * @param string $var
+ * @return $this
+ */
+ public function setMinCpuPlatform($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->min_cpu_platform = $var;
+
+ return $this;
+ }
+
+ /**
+ * KeyRevocationActionType of the instance. Supported options are "STOP" and
+ * "NONE". The default value is "NONE" if it is not specified.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.KeyRevocationActionType key_revocation_action_type = 12;
+ * @return int
+ */
+ public function getKeyRevocationActionType()
+ {
+ return isset($this->key_revocation_action_type) ? $this->key_revocation_action_type : 0;
+ }
+
+ public function hasKeyRevocationActionType()
+ {
+ return isset($this->key_revocation_action_type);
+ }
+
+ public function clearKeyRevocationActionType()
+ {
+ unset($this->key_revocation_action_type);
+ }
+
+ /**
+ * KeyRevocationActionType of the instance. Supported options are "STOP" and
+ * "NONE". The default value is "NONE" if it is not specified.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.KeyRevocationActionType key_revocation_action_type = 12;
+ * @param int $var
+ * @return $this
+ */
+ public function setKeyRevocationActionType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\KeyRevocationActionType::class);
+ $this->key_revocation_action_type = $var;
+
+ 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
+ *
+ * Generated from protobuf field optional string source_instance = 13;
+ * @return string
+ */
+ public function getSourceInstance()
+ {
+ return isset($this->source_instance) ? $this->source_instance : '';
+ }
+
+ public function hasSourceInstance()
+ {
+ return isset($this->source_instance);
+ }
+
+ public function clearSourceInstance()
+ {
+ unset($this->source_instance);
+ }
+
+ /**
+ * 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
+ *
+ * Generated from protobuf field optional string source_instance = 13;
+ * @param string $var
+ * @return $this
+ */
+ public function setSourceInstance($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->source_instance = $var;
+
+ return $this;
+ }
+
+ /**
+ * Labels to apply to instances that are created from these properties.
+ *
+ * Generated from protobuf field map labels = 14;
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Labels to apply to instances that are created from these properties.
+ *
+ * Generated from protobuf field map labels = 14;
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ComputeInstanceDataSourceProperties.php b/BackupDr/src/V1/ComputeInstanceDataSourceProperties.php
new file mode 100644
index 000000000000..28fa438fe071
--- /dev/null
+++ b/BackupDr/src/V1/ComputeInstanceDataSourceProperties.php
@@ -0,0 +1,204 @@
+google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties
+ */
+class ComputeInstanceDataSourceProperties extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Name of the compute instance backed up by the datasource.
+ *
+ * Generated from protobuf field string name = 1;
+ */
+ protected $name = '';
+ /**
+ * The description of the Compute Engine instance.
+ *
+ * Generated from protobuf field string description = 2;
+ */
+ protected $description = '';
+ /**
+ * The machine type of the instance.
+ *
+ * Generated from protobuf field string machine_type = 3;
+ */
+ protected $machine_type = '';
+ /**
+ * The total number of disks attached to the Instance.
+ *
+ * Generated from protobuf field int64 total_disk_count = 4;
+ */
+ protected $total_disk_count = 0;
+ /**
+ * The sum of all the disk sizes.
+ *
+ * Generated from protobuf field int64 total_disk_size_gb = 5;
+ */
+ protected $total_disk_size_gb = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Name of the compute instance backed up by the datasource.
+ * @type string $description
+ * The description of the Compute Engine instance.
+ * @type string $machine_type
+ * The machine type of the instance.
+ * @type int|string $total_disk_count
+ * The total number of disks attached to the Instance.
+ * @type int|string $total_disk_size_gb
+ * The sum of all the disk sizes.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Name of the compute instance backed up by the datasource.
+ *
+ * Generated from protobuf field string name = 1;
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Name of the compute instance backed up by the datasource.
+ *
+ * Generated from protobuf field string name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * The description of the Compute Engine instance.
+ *
+ * Generated from protobuf field string description = 2;
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * The description of the Compute Engine instance.
+ *
+ * Generated from protobuf field string description = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * The machine type of the instance.
+ *
+ * Generated from protobuf field string machine_type = 3;
+ * @return string
+ */
+ public function getMachineType()
+ {
+ return $this->machine_type;
+ }
+
+ /**
+ * The machine type of the instance.
+ *
+ * Generated from protobuf field string machine_type = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setMachineType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->machine_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The total number of disks attached to the Instance.
+ *
+ * Generated from protobuf field int64 total_disk_count = 4;
+ * @return int|string
+ */
+ public function getTotalDiskCount()
+ {
+ return $this->total_disk_count;
+ }
+
+ /**
+ * The total number of disks attached to the Instance.
+ *
+ * Generated from protobuf field int64 total_disk_count = 4;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTotalDiskCount($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->total_disk_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * The sum of all the disk sizes.
+ *
+ * Generated from protobuf field int64 total_disk_size_gb = 5;
+ * @return int|string
+ */
+ public function getTotalDiskSizeGb()
+ {
+ return $this->total_disk_size_gb;
+ }
+
+ /**
+ * The sum of all the disk sizes.
+ *
+ * Generated from protobuf field int64 total_disk_size_gb = 5;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTotalDiskSizeGb($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->total_disk_size_gb = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ComputeInstanceRestoreProperties.php b/BackupDr/src/V1/ComputeInstanceRestoreProperties.php
new file mode 100644
index 000000000000..b5ed7b1b9feb
--- /dev/null
+++ b/BackupDr/src/V1/ComputeInstanceRestoreProperties.php
@@ -0,0 +1,1150 @@
+google.cloud.backupdr.v1.ComputeInstanceRestoreProperties
+ */
+class ComputeInstanceRestoreProperties extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the compute instance.
+ *
+ * Generated from protobuf field optional string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $name = null;
+ /**
+ * Optional. Controls for advanced machine-related behavior features.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $advanced_machine_features = null;
+ /**
+ * Optional. Allows this instance to send and receive packets with
+ * non-matching destination or source IPs.
+ *
+ * Generated from protobuf field optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $can_ip_forward = null;
+ /**
+ * Optional. Controls Confidential compute options on the instance
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $confidential_instance_config = null;
+ /**
+ * Optional. Whether the resource should be protected against deletion.
+ *
+ * Generated from protobuf field optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $deletion_protection = null;
+ /**
+ * Optional. An optional description of this resource. Provide this property
+ * when you create the resource.
+ *
+ * Generated from protobuf field optional string description = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $description = null;
+ /**
+ * Optional. Array of disks associated with this instance. Persistent disks
+ * must be created before you can assign them.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $disks;
+ /**
+ * Optional. Enables display device for the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $display_device = null;
+ /**
+ * Optional. A list of the type and count of accelerator cards attached to the
+ * instance.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $guest_accelerators;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $hostname = null;
+ /**
+ * Optional. Encrypts suspended data for an instance with a
+ * customer-managed encryption key.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $instance_encryption_key = null;
+ /**
+ * Optional. KeyRevocationActionType of the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $key_revocation_action_type = null;
+ /**
+ * Optional. Labels to apply to this instance.
+ *
+ * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Optional. Full or partial URL of the machine type resource to use for this
+ * instance.
+ *
+ * Generated from protobuf field optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $machine_type = null;
+ /**
+ * Optional. This includes custom metadata and predefined keys.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $metadata = null;
+ /**
+ * Optional. Minimum CPU platform to use for this instance.
+ *
+ * Generated from protobuf field optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $min_cpu_platform = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $network_interfaces;
+ /**
+ * Optional. Configure network performance such as egress bandwidth tier.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $network_performance_config = null;
+ /**
+ * Input only. Additional params passed with the request, but not persisted
+ * as part of resource payload.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY];
+ */
+ protected $params = null;
+ /**
+ * Optional. The private IPv6 google access type for the VM.
+ * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $private_ipv6_google_access = null;
+ /**
+ * Optional. Specifies the reservations that this instance can consume from.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AllocationAffinity allocation_affinity = 21 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allocation_affinity = null;
+ /**
+ * Optional. Resource policies applied to this instance.
+ *
+ * Generated from protobuf field repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $resource_policies;
+ /**
+ * Optional. Sets the scheduling options for this instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $scheduling = null;
+ /**
+ * Optional. A list of service accounts, with their specified scopes,
+ * authorized for this instance. Only one service account per VM instance is
+ * supported.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $service_accounts;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $tags = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the compute instance.
+ * @type \Google\Cloud\BackupDR\V1\AdvancedMachineFeatures $advanced_machine_features
+ * Optional. Controls for advanced machine-related behavior features.
+ * @type bool $can_ip_forward
+ * Optional. Allows this instance to send and receive packets with
+ * non-matching destination or source IPs.
+ * @type \Google\Cloud\BackupDR\V1\ConfidentialInstanceConfig $confidential_instance_config
+ * Optional. Controls Confidential compute options on the instance
+ * @type bool $deletion_protection
+ * Optional. Whether the resource should be protected against deletion.
+ * @type string $description
+ * Optional. An optional description of this resource. Provide this property
+ * when you create the resource.
+ * @type array<\Google\Cloud\BackupDR\V1\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $disks
+ * Optional. Array of disks associated with this instance. Persistent disks
+ * must be created before you can assign them.
+ * @type \Google\Cloud\BackupDR\V1\DisplayDevice $display_device
+ * Optional. Enables display device for the instance.
+ * @type array<\Google\Cloud\BackupDR\V1\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $guest_accelerators
+ * Optional. A list of the type and count of accelerator cards attached to the
+ * instance.
+ * @type string $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.
+ * @type \Google\Cloud\BackupDR\V1\CustomerEncryptionKey $instance_encryption_key
+ * Optional. Encrypts suspended data for an instance with a
+ * customer-managed encryption key.
+ * @type int $key_revocation_action_type
+ * Optional. KeyRevocationActionType of the instance.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. Labels to apply to this instance.
+ * @type string $machine_type
+ * Optional. Full or partial URL of the machine type resource to use for this
+ * instance.
+ * @type \Google\Cloud\BackupDR\V1\Metadata $metadata
+ * Optional. This includes custom metadata and predefined keys.
+ * @type string $min_cpu_platform
+ * Optional. Minimum CPU platform to use for this instance.
+ * @type array<\Google\Cloud\BackupDR\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces
+ * 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.
+ * @type \Google\Cloud\BackupDR\V1\NetworkPerformanceConfig $network_performance_config
+ * Optional. Configure network performance such as egress bandwidth tier.
+ * @type \Google\Cloud\BackupDR\V1\InstanceParams $params
+ * Input only. Additional params passed with the request, but not persisted
+ * as part of resource payload.
+ * @type int $private_ipv6_google_access
+ * Optional. The private IPv6 google access type for the VM.
+ * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+ * @type \Google\Cloud\BackupDR\V1\AllocationAffinity $allocation_affinity
+ * Optional. Specifies the reservations that this instance can consume from.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $resource_policies
+ * Optional. Resource policies applied to this instance.
+ * @type \Google\Cloud\BackupDR\V1\Scheduling $scheduling
+ * Optional. Sets the scheduling options for this instance.
+ * @type array<\Google\Cloud\BackupDR\V1\ServiceAccount>|\Google\Protobuf\Internal\RepeatedField $service_accounts
+ * Optional. A list of service accounts, with their specified scopes,
+ * authorized for this instance. Only one service account per VM instance is
+ * supported.
+ * @type \Google\Cloud\BackupDR\V1\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.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the compute instance.
+ *
+ * Generated from protobuf field optional string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Required. Name of the compute instance.
+ *
+ * Generated from protobuf field optional string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Controls for advanced machine-related behavior features.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\AdvancedMachineFeatures|null
+ */
+ public function getAdvancedMachineFeatures()
+ {
+ return $this->advanced_machine_features;
+ }
+
+ public function hasAdvancedMachineFeatures()
+ {
+ return isset($this->advanced_machine_features);
+ }
+
+ public function clearAdvancedMachineFeatures()
+ {
+ unset($this->advanced_machine_features);
+ }
+
+ /**
+ * Optional. Controls for advanced machine-related behavior features.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\AdvancedMachineFeatures $var
+ * @return $this
+ */
+ public function setAdvancedMachineFeatures($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\AdvancedMachineFeatures::class);
+ $this->advanced_machine_features = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Allows this instance to send and receive packets with
+ * non-matching destination or source IPs.
+ *
+ * Generated from protobuf field optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getCanIpForward()
+ {
+ return isset($this->can_ip_forward) ? $this->can_ip_forward : false;
+ }
+
+ public function hasCanIpForward()
+ {
+ return isset($this->can_ip_forward);
+ }
+
+ public function clearCanIpForward()
+ {
+ unset($this->can_ip_forward);
+ }
+
+ /**
+ * Optional. Allows this instance to send and receive packets with
+ * non-matching destination or source IPs.
+ *
+ * Generated from protobuf field optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setCanIpForward($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->can_ip_forward = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Controls Confidential compute options on the instance
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\ConfidentialInstanceConfig|null
+ */
+ public function getConfidentialInstanceConfig()
+ {
+ return $this->confidential_instance_config;
+ }
+
+ public function hasConfidentialInstanceConfig()
+ {
+ return isset($this->confidential_instance_config);
+ }
+
+ public function clearConfidentialInstanceConfig()
+ {
+ unset($this->confidential_instance_config);
+ }
+
+ /**
+ * Optional. Controls Confidential compute options on the instance
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\ConfidentialInstanceConfig $var
+ * @return $this
+ */
+ public function setConfidentialInstanceConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\ConfidentialInstanceConfig::class);
+ $this->confidential_instance_config = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Whether the resource should be protected against deletion.
+ *
+ * Generated from protobuf field optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getDeletionProtection()
+ {
+ return isset($this->deletion_protection) ? $this->deletion_protection : false;
+ }
+
+ public function hasDeletionProtection()
+ {
+ return isset($this->deletion_protection);
+ }
+
+ public function clearDeletionProtection()
+ {
+ unset($this->deletion_protection);
+ }
+
+ /**
+ * Optional. Whether the resource should be protected against deletion.
+ *
+ * Generated from protobuf field optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeletionProtection($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deletion_protection = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. An optional description of this resource. Provide this property
+ * when you create the resource.
+ *
+ * Generated from protobuf field optional string description = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDescription()
+ {
+ return isset($this->description) ? $this->description : '';
+ }
+
+ public function hasDescription()
+ {
+ return isset($this->description);
+ }
+
+ public function clearDescription()
+ {
+ unset($this->description);
+ }
+
+ /**
+ * Optional. An optional description of this resource. Provide this property
+ * when you create the resource.
+ *
+ * Generated from protobuf field optional string description = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Array of disks associated with this instance. Persistent disks
+ * must be created before you can assign them.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDisks()
+ {
+ return $this->disks;
+ }
+
+ /**
+ * Optional. Array of disks associated with this instance. Persistent disks
+ * must be created before you can assign them.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDisks($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\AttachedDisk::class);
+ $this->disks = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Enables display device for the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\DisplayDevice|null
+ */
+ public function getDisplayDevice()
+ {
+ return $this->display_device;
+ }
+
+ public function hasDisplayDevice()
+ {
+ return isset($this->display_device);
+ }
+
+ public function clearDisplayDevice()
+ {
+ unset($this->display_device);
+ }
+
+ /**
+ * Optional. Enables display device for the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\DisplayDevice $var
+ * @return $this
+ */
+ public function setDisplayDevice($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\DisplayDevice::class);
+ $this->display_device = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A list of the type and count of accelerator cards attached to the
+ * instance.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getGuestAccelerators()
+ {
+ return $this->guest_accelerators;
+ }
+
+ /**
+ * Optional. A list of the type and count of accelerator cards attached to the
+ * instance.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setGuestAccelerators($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\AcceleratorConfig::class);
+ $this->guest_accelerators = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getHostname()
+ {
+ return isset($this->hostname) ? $this->hostname : '';
+ }
+
+ public function hasHostname()
+ {
+ return isset($this->hostname);
+ }
+
+ public function clearHostname()
+ {
+ unset($this->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.
+ *
+ * Generated from protobuf field optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setHostname($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->hostname = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Encrypts suspended data for an instance with a
+ * customer-managed encryption key.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\CustomerEncryptionKey|null
+ */
+ public function getInstanceEncryptionKey()
+ {
+ return $this->instance_encryption_key;
+ }
+
+ public function hasInstanceEncryptionKey()
+ {
+ return isset($this->instance_encryption_key);
+ }
+
+ public function clearInstanceEncryptionKey()
+ {
+ unset($this->instance_encryption_key);
+ }
+
+ /**
+ * Optional. Encrypts suspended data for an instance with a
+ * customer-managed encryption key.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\CustomerEncryptionKey $var
+ * @return $this
+ */
+ public function setInstanceEncryptionKey($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\CustomerEncryptionKey::class);
+ $this->instance_encryption_key = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. KeyRevocationActionType of the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getKeyRevocationActionType()
+ {
+ return isset($this->key_revocation_action_type) ? $this->key_revocation_action_type : 0;
+ }
+
+ public function hasKeyRevocationActionType()
+ {
+ return isset($this->key_revocation_action_type);
+ }
+
+ public function clearKeyRevocationActionType()
+ {
+ unset($this->key_revocation_action_type);
+ }
+
+ /**
+ * Optional. KeyRevocationActionType of the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setKeyRevocationActionType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\KeyRevocationActionType::class);
+ $this->key_revocation_action_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Labels to apply to this instance.
+ *
+ * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. Labels to apply to this instance.
+ *
+ * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Full or partial URL of the machine type resource to use for this
+ * instance.
+ *
+ * Generated from protobuf field optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getMachineType()
+ {
+ return isset($this->machine_type) ? $this->machine_type : '';
+ }
+
+ public function hasMachineType()
+ {
+ return isset($this->machine_type);
+ }
+
+ public function clearMachineType()
+ {
+ unset($this->machine_type);
+ }
+
+ /**
+ * Optional. Full or partial URL of the machine type resource to use for this
+ * instance.
+ *
+ * Generated from protobuf field optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setMachineType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->machine_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. This includes custom metadata and predefined keys.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\Metadata|null
+ */
+ public function getMetadata()
+ {
+ return $this->metadata;
+ }
+
+ public function hasMetadata()
+ {
+ return isset($this->metadata);
+ }
+
+ public function clearMetadata()
+ {
+ unset($this->metadata);
+ }
+
+ /**
+ * Optional. This includes custom metadata and predefined keys.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\Metadata $var
+ * @return $this
+ */
+ public function setMetadata($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\Metadata::class);
+ $this->metadata = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Minimum CPU platform to use for this instance.
+ *
+ * Generated from protobuf field optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getMinCpuPlatform()
+ {
+ return isset($this->min_cpu_platform) ? $this->min_cpu_platform : '';
+ }
+
+ public function hasMinCpuPlatform()
+ {
+ return isset($this->min_cpu_platform);
+ }
+
+ public function clearMinCpuPlatform()
+ {
+ unset($this->min_cpu_platform);
+ }
+
+ /**
+ * Optional. Minimum CPU platform to use for this instance.
+ *
+ * Generated from protobuf field optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setMinCpuPlatform($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->min_cpu_platform = $var;
+
+ 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getNetworkInterfaces()
+ {
+ return $this->network_interfaces;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setNetworkInterfaces($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\NetworkInterface::class);
+ $this->network_interfaces = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Configure network performance such as egress bandwidth tier.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\NetworkPerformanceConfig|null
+ */
+ public function getNetworkPerformanceConfig()
+ {
+ return $this->network_performance_config;
+ }
+
+ public function hasNetworkPerformanceConfig()
+ {
+ return isset($this->network_performance_config);
+ }
+
+ public function clearNetworkPerformanceConfig()
+ {
+ unset($this->network_performance_config);
+ }
+
+ /**
+ * Optional. Configure network performance such as egress bandwidth tier.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\NetworkPerformanceConfig $var
+ * @return $this
+ */
+ public function setNetworkPerformanceConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\NetworkPerformanceConfig::class);
+ $this->network_performance_config = $var;
+
+ return $this;
+ }
+
+ /**
+ * Input only. Additional params passed with the request, but not persisted
+ * as part of resource payload.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY];
+ * @return \Google\Cloud\BackupDR\V1\InstanceParams|null
+ */
+ public function getParams()
+ {
+ return $this->params;
+ }
+
+ public function hasParams()
+ {
+ return isset($this->params);
+ }
+
+ public function clearParams()
+ {
+ unset($this->params);
+ }
+
+ /**
+ * Input only. Additional params passed with the request, but not persisted
+ * as part of resource payload.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY];
+ * @param \Google\Cloud\BackupDR\V1\InstanceParams $var
+ * @return $this
+ */
+ public function setParams($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\InstanceParams::class);
+ $this->params = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The private IPv6 google access type for the VM.
+ * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getPrivateIpv6GoogleAccess()
+ {
+ return isset($this->private_ipv6_google_access) ? $this->private_ipv6_google_access : 0;
+ }
+
+ public function hasPrivateIpv6GoogleAccess()
+ {
+ return isset($this->private_ipv6_google_access);
+ }
+
+ public function clearPrivateIpv6GoogleAccess()
+ {
+ unset($this->private_ipv6_google_access);
+ }
+
+ /**
+ * Optional. The private IPv6 google access type for the VM.
+ * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setPrivateIpv6GoogleAccess($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\ComputeInstanceRestoreProperties\InstancePrivateIpv6GoogleAccess::class);
+ $this->private_ipv6_google_access = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Specifies the reservations that this instance can consume from.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AllocationAffinity allocation_affinity = 21 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\AllocationAffinity|null
+ */
+ public function getAllocationAffinity()
+ {
+ return $this->allocation_affinity;
+ }
+
+ public function hasAllocationAffinity()
+ {
+ return isset($this->allocation_affinity);
+ }
+
+ public function clearAllocationAffinity()
+ {
+ unset($this->allocation_affinity);
+ }
+
+ /**
+ * Optional. Specifies the reservations that this instance can consume from.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.AllocationAffinity allocation_affinity = 21 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\AllocationAffinity $var
+ * @return $this
+ */
+ public function setAllocationAffinity($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\AllocationAffinity::class);
+ $this->allocation_affinity = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource policies applied to this instance.
+ *
+ * Generated from protobuf field repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourcePolicies()
+ {
+ return $this->resource_policies;
+ }
+
+ /**
+ * Optional. Resource policies applied to this instance.
+ *
+ * Generated from protobuf field repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourcePolicies($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->resource_policies = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Sets the scheduling options for this instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\Scheduling|null
+ */
+ public function getScheduling()
+ {
+ return $this->scheduling;
+ }
+
+ public function hasScheduling()
+ {
+ return isset($this->scheduling);
+ }
+
+ public function clearScheduling()
+ {
+ unset($this->scheduling);
+ }
+
+ /**
+ * Optional. Sets the scheduling options for this instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\Scheduling $var
+ * @return $this
+ */
+ public function setScheduling($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\Scheduling::class);
+ $this->scheduling = $var;
+
+ 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getServiceAccounts()
+ {
+ return $this->service_accounts;
+ }
+
+ /**
+ * Optional. A list of service accounts, with their specified scopes,
+ * authorized for this instance. Only one service account per VM instance is
+ * supported.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\ServiceAccount>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setServiceAccounts($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\ServiceAccount::class);
+ $this->service_accounts = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\Tags|null
+ */
+ public function getTags()
+ {
+ return $this->tags;
+ }
+
+ public function hasTags()
+ {
+ return isset($this->tags);
+ }
+
+ public function clearTags()
+ {
+ unset($this->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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\Tags $var
+ * @return $this
+ */
+ public function setTags($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\Tags::class);
+ $this->tags = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ComputeInstanceRestoreProperties/InstancePrivateIpv6GoogleAccess.php b/BackupDr/src/V1/ComputeInstanceRestoreProperties/InstancePrivateIpv6GoogleAccess.php
new file mode 100644
index 000000000000..333ed1ee11a8
--- /dev/null
+++ b/BackupDr/src/V1/ComputeInstanceRestoreProperties/InstancePrivateIpv6GoogleAccess.php
@@ -0,0 +1,76 @@
+google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess
+ */
+class InstancePrivateIpv6GoogleAccess
+{
+ /**
+ * Default value. This value is unused.
+ *
+ * Generated from protobuf enum INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0;
+ */
+ const INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0;
+ /**
+ * Each network interface inherits PrivateIpv6GoogleAccess from its
+ * subnetwork.
+ *
+ * Generated from protobuf enum INHERIT_FROM_SUBNETWORK = 1;
+ */
+ const 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.
+ *
+ * Generated from protobuf enum ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2;
+ */
+ const 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.
+ *
+ * Generated from protobuf enum ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3;
+ */
+ const ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3;
+
+ private static $valueToName = [
+ self::INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED => 'INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED',
+ self::INHERIT_FROM_SUBNETWORK => 'INHERIT_FROM_SUBNETWORK',
+ self::ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE => 'ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE',
+ self::ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE => 'ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/ComputeInstanceTargetEnvironment.php b/BackupDr/src/V1/ComputeInstanceTargetEnvironment.php
new file mode 100644
index 000000000000..6251eea36937
--- /dev/null
+++ b/BackupDr/src/V1/ComputeInstanceTargetEnvironment.php
@@ -0,0 +1,102 @@
+google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment
+ */
+class ComputeInstanceTargetEnvironment extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Target project for the Compute Engine instance.
+ *
+ * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $project = '';
+ /**
+ * Required. The zone of the Compute Engine instance.
+ *
+ * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $zone = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $project
+ * Required. Target project for the Compute Engine instance.
+ * @type string $zone
+ * Required. The zone of the Compute Engine instance.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Target project for the Compute Engine instance.
+ *
+ * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getProject()
+ {
+ return $this->project;
+ }
+
+ /**
+ * Required. Target project for the Compute Engine instance.
+ *
+ * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setProject($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->project = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The zone of the Compute Engine instance.
+ *
+ * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getZone()
+ {
+ return $this->zone;
+ }
+
+ /**
+ * Required. The zone of the Compute Engine instance.
+ *
+ * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setZone($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->zone = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ConfidentialInstanceConfig.php b/BackupDr/src/V1/ConfidentialInstanceConfig.php
new file mode 100644
index 000000000000..276f5b0eaf46
--- /dev/null
+++ b/BackupDr/src/V1/ConfidentialInstanceConfig.php
@@ -0,0 +1,81 @@
+google.cloud.backupdr.v1.ConfidentialInstanceConfig
+ */
+class ConfidentialInstanceConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Defines whether the instance should have confidential compute
+ * enabled.
+ *
+ * Generated from protobuf field optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $enable_confidential_compute = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $enable_confidential_compute
+ * Optional. Defines whether the instance should have confidential compute
+ * enabled.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Defines whether the instance should have confidential compute
+ * enabled.
+ *
+ * Generated from protobuf field optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getEnableConfidentialCompute()
+ {
+ return isset($this->enable_confidential_compute) ? $this->enable_confidential_compute : false;
+ }
+
+ public function hasEnableConfidentialCompute()
+ {
+ return isset($this->enable_confidential_compute);
+ }
+
+ public function clearEnableConfidentialCompute()
+ {
+ unset($this->enable_confidential_compute);
+ }
+
+ /**
+ * Optional. Defines whether the instance should have confidential compute
+ * enabled.
+ *
+ * Generated from protobuf field optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setEnableConfidentialCompute($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->enable_confidential_compute = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/CreateBackupPlanAssociationRequest.php b/BackupDr/src/V1/CreateBackupPlanAssociationRequest.php
new file mode 100644
index 000000000000..9462d6101471
--- /dev/null
+++ b/BackupDr/src/V1/CreateBackupPlanAssociationRequest.php
@@ -0,0 +1,252 @@
+google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest
+ */
+class CreateBackupPlanAssociationRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The backup plan association project and location in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Required. The name of the backup plan association to create. The name must
+ * be unique for the specified project and location.
+ *
+ * Generated from protobuf field string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_plan_association_id = '';
+ /**
+ * Required. The resource being created
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_plan_association = null;
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+
+ /**
+ * @param string $parent Required. The backup plan association project and location in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**. Please see
+ * {@see BackupDRClient::locationName()} for help formatting this field.
+ * @param \Google\Cloud\BackupDR\V1\BackupPlanAssociation $backupPlanAssociation Required. The resource being created
+ * @param string $backupPlanAssociationId Required. The name of the backup plan association to create. The name must
+ * be unique for the specified project and location.
+ *
+ * @return \Google\Cloud\BackupDR\V1\CreateBackupPlanAssociationRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent, \Google\Cloud\BackupDR\V1\BackupPlanAssociation $backupPlanAssociation, string $backupPlanAssociationId): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setBackupPlanAssociation($backupPlanAssociation)
+ ->setBackupPlanAssociationId($backupPlanAssociationId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The backup plan association project and location in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**.
+ * @type string $backup_plan_association_id
+ * Required. The name of the backup plan association to create. The name must
+ * be unique for the specified project and location.
+ * @type \Google\Cloud\BackupDR\V1\BackupPlanAssociation $backup_plan_association
+ * Required. The resource being created
+ * @type string $request_id
+ * 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).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplanassociation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The backup plan association project and location in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The backup plan association project and location in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The name of the backup plan association to create. The name must
+ * be unique for the specified project and location.
+ *
+ * Generated from protobuf field string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getBackupPlanAssociationId()
+ {
+ return $this->backup_plan_association_id;
+ }
+
+ /**
+ * Required. The name of the backup plan association to create. The name must
+ * be unique for the specified project and location.
+ *
+ * Generated from protobuf field string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupPlanAssociationId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_plan_association_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The resource being created
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\BackupDR\V1\BackupPlanAssociation|null
+ */
+ public function getBackupPlanAssociation()
+ {
+ return $this->backup_plan_association;
+ }
+
+ public function hasBackupPlanAssociation()
+ {
+ return isset($this->backup_plan_association);
+ }
+
+ public function clearBackupPlanAssociation()
+ {
+ unset($this->backup_plan_association);
+ }
+
+ /**
+ * Required. The resource being created
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\BackupDR\V1\BackupPlanAssociation $var
+ * @return $this
+ */
+ public function setBackupPlanAssociation($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupPlanAssociation::class);
+ $this->backup_plan_association = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/CreateBackupPlanRequest.php b/BackupDr/src/V1/CreateBackupPlanRequest.php
new file mode 100644
index 000000000000..f4eeb674fb1f
--- /dev/null
+++ b/BackupDr/src/V1/CreateBackupPlanRequest.php
@@ -0,0 +1,262 @@
+google.cloud.backupdr.v1.CreateBackupPlanRequest
+ */
+class CreateBackupPlanRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The `BackupPlan` project and location in the format
+ * `projects/{project}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * 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}/.
+ *
+ * Generated from protobuf field string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_plan_id = '';
+ /**
+ * Required. The `BackupPlan` resource object to create.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_plan = null;
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+
+ /**
+ * @param string $parent Required. The `BackupPlan` project and location in the format
+ * `projects/{project}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**. Please see
+ * {@see BackupDRClient::locationName()} for help formatting this field.
+ * @param \Google\Cloud\BackupDR\V1\BackupPlan $backupPlan Required. The `BackupPlan` resource object to create.
+ * @param string $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}/.
+ *
+ * @return \Google\Cloud\BackupDR\V1\CreateBackupPlanRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent, \Google\Cloud\BackupDR\V1\BackupPlan $backupPlan, string $backupPlanId): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setBackupPlan($backupPlan)
+ ->setBackupPlanId($backupPlanId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The `BackupPlan` project and location in the format
+ * `projects/{project}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**.
+ * @type string $backup_plan_id
+ * 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}/.
+ * @type \Google\Cloud\BackupDR\V1\BackupPlan $backup_plan
+ * Required. The `BackupPlan` resource object to create.
+ * @type string $request_id
+ * 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).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The `BackupPlan` project and location in the format
+ * `projects/{project}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The `BackupPlan` project and location in the format
+ * `projects/{project}/locations/{location}`. In Cloud BackupDR locations
+ * map to GCP regions, for example **us-central1**.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ 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}/.
+ *
+ * Generated from protobuf field string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getBackupPlanId()
+ {
+ return $this->backup_plan_id;
+ }
+
+ /**
+ * 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}/.
+ *
+ * Generated from protobuf field string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupPlanId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_plan_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The `BackupPlan` resource object to create.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\BackupDR\V1\BackupPlan|null
+ */
+ public function getBackupPlan()
+ {
+ return $this->backup_plan;
+ }
+
+ public function hasBackupPlan()
+ {
+ return isset($this->backup_plan);
+ }
+
+ public function clearBackupPlan()
+ {
+ unset($this->backup_plan);
+ }
+
+ /**
+ * Required. The `BackupPlan` resource object to create.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\BackupDR\V1\BackupPlan $var
+ * @return $this
+ */
+ public function setBackupPlan($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupPlan::class);
+ $this->backup_plan = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/CreateBackupVaultRequest.php b/BackupDr/src/V1/CreateBackupVaultRequest.php
new file mode 100644
index 000000000000..39269b8ee810
--- /dev/null
+++ b/BackupDr/src/V1/CreateBackupVaultRequest.php
@@ -0,0 +1,285 @@
+google.cloud.backupdr.v1.CreateBackupVaultRequest
+ */
+class CreateBackupVaultRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Value for parent.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * 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
+ *
+ * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_vault_id = '';
+ /**
+ * Required. The resource being created
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_vault = null;
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $parent Required. Value for parent. Please see
+ * {@see BackupDRClient::locationName()} for help formatting this field.
+ * @param \Google\Cloud\BackupDR\V1\BackupVault $backupVault Required. The resource being created
+ * @param string $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
+ *
+ * @return \Google\Cloud\BackupDR\V1\CreateBackupVaultRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent, \Google\Cloud\BackupDR\V1\BackupVault $backupVault, string $backupVaultId): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setBackupVault($backupVault)
+ ->setBackupVaultId($backupVaultId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. Value for parent.
+ * @type string $backup_vault_id
+ * 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
+ * @type \Google\Cloud\BackupDR\V1\BackupVault $backup_vault
+ * Required. The resource being created
+ * @type string $request_id
+ * 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).
+ * @type bool $validate_only
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Value for parent.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. Value for parent.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ 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
+ *
+ * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getBackupVaultId()
+ {
+ return $this->backup_vault_id;
+ }
+
+ /**
+ * 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
+ *
+ * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupVaultId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_vault_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The resource being created
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\BackupDR\V1\BackupVault|null
+ */
+ public function getBackupVault()
+ {
+ return $this->backup_vault;
+ }
+
+ public function hasBackupVault()
+ {
+ return isset($this->backup_vault);
+ }
+
+ public function clearBackupVault()
+ {
+ unset($this->backup_vault);
+ }
+
+ /**
+ * Required. The resource being created
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\BackupDR\V1\BackupVault $var
+ * @return $this
+ */
+ public function setBackupVault($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupVault::class);
+ $this->backup_vault = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/CreateManagementServerRequest.php b/BackupDr/src/V1/CreateManagementServerRequest.php
index 4f329ab68f27..a1eb23931ba0 100644
--- a/BackupDr/src/V1/CreateManagementServerRequest.php
+++ b/BackupDr/src/V1/CreateManagementServerRequest.php
@@ -17,8 +17,8 @@ class CreateManagementServerRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The management server project and location in the format
- * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR
- * locations map to GCP regions, for example **us-central1**.
+ * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
+ * locations map to Google Cloud regions, for example **us-central1**.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -56,8 +56,8 @@ class CreateManagementServerRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $parent Required. The management server project and location in the format
- * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR
- * locations map to GCP regions, for example **us-central1**. Please see
+ * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
+ * locations map to Google Cloud regions, for example **us-central1**. Please see
* {@see BackupDRClient::locationName()} for help formatting this field.
* @param \Google\Cloud\BackupDR\V1\ManagementServer $managementServer Required. A [management server
* resource][google.cloud.backupdr.v1.ManagementServer]
@@ -84,8 +84,8 @@ public static function build(string $parent, \Google\Cloud\BackupDR\V1\Managemen
*
* @type string $parent
* Required. The management server project and location in the format
- * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR
- * locations map to GCP regions, for example **us-central1**.
+ * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
+ * locations map to Google Cloud regions, for example **us-central1**.
* @type string $management_server_id
* Required. The name of the management server to create. The name must be
* unique for the specified project and location.
@@ -113,8 +113,8 @@ public function __construct($data = NULL) {
/**
* Required. The management server project and location in the format
- * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR
- * locations map to GCP regions, for example **us-central1**.
+ * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
+ * locations map to Google Cloud regions, for example **us-central1**.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -126,8 +126,8 @@ public function getParent()
/**
* Required. The management server project and location in the format
- * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR
- * locations map to GCP regions, for example **us-central1**.
+ * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
+ * locations map to Google Cloud regions, for example **us-central1**.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/BackupDr/src/V1/CustomerEncryptionKey.php b/BackupDr/src/V1/CustomerEncryptionKey.php
new file mode 100644
index 000000000000..da28ac0861a8
--- /dev/null
+++ b/BackupDr/src/V1/CustomerEncryptionKey.php
@@ -0,0 +1,205 @@
+google.cloud.backupdr.v1.CustomerEncryptionKey
+ */
+class CustomerEncryptionKey extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $kms_key_service_account = null;
+ protected $key;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $raw_key
+ * Optional. Specifies a 256-bit customer-supplied
+ * encryption key.
+ * @type string $rsa_encrypted_key
+ * Optional. RSA-wrapped 2048-bit
+ * customer-supplied encryption key to either encrypt or decrypt this
+ * resource.
+ * @type string $kms_key_name
+ * Optional. The name of the encryption key that is stored in Google Cloud
+ * KMS.
+ * @type string $kms_key_service_account
+ * 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.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Specifies a 256-bit customer-supplied
+ * encryption key.
+ *
+ * Generated from protobuf field string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getRawKey()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasRawKey()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Optional. Specifies a 256-bit customer-supplied
+ * encryption key.
+ *
+ * Generated from protobuf field string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setRawKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. RSA-wrapped 2048-bit
+ * customer-supplied encryption key to either encrypt or decrypt this
+ * resource.
+ *
+ * Generated from protobuf field string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getRsaEncryptedKey()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasRsaEncryptedKey()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Optional. RSA-wrapped 2048-bit
+ * customer-supplied encryption key to either encrypt or decrypt this
+ * resource.
+ *
+ * Generated from protobuf field string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setRsaEncryptedKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. The name of the encryption key that is stored in Google Cloud
+ * KMS.
+ *
+ * Generated from protobuf field string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getKmsKeyName()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasKmsKeyName()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Optional. The name of the encryption key that is stored in Google Cloud
+ * KMS.
+ *
+ * Generated from protobuf field string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setKmsKeyName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(3, $var);
+
+ 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.
+ *
+ * Generated from protobuf field optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getKmsKeyServiceAccount()
+ {
+ return isset($this->kms_key_service_account) ? $this->kms_key_service_account : '';
+ }
+
+ public function hasKmsKeyServiceAccount()
+ {
+ return isset($this->kms_key_service_account);
+ }
+
+ public function clearKmsKeyServiceAccount()
+ {
+ unset($this->kms_key_service_account);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setKmsKeyServiceAccount($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->kms_key_service_account = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getKey()
+ {
+ return $this->whichOneof("key");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/DataSource.php b/BackupDr/src/V1/DataSource.php
new file mode 100644
index 000000000000..5522ae4f3952
--- /dev/null
+++ b/BackupDr/src/V1/DataSource.php
@@ -0,0 +1,543 @@
+google.cloud.backupdr.v1.DataSource
+ */
+class DataSource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ */
+ protected $name = '';
+ /**
+ * Output only. The DataSource resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $state = 0;
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined:
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Number of backups in the data source.
+ *
+ * Generated from protobuf field optional int64 backup_count = 7;
+ */
+ protected $backup_count = null;
+ /**
+ * Server specified ETag for the ManagementServer resource to prevent
+ * simultaneous updates from overwiting each other.
+ *
+ * Generated from protobuf field optional string etag = 14;
+ */
+ protected $etag = null;
+ /**
+ * The number of bytes (metadata and data) stored in this datasource.
+ *
+ * Generated from protobuf field optional int64 total_stored_bytes = 23;
+ */
+ protected $total_stored_bytes = null;
+ /**
+ * Output only. The backup configuration state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $config_state = 0;
+ /**
+ * Output only. Details of how the resource is configured for backup.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $backup_config_info = null;
+ protected $source_resource;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $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.
+ * @type int $state
+ * Output only. The DataSource resource instance state.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined:
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The time when the instance was created.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The time when the instance was updated.
+ * @type int|string $backup_count
+ * Number of backups in the data source.
+ * @type string $etag
+ * Server specified ETag for the ManagementServer resource to prevent
+ * simultaneous updates from overwiting each other.
+ * @type int|string $total_stored_bytes
+ * The number of bytes (metadata and data) stored in this datasource.
+ * @type int $config_state
+ * Output only. The backup configuration state.
+ * @type \Google\Cloud\BackupDR\V1\BackupConfigInfo $backup_config_info
+ * Output only. Details of how the resource is configured for backup.
+ * @type \Google\Cloud\BackupDR\V1\DataSourceGcpResource $data_source_gcp_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.
+ * @type \Google\Cloud\BackupDR\V1\DataSourceBackupApplianceApplication $data_source_backup_appliance_application
+ * The backed up resource is a backup appliance application.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->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.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The DataSource resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getState()
+ {
+ return $this->state;
+ }
+
+ /**
+ * Output only. The DataSource resource instance state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\DataSource\State::class);
+ $this->state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined:
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. Resource labels to represent user provided metadata.
+ * No labels currently defined:
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The time when the instance was created.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getUpdateTime()
+ {
+ return $this->update_time;
+ }
+
+ public function hasUpdateTime()
+ {
+ return isset($this->update_time);
+ }
+
+ public function clearUpdateTime()
+ {
+ unset($this->update_time);
+ }
+
+ /**
+ * Output only. The time when the instance was updated.
+ *
+ * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setUpdateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->update_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Number of backups in the data source.
+ *
+ * Generated from protobuf field optional int64 backup_count = 7;
+ * @return int|string
+ */
+ public function getBackupCount()
+ {
+ return isset($this->backup_count) ? $this->backup_count : 0;
+ }
+
+ public function hasBackupCount()
+ {
+ return isset($this->backup_count);
+ }
+
+ public function clearBackupCount()
+ {
+ unset($this->backup_count);
+ }
+
+ /**
+ * Number of backups in the data source.
+ *
+ * Generated from protobuf field optional int64 backup_count = 7;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setBackupCount($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->backup_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * Server specified ETag for the ManagementServer resource to prevent
+ * simultaneous updates from overwiting each other.
+ *
+ * Generated from protobuf field optional string etag = 14;
+ * @return string
+ */
+ public function getEtag()
+ {
+ return isset($this->etag) ? $this->etag : '';
+ }
+
+ public function hasEtag()
+ {
+ return isset($this->etag);
+ }
+
+ public function clearEtag()
+ {
+ unset($this->etag);
+ }
+
+ /**
+ * Server specified ETag for the ManagementServer resource to prevent
+ * simultaneous updates from overwiting each other.
+ *
+ * Generated from protobuf field optional string etag = 14;
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * The number of bytes (metadata and data) stored in this datasource.
+ *
+ * Generated from protobuf field optional int64 total_stored_bytes = 23;
+ * @return int|string
+ */
+ public function getTotalStoredBytes()
+ {
+ return isset($this->total_stored_bytes) ? $this->total_stored_bytes : 0;
+ }
+
+ public function hasTotalStoredBytes()
+ {
+ return isset($this->total_stored_bytes);
+ }
+
+ public function clearTotalStoredBytes()
+ {
+ unset($this->total_stored_bytes);
+ }
+
+ /**
+ * The number of bytes (metadata and data) stored in this datasource.
+ *
+ * Generated from protobuf field optional int64 total_stored_bytes = 23;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTotalStoredBytes($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->total_stored_bytes = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The backup configuration state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getConfigState()
+ {
+ return $this->config_state;
+ }
+
+ /**
+ * Output only. The backup configuration state.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setConfigState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupConfigState::class);
+ $this->config_state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Details of how the resource is configured for backup.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Cloud\BackupDR\V1\BackupConfigInfo|null
+ */
+ public function getBackupConfigInfo()
+ {
+ return $this->backup_config_info;
+ }
+
+ public function hasBackupConfigInfo()
+ {
+ return isset($this->backup_config_info);
+ }
+
+ public function clearBackupConfigInfo()
+ {
+ unset($this->backup_config_info);
+ }
+
+ /**
+ * Output only. Details of how the resource is configured for backup.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Cloud\BackupDR\V1\BackupConfigInfo $var
+ * @return $this
+ */
+ public function setBackupConfigInfo($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupConfigInfo::class);
+ $this->backup_config_info = $var;
+
+ 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.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSourceGcpResource data_source_gcp_resource = 26;
+ * @return \Google\Cloud\BackupDR\V1\DataSourceGcpResource|null
+ */
+ public function getDataSourceGcpResource()
+ {
+ return $this->readOneof(26);
+ }
+
+ public function hasDataSourceGcpResource()
+ {
+ return $this->hasOneof(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.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSourceGcpResource data_source_gcp_resource = 26;
+ * @param \Google\Cloud\BackupDR\V1\DataSourceGcpResource $var
+ * @return $this
+ */
+ public function setDataSourceGcpResource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\DataSourceGcpResource::class);
+ $this->writeOneof(26, $var);
+
+ return $this;
+ }
+
+ /**
+ * The backed up resource is a backup appliance application.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27;
+ * @return \Google\Cloud\BackupDR\V1\DataSourceBackupApplianceApplication|null
+ */
+ public function getDataSourceBackupApplianceApplication()
+ {
+ return $this->readOneof(27);
+ }
+
+ public function hasDataSourceBackupApplianceApplication()
+ {
+ return $this->hasOneof(27);
+ }
+
+ /**
+ * The backed up resource is a backup appliance application.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27;
+ * @param \Google\Cloud\BackupDR\V1\DataSourceBackupApplianceApplication $var
+ * @return $this
+ */
+ public function setDataSourceBackupApplianceApplication($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\DataSourceBackupApplianceApplication::class);
+ $this->writeOneof(27, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSourceResource()
+ {
+ return $this->whichOneof("source_resource");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/DataSource/State.php b/BackupDr/src/V1/DataSource/State.php
new file mode 100644
index 000000000000..900f3b1ef95a
--- /dev/null
+++ b/BackupDr/src/V1/DataSource/State.php
@@ -0,0 +1,76 @@
+google.cloud.backupdr.v1.DataSource.State
+ */
+class State
+{
+ /**
+ * State not set.
+ *
+ * Generated from protobuf enum STATE_UNSPECIFIED = 0;
+ */
+ const STATE_UNSPECIFIED = 0;
+ /**
+ * The data source is being created.
+ *
+ * Generated from protobuf enum CREATING = 1;
+ */
+ const CREATING = 1;
+ /**
+ * The data source has been created and is fully usable.
+ *
+ * Generated from protobuf enum ACTIVE = 2;
+ */
+ const ACTIVE = 2;
+ /**
+ * The data source is being deleted.
+ *
+ * Generated from protobuf enum DELETING = 3;
+ */
+ const DELETING = 3;
+ /**
+ * The data source is experiencing an issue and might be unusable.
+ *
+ * Generated from protobuf enum ERROR = 4;
+ */
+ const ERROR = 4;
+
+ private static $valueToName = [
+ self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
+ self::CREATING => 'CREATING',
+ self::ACTIVE => 'ACTIVE',
+ self::DELETING => 'DELETING',
+ self::ERROR => 'ERROR',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/DataSourceBackupApplianceApplication.php b/BackupDr/src/V1/DataSourceBackupApplianceApplication.php
new file mode 100644
index 000000000000..07e5a34b90f2
--- /dev/null
+++ b/BackupDr/src/V1/DataSourceBackupApplianceApplication.php
@@ -0,0 +1,272 @@
+google.cloud.backupdr.v1.DataSourceBackupApplianceApplication
+ */
+class DataSourceBackupApplianceApplication extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the Application as known to the Backup Appliance.
+ *
+ * Generated from protobuf field string application_name = 1;
+ */
+ protected $application_name = '';
+ /**
+ * Appliance name.
+ *
+ * Generated from protobuf field string backup_appliance = 2;
+ */
+ protected $backup_appliance = '';
+ /**
+ * Appliance Id of the Backup Appliance.
+ *
+ * Generated from protobuf field int64 appliance_id = 3;
+ */
+ protected $appliance_id = 0;
+ /**
+ * The type of the application. e.g. VMBackup
+ *
+ * Generated from protobuf field string type = 4;
+ */
+ protected $type = '';
+ /**
+ * The appid field of the application within the Backup Appliance.
+ *
+ * Generated from protobuf field int64 application_id = 8;
+ */
+ protected $application_id = 0;
+ /**
+ * Hostname of the host where the application is running.
+ *
+ * Generated from protobuf field string hostname = 6;
+ */
+ protected $hostname = '';
+ /**
+ * Hostid of the application host.
+ *
+ * Generated from protobuf field int64 host_id = 7;
+ */
+ protected $host_id = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $application_name
+ * The name of the Application as known to the Backup Appliance.
+ * @type string $backup_appliance
+ * Appliance name.
+ * @type int|string $appliance_id
+ * Appliance Id of the Backup Appliance.
+ * @type string $type
+ * The type of the application. e.g. VMBackup
+ * @type int|string $application_id
+ * The appid field of the application within the Backup Appliance.
+ * @type string $hostname
+ * Hostname of the host where the application is running.
+ * @type int|string $host_id
+ * Hostid of the application host.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the Application as known to the Backup Appliance.
+ *
+ * Generated from protobuf field string application_name = 1;
+ * @return string
+ */
+ public function getApplicationName()
+ {
+ return $this->application_name;
+ }
+
+ /**
+ * The name of the Application as known to the Backup Appliance.
+ *
+ * Generated from protobuf field string application_name = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setApplicationName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->application_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Appliance name.
+ *
+ * Generated from protobuf field string backup_appliance = 2;
+ * @return string
+ */
+ public function getBackupAppliance()
+ {
+ return $this->backup_appliance;
+ }
+
+ /**
+ * Appliance name.
+ *
+ * Generated from protobuf field string backup_appliance = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupAppliance($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_appliance = $var;
+
+ return $this;
+ }
+
+ /**
+ * Appliance Id of the Backup Appliance.
+ *
+ * Generated from protobuf field int64 appliance_id = 3;
+ * @return int|string
+ */
+ public function getApplianceId()
+ {
+ return $this->appliance_id;
+ }
+
+ /**
+ * Appliance Id of the Backup Appliance.
+ *
+ * Generated from protobuf field int64 appliance_id = 3;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setApplianceId($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->appliance_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The type of the application. e.g. VMBackup
+ *
+ * Generated from protobuf field string type = 4;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * The type of the application. e.g. VMBackup
+ *
+ * Generated from protobuf field string type = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * The appid field of the application within the Backup Appliance.
+ *
+ * Generated from protobuf field int64 application_id = 8;
+ * @return int|string
+ */
+ public function getApplicationId()
+ {
+ return $this->application_id;
+ }
+
+ /**
+ * The appid field of the application within the Backup Appliance.
+ *
+ * Generated from protobuf field int64 application_id = 8;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setApplicationId($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->application_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Hostname of the host where the application is running.
+ *
+ * Generated from protobuf field string hostname = 6;
+ * @return string
+ */
+ public function getHostname()
+ {
+ return $this->hostname;
+ }
+
+ /**
+ * Hostname of the host where the application is running.
+ *
+ * Generated from protobuf field string hostname = 6;
+ * @param string $var
+ * @return $this
+ */
+ public function setHostname($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->hostname = $var;
+
+ return $this;
+ }
+
+ /**
+ * Hostid of the application host.
+ *
+ * Generated from protobuf field int64 host_id = 7;
+ * @return int|string
+ */
+ public function getHostId()
+ {
+ return $this->host_id;
+ }
+
+ /**
+ * Hostid of the application host.
+ *
+ * Generated from protobuf field int64 host_id = 7;
+ * @param int|string $var
+ * @return $this
+ */
+ public function setHostId($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->host_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/DataSourceGcpResource.php b/BackupDr/src/V1/DataSourceGcpResource.php
new file mode 100644
index 000000000000..dfd4a646d3ee
--- /dev/null
+++ b/BackupDr/src/V1/DataSourceGcpResource.php
@@ -0,0 +1,190 @@
+google.cloud.backupdr.v1.DataSourceGcpResource
+ */
+class DataSourceGcpResource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. Full resource pathname URL of the source Google Cloud
+ * resource.
+ *
+ * Generated from protobuf field string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $gcp_resourcename = '';
+ /**
+ * Location of the resource: //"global"/"unspecified".
+ *
+ * Generated from protobuf field string location = 2;
+ */
+ protected $location = '';
+ /**
+ * The type of the Google Cloud resource. Use the Unified Resource Type,
+ * eg. compute.googleapis.com/Instance.
+ *
+ * Generated from protobuf field string type = 3;
+ */
+ protected $type = '';
+ protected $gcp_resource_properties;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $gcp_resourcename
+ * Output only. Full resource pathname URL of the source Google Cloud
+ * resource.
+ * @type string $location
+ * Location of the resource: //"global"/"unspecified".
+ * @type string $type
+ * The type of the Google Cloud resource. Use the Unified Resource Type,
+ * eg. compute.googleapis.com/Instance.
+ * @type \Google\Cloud\BackupDR\V1\ComputeInstanceDataSourceProperties $compute_instance_datasource_properties
+ * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+ * properties that are useful at the Datasource level.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. Full resource pathname URL of the source Google Cloud
+ * resource.
+ *
+ * Generated from protobuf field string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getGcpResourcename()
+ {
+ return $this->gcp_resourcename;
+ }
+
+ /**
+ * Output only. Full resource pathname URL of the source Google Cloud
+ * resource.
+ *
+ * Generated from protobuf field string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setGcpResourcename($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->gcp_resourcename = $var;
+
+ return $this;
+ }
+
+ /**
+ * Location of the resource: //"global"/"unspecified".
+ *
+ * Generated from protobuf field string location = 2;
+ * @return string
+ */
+ public function getLocation()
+ {
+ return $this->location;
+ }
+
+ /**
+ * Location of the resource: //"global"/"unspecified".
+ *
+ * Generated from protobuf field string location = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setLocation($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->location = $var;
+
+ return $this;
+ }
+
+ /**
+ * The type of the Google Cloud resource. Use the Unified Resource Type,
+ * eg. compute.googleapis.com/Instance.
+ *
+ * Generated from protobuf field string type = 3;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * The type of the Google Cloud resource. Use the Unified Resource Type,
+ * eg. compute.googleapis.com/Instance.
+ *
+ * Generated from protobuf field string type = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+ /**
+ * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+ * properties that are useful at the Datasource level.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4;
+ * @return \Google\Cloud\BackupDR\V1\ComputeInstanceDataSourceProperties|null
+ */
+ public function getComputeInstanceDatasourceProperties()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasComputeInstanceDatasourceProperties()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+ * properties that are useful at the Datasource level.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4;
+ * @param \Google\Cloud\BackupDR\V1\ComputeInstanceDataSourceProperties $var
+ * @return $this
+ */
+ public function setComputeInstanceDatasourceProperties($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\ComputeInstanceDataSourceProperties::class);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getGcpResourceProperties()
+ {
+ return $this->whichOneof("gcp_resource_properties");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/DeleteBackupPlanAssociationRequest.php b/BackupDr/src/V1/DeleteBackupPlanAssociationRequest.php
new file mode 100644
index 000000000000..d89d4149bfa5
--- /dev/null
+++ b/BackupDr/src/V1/DeleteBackupPlanAssociationRequest.php
@@ -0,0 +1,160 @@
+google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest
+ */
+class DeleteBackupPlanAssociationRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+
+ /**
+ * @param string $name Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ * Please see {@see BackupDRClient::backupPlanAssociationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\DeleteBackupPlanAssociationRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ * @type string $request_id
+ * 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).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplanassociation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/DeleteBackupPlanRequest.php b/BackupDr/src/V1/DeleteBackupPlanRequest.php
new file mode 100644
index 000000000000..33d0f577a1de
--- /dev/null
+++ b/BackupDr/src/V1/DeleteBackupPlanRequest.php
@@ -0,0 +1,161 @@
+google.cloud.backupdr.v1.DeleteBackupPlanRequest
+ */
+class DeleteBackupPlanRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The resource name of the `BackupPlan` to delete.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+
+ /**
+ * @param string $name Required. The resource name of the `BackupPlan` to delete.
+ *
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ * Please see {@see BackupDRClient::backupPlanName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\DeleteBackupPlanRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The resource name of the `BackupPlan` to delete.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ * @type string $request_id
+ * 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).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The resource name of the `BackupPlan` to delete.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. The resource name of the `BackupPlan` to delete.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/DeleteBackupRequest.php b/BackupDr/src/V1/DeleteBackupRequest.php
new file mode 100644
index 000000000000..d3b5a8223f9c
--- /dev/null
+++ b/BackupDr/src/V1/DeleteBackupRequest.php
@@ -0,0 +1,155 @@
+google.cloud.backupdr.v1.DeleteBackupRequest
+ */
+class DeleteBackupRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the resource.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+
+ /**
+ * @param string $name Required. Name of the resource. Please see
+ * {@see BackupDRClient::backupName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\DeleteBackupRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the resource.
+ * @type string $request_id
+ * 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).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the resource.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. Name of the resource.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/DeleteBackupVaultRequest.php b/BackupDr/src/V1/DeleteBackupVaultRequest.php
new file mode 100644
index 000000000000..2408f02e4d27
--- /dev/null
+++ b/BackupDr/src/V1/DeleteBackupVaultRequest.php
@@ -0,0 +1,311 @@
+google.cloud.backupdr.v1.DeleteBackupVaultRequest
+ */
+class DeleteBackupVaultRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the resource.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+ /**
+ * Optional. If set to true, any data source from this backup vault will also
+ * be deleted.
+ *
+ * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $force = false;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string etag = 4;
+ */
+ protected $etag = '';
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+ /**
+ * Optional. If true and the BackupVault is not found, the request will
+ * succeed but no action will be taken.
+ *
+ * Generated from protobuf field bool allow_missing = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+
+ /**
+ * @param string $name Required. Name of the resource. Please see
+ * {@see BackupDRClient::backupVaultName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\DeleteBackupVaultRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the resource.
+ * @type string $request_id
+ * 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).
+ * @type bool $force
+ * Optional. If set to true, any data source from this backup vault will also
+ * be deleted.
+ * @type string $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.
+ * @type bool $validate_only
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ * @type bool $allow_missing
+ * Optional. If true and the BackupVault is not found, the request will
+ * succeed but no action will be taken.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the resource.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. Name of the resource.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, any data source from this backup vault will also
+ * be deleted.
+ *
+ * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getForce()
+ {
+ return $this->force;
+ }
+
+ /**
+ * Optional. If set to true, any data source from this backup vault will also
+ * be deleted.
+ *
+ * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setForce($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->force = $var;
+
+ 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.
+ *
+ * Generated from protobuf field string etag = 4;
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->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.
+ *
+ * Generated from protobuf field string etag = 4;
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If true and the BackupVault is not found, the request will
+ * succeed but no action will be taken.
+ *
+ * Generated from protobuf field bool allow_missing = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If true and the BackupVault is not found, the request will
+ * succeed but no action will be taken.
+ *
+ * Generated from protobuf field bool allow_missing = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/DisplayDevice.php b/BackupDr/src/V1/DisplayDevice.php
new file mode 100644
index 000000000000..fd3d2d33844d
--- /dev/null
+++ b/BackupDr/src/V1/DisplayDevice.php
@@ -0,0 +1,77 @@
+google.cloud.backupdr.v1.DisplayDevice
+ */
+class DisplayDevice extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Enables display for the Compute Engine VM
+ *
+ * Generated from protobuf field optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $enable_display = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $enable_display
+ * Optional. Enables display for the Compute Engine VM
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Enables display for the Compute Engine VM
+ *
+ * Generated from protobuf field optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getEnableDisplay()
+ {
+ return isset($this->enable_display) ? $this->enable_display : false;
+ }
+
+ public function hasEnableDisplay()
+ {
+ return isset($this->enable_display);
+ }
+
+ public function clearEnableDisplay()
+ {
+ unset($this->enable_display);
+ }
+
+ /**
+ * Optional. Enables display for the Compute Engine VM
+ *
+ * Generated from protobuf field optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setEnableDisplay($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->enable_display = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/Entry.php b/BackupDr/src/V1/Entry.php
new file mode 100644
index 000000000000..43f3558be810
--- /dev/null
+++ b/BackupDr/src/V1/Entry.php
@@ -0,0 +1,133 @@
+google.cloud.backupdr.v1.Entry
+ */
+class Entry extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Key for the metadata entry.
+ *
+ * Generated from protobuf field optional string key = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $key = null;
+ /**
+ * 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).
+ *
+ * Generated from protobuf field optional string value = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $value = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $key
+ * Optional. Key for the metadata entry.
+ * @type string $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).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Key for the metadata entry.
+ *
+ * Generated from protobuf field optional string key = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getKey()
+ {
+ return isset($this->key) ? $this->key : '';
+ }
+
+ public function hasKey()
+ {
+ return isset($this->key);
+ }
+
+ public function clearKey()
+ {
+ unset($this->key);
+ }
+
+ /**
+ * Optional. Key for the metadata entry.
+ *
+ * Generated from protobuf field optional string key = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->key = $var;
+
+ 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).
+ *
+ * Generated from protobuf field optional string value = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getValue()
+ {
+ return isset($this->value) ? $this->value : '';
+ }
+
+ public function hasValue()
+ {
+ return isset($this->value);
+ }
+
+ public function clearValue()
+ {
+ unset($this->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).
+ *
+ * Generated from protobuf field optional string value = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/FetchUsableBackupVaultsRequest.php b/BackupDr/src/V1/FetchUsableBackupVaultsRequest.php
new file mode 100644
index 000000000000..142606583a7a
--- /dev/null
+++ b/BackupDr/src/V1/FetchUsableBackupVaultsRequest.php
@@ -0,0 +1,246 @@
+google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest
+ */
+class FetchUsableBackupVaultsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+
+ /**
+ * @param string $parent Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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. Please see
+ * {@see BackupDRClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\FetchUsableBackupVaultsRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent): self
+ {
+ return (new self())
+ ->setParent($parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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.
+ * @type int $page_size
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ * @type string $page_token
+ * Optional. A token identifying a page of results the server should return.
+ * @type string $filter
+ * Optional. Filtering results.
+ * @type string $order_by
+ * Optional. Hint for how to order the results.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setPageSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->page_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getPageToken()
+ {
+ return $this->page_token;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/FetchUsableBackupVaultsResponse.php b/BackupDr/src/V1/FetchUsableBackupVaultsResponse.php
new file mode 100644
index 000000000000..058334542e91
--- /dev/null
+++ b/BackupDr/src/V1/FetchUsableBackupVaultsResponse.php
@@ -0,0 +1,159 @@
+google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse
+ */
+class FetchUsableBackupVaultsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupVault backup_vaults = 1;
+ */
+ private $backup_vaults;
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\BackupDR\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $backup_vaults
+ * 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.
+ * @type string $next_page_token
+ * A token identifying a page of results the server should return.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Locations that could not be reached.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupVault backup_vaults = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBackupVaults()
+ {
+ return $this->backup_vaults;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupVault backup_vaults = 1;
+ * @param array<\Google\Cloud\BackupDR\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBackupVaults($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\BackupVault::class);
+ $this->backup_vaults = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUnreachable($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->unreachable = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GcpBackupConfig.php b/BackupDr/src/V1/GcpBackupConfig.php
new file mode 100644
index 000000000000..5e8d78bb7496
--- /dev/null
+++ b/BackupDr/src/V1/GcpBackupConfig.php
@@ -0,0 +1,171 @@
+google.cloud.backupdr.v1.GcpBackupConfig
+ */
+class GcpBackupConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The name of the backup plan.
+ *
+ * Generated from protobuf field string backup_plan = 1 [(.google.api.resource_reference) = {
+ */
+ protected $backup_plan = '';
+ /**
+ * The description of the backup plan.
+ *
+ * Generated from protobuf field string backup_plan_description = 2;
+ */
+ protected $backup_plan_description = '';
+ /**
+ * The name of the backup plan association.
+ *
+ * Generated from protobuf field string backup_plan_association = 3 [(.google.api.resource_reference) = {
+ */
+ protected $backup_plan_association = '';
+ /**
+ * The names of the backup plan rules which point to this backupvault
+ *
+ * Generated from protobuf field repeated string backup_plan_rules = 4;
+ */
+ private $backup_plan_rules;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $backup_plan
+ * The name of the backup plan.
+ * @type string $backup_plan_description
+ * The description of the backup plan.
+ * @type string $backup_plan_association
+ * The name of the backup plan association.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $backup_plan_rules
+ * The names of the backup plan rules which point to this backupvault
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The name of the backup plan.
+ *
+ * Generated from protobuf field string backup_plan = 1 [(.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getBackupPlan()
+ {
+ return $this->backup_plan;
+ }
+
+ /**
+ * The name of the backup plan.
+ *
+ * Generated from protobuf field string backup_plan = 1 [(.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupPlan($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_plan = $var;
+
+ return $this;
+ }
+
+ /**
+ * The description of the backup plan.
+ *
+ * Generated from protobuf field string backup_plan_description = 2;
+ * @return string
+ */
+ public function getBackupPlanDescription()
+ {
+ return $this->backup_plan_description;
+ }
+
+ /**
+ * The description of the backup plan.
+ *
+ * Generated from protobuf field string backup_plan_description = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupPlanDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_plan_description = $var;
+
+ return $this;
+ }
+
+ /**
+ * The name of the backup plan association.
+ *
+ * Generated from protobuf field string backup_plan_association = 3 [(.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getBackupPlanAssociation()
+ {
+ return $this->backup_plan_association;
+ }
+
+ /**
+ * The name of the backup plan association.
+ *
+ * Generated from protobuf field string backup_plan_association = 3 [(.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setBackupPlanAssociation($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->backup_plan_association = $var;
+
+ return $this;
+ }
+
+ /**
+ * The names of the backup plan rules which point to this backupvault
+ *
+ * Generated from protobuf field repeated string backup_plan_rules = 4;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBackupPlanRules()
+ {
+ return $this->backup_plan_rules;
+ }
+
+ /**
+ * The names of the backup plan rules which point to this backupvault
+ *
+ * Generated from protobuf field repeated string backup_plan_rules = 4;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBackupPlanRules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->backup_plan_rules = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GcpResource.php b/BackupDr/src/V1/GcpResource.php
new file mode 100644
index 000000000000..dd1322beaae1
--- /dev/null
+++ b/BackupDr/src/V1/GcpResource.php
@@ -0,0 +1,139 @@
+google.cloud.backupdr.v1.GcpResource
+ */
+class GcpResource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Name of the Google Cloud resource.
+ *
+ * Generated from protobuf field string gcp_resourcename = 1;
+ */
+ protected $gcp_resourcename = '';
+ /**
+ * Location of the resource: //"global"/"unspecified".
+ *
+ * Generated from protobuf field string location = 2;
+ */
+ protected $location = '';
+ /**
+ * Type of the resource. Use the Unified Resource Type,
+ * eg. compute.googleapis.com/Instance.
+ *
+ * Generated from protobuf field string type = 3;
+ */
+ protected $type = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $gcp_resourcename
+ * Name of the Google Cloud resource.
+ * @type string $location
+ * Location of the resource: //"global"/"unspecified".
+ * @type string $type
+ * Type of the resource. Use the Unified Resource Type,
+ * eg. compute.googleapis.com/Instance.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Name of the Google Cloud resource.
+ *
+ * Generated from protobuf field string gcp_resourcename = 1;
+ * @return string
+ */
+ public function getGcpResourcename()
+ {
+ return $this->gcp_resourcename;
+ }
+
+ /**
+ * Name of the Google Cloud resource.
+ *
+ * Generated from protobuf field string gcp_resourcename = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setGcpResourcename($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->gcp_resourcename = $var;
+
+ return $this;
+ }
+
+ /**
+ * Location of the resource: //"global"/"unspecified".
+ *
+ * Generated from protobuf field string location = 2;
+ * @return string
+ */
+ public function getLocation()
+ {
+ return $this->location;
+ }
+
+ /**
+ * Location of the resource: //"global"/"unspecified".
+ *
+ * Generated from protobuf field string location = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setLocation($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->location = $var;
+
+ return $this;
+ }
+
+ /**
+ * Type of the resource. Use the Unified Resource Type,
+ * eg. compute.googleapis.com/Instance.
+ *
+ * Generated from protobuf field string type = 3;
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * Type of the resource. Use the Unified Resource Type,
+ * eg. compute.googleapis.com/Instance.
+ *
+ * Generated from protobuf field string type = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->type = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GetBackupPlanAssociationRequest.php b/BackupDr/src/V1/GetBackupPlanAssociationRequest.php
new file mode 100644
index 000000000000..e17c8ba0816d
--- /dev/null
+++ b/BackupDr/src/V1/GetBackupPlanAssociationRequest.php
@@ -0,0 +1,86 @@
+google.cloud.backupdr.v1.GetBackupPlanAssociationRequest
+ */
+class GetBackupPlanAssociationRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+
+ /**
+ * @param string $name Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ * Please see {@see BackupDRClient::backupPlanAssociationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\GetBackupPlanAssociationRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplanassociation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GetBackupPlanRequest.php b/BackupDr/src/V1/GetBackupPlanRequest.php
new file mode 100644
index 000000000000..5af2986cc0d1
--- /dev/null
+++ b/BackupDr/src/V1/GetBackupPlanRequest.php
@@ -0,0 +1,87 @@
+google.cloud.backupdr.v1.GetBackupPlanRequest
+ */
+class GetBackupPlanRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The resource name of the `BackupPlan` to retrieve.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+
+ /**
+ * @param string $name Required. The resource name of the `BackupPlan` to retrieve.
+ *
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ * Please see {@see BackupDRClient::backupPlanName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\GetBackupPlanRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The resource name of the `BackupPlan` to retrieve.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The resource name of the `BackupPlan` to retrieve.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. The resource name of the `BackupPlan` to retrieve.
+ * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GetBackupRequest.php b/BackupDr/src/V1/GetBackupRequest.php
new file mode 100644
index 000000000000..cef977871e55
--- /dev/null
+++ b/BackupDr/src/V1/GetBackupRequest.php
@@ -0,0 +1,124 @@
+google.cloud.backupdr.v1.GetBackupRequest
+ */
+class GetBackupRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $view = 0;
+
+ /**
+ * @param string $name Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+ * Please see {@see BackupDRClient::backupName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\GetBackupRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+ * @type int $view
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * resource.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getView()
+ {
+ return $this->view;
+ }
+
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setView($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupView::class);
+ $this->view = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GetBackupVaultRequest.php b/BackupDr/src/V1/GetBackupVaultRequest.php
new file mode 100644
index 000000000000..de3959298ba2
--- /dev/null
+++ b/BackupDr/src/V1/GetBackupVaultRequest.php
@@ -0,0 +1,124 @@
+google.cloud.backupdr.v1.GetBackupVaultRequest
+ */
+class GetBackupVaultRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the backupvault store resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * Vault
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $view = 0;
+
+ /**
+ * @param string $name Required. Name of the backupvault store resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+ * Please see {@see BackupDRClient::backupVaultName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\GetBackupVaultRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the backupvault store resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+ * @type int $view
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * Vault
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the backupvault store resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. Name of the backupvault store resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * Vault
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getView()
+ {
+ return $this->view;
+ }
+
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * Vault
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setView($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupVaultView::class);
+ $this->view = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GetDataSourceRequest.php b/BackupDr/src/V1/GetDataSourceRequest.php
new file mode 100644
index 000000000000..27f9c86ff9b1
--- /dev/null
+++ b/BackupDr/src/V1/GetDataSourceRequest.php
@@ -0,0 +1,86 @@
+google.cloud.backupdr.v1.GetDataSourceRequest
+ */
+class GetDataSourceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+
+ /**
+ * @param string $name Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+ * Please see {@see BackupDRClient::dataSourceName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\GetDataSourceRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. Name of the data source resource name, in the format
+ * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GetManagementServerRequest.php b/BackupDr/src/V1/GetManagementServerRequest.php
index 4787333aa02d..7c83be3986fc 100644
--- a/BackupDr/src/V1/GetManagementServerRequest.php
+++ b/BackupDr/src/V1/GetManagementServerRequest.php
@@ -17,7 +17,7 @@ class GetManagementServerRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. Name of the management server resource name, in the format
- * `projects/{project_id}/locations/{location}/managementServers/{resource_name}`
+ * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -25,7 +25,7 @@ class GetManagementServerRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $name Required. Name of the management server resource name, in the format
- * `projects/{project_id}/locations/{location}/managementServers/{resource_name}`
+ * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
* Please see {@see BackupDRClient::managementServerName()} for help formatting this field.
*
* @return \Google\Cloud\BackupDR\V1\GetManagementServerRequest
@@ -46,7 +46,7 @@ public static function build(string $name): self
*
* @type string $name
* Required. Name of the management server resource name, in the format
- * `projects/{project_id}/locations/{location}/managementServers/{resource_name}`
+ * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
* }
*/
public function __construct($data = NULL) {
@@ -56,7 +56,7 @@ public function __construct($data = NULL) {
/**
* Required. Name of the management server resource name, in the format
- * `projects/{project_id}/locations/{location}/managementServers/{resource_name}`
+ * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -68,7 +68,7 @@ public function getName()
/**
* Required. Name of the management server resource name, in the format
- * `projects/{project_id}/locations/{location}/managementServers/{resource_name}`
+ * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/BackupDr/src/V1/GuestOsFeature.php b/BackupDr/src/V1/GuestOsFeature.php
new file mode 100644
index 000000000000..93d51da05752
--- /dev/null
+++ b/BackupDr/src/V1/GuestOsFeature.php
@@ -0,0 +1,77 @@
+google.cloud.backupdr.v1.GuestOsFeature
+ */
+class GuestOsFeature extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The ID of a supported feature.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.GuestOsFeature.FeatureType type = 1;
+ */
+ protected $type = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $type
+ * The ID of a supported feature.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The ID of a supported feature.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.GuestOsFeature.FeatureType type = 1;
+ * @return int
+ */
+ public function getType()
+ {
+ return isset($this->type) ? $this->type : 0;
+ }
+
+ public function hasType()
+ {
+ return isset($this->type);
+ }
+
+ public function clearType()
+ {
+ unset($this->type);
+ }
+
+ /**
+ * The ID of a supported feature.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.GuestOsFeature.FeatureType type = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\GuestOsFeature\FeatureType::class);
+ $this->type = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/GuestOsFeature/FeatureType.php b/BackupDr/src/V1/GuestOsFeature/FeatureType.php
new file mode 100644
index 000000000000..dae448e1271f
--- /dev/null
+++ b/BackupDr/src/V1/GuestOsFeature/FeatureType.php
@@ -0,0 +1,146 @@
+google.cloud.backupdr.v1.GuestOsFeature.FeatureType
+ */
+class FeatureType
+{
+ /**
+ * Default value, which is unused.
+ *
+ * Generated from protobuf enum FEATURE_TYPE_UNSPECIFIED = 0;
+ */
+ const FEATURE_TYPE_UNSPECIFIED = 0;
+ /**
+ * VIRTIO_SCSI_MULTIQUEUE feature type.
+ *
+ * Generated from protobuf enum VIRTIO_SCSI_MULTIQUEUE = 1;
+ */
+ const VIRTIO_SCSI_MULTIQUEUE = 1;
+ /**
+ * WINDOWS feature type.
+ *
+ * Generated from protobuf enum WINDOWS = 2;
+ */
+ const WINDOWS = 2;
+ /**
+ * MULTI_IP_SUBNET feature type.
+ *
+ * Generated from protobuf enum MULTI_IP_SUBNET = 3;
+ */
+ const MULTI_IP_SUBNET = 3;
+ /**
+ * UEFI_COMPATIBLE feature type.
+ *
+ * Generated from protobuf enum UEFI_COMPATIBLE = 4;
+ */
+ const UEFI_COMPATIBLE = 4;
+ /**
+ * SECURE_BOOT feature type.
+ *
+ * Generated from protobuf enum SECURE_BOOT = 5;
+ */
+ const SECURE_BOOT = 5;
+ /**
+ * GVNIC feature type.
+ *
+ * Generated from protobuf enum GVNIC = 6;
+ */
+ const GVNIC = 6;
+ /**
+ * SEV_CAPABLE feature type.
+ *
+ * Generated from protobuf enum SEV_CAPABLE = 7;
+ */
+ const SEV_CAPABLE = 7;
+ /**
+ * BARE_METAL_LINUX_COMPATIBLE feature type.
+ *
+ * Generated from protobuf enum BARE_METAL_LINUX_COMPATIBLE = 8;
+ */
+ const BARE_METAL_LINUX_COMPATIBLE = 8;
+ /**
+ * SUSPEND_RESUME_COMPATIBLE feature type.
+ *
+ * Generated from protobuf enum SUSPEND_RESUME_COMPATIBLE = 9;
+ */
+ const SUSPEND_RESUME_COMPATIBLE = 9;
+ /**
+ * SEV_LIVE_MIGRATABLE feature type.
+ *
+ * Generated from protobuf enum SEV_LIVE_MIGRATABLE = 10;
+ */
+ const SEV_LIVE_MIGRATABLE = 10;
+ /**
+ * SEV_SNP_CAPABLE feature type.
+ *
+ * Generated from protobuf enum SEV_SNP_CAPABLE = 11;
+ */
+ const SEV_SNP_CAPABLE = 11;
+ /**
+ * TDX_CAPABLE feature type.
+ *
+ * Generated from protobuf enum TDX_CAPABLE = 12;
+ */
+ const TDX_CAPABLE = 12;
+ /**
+ * IDPF feature type.
+ *
+ * Generated from protobuf enum IDPF = 13;
+ */
+ const IDPF = 13;
+ /**
+ * SEV_LIVE_MIGRATABLE_V2 feature type.
+ *
+ * Generated from protobuf enum SEV_LIVE_MIGRATABLE_V2 = 14;
+ */
+ const SEV_LIVE_MIGRATABLE_V2 = 14;
+
+ private static $valueToName = [
+ self::FEATURE_TYPE_UNSPECIFIED => 'FEATURE_TYPE_UNSPECIFIED',
+ self::VIRTIO_SCSI_MULTIQUEUE => 'VIRTIO_SCSI_MULTIQUEUE',
+ self::WINDOWS => 'WINDOWS',
+ self::MULTI_IP_SUBNET => 'MULTI_IP_SUBNET',
+ self::UEFI_COMPATIBLE => 'UEFI_COMPATIBLE',
+ self::SECURE_BOOT => 'SECURE_BOOT',
+ self::GVNIC => 'GVNIC',
+ self::SEV_CAPABLE => 'SEV_CAPABLE',
+ self::BARE_METAL_LINUX_COMPATIBLE => 'BARE_METAL_LINUX_COMPATIBLE',
+ self::SUSPEND_RESUME_COMPATIBLE => 'SUSPEND_RESUME_COMPATIBLE',
+ self::SEV_LIVE_MIGRATABLE => 'SEV_LIVE_MIGRATABLE',
+ self::SEV_SNP_CAPABLE => 'SEV_SNP_CAPABLE',
+ self::TDX_CAPABLE => 'TDX_CAPABLE',
+ self::IDPF => 'IDPF',
+ self::SEV_LIVE_MIGRATABLE_V2 => 'SEV_LIVE_MIGRATABLE_V2',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/InstanceParams.php b/BackupDr/src/V1/InstanceParams.php
new file mode 100644
index 000000000000..525d36ec6f3d
--- /dev/null
+++ b/BackupDr/src/V1/InstanceParams.php
@@ -0,0 +1,67 @@
+google.cloud.backupdr.v1.InstanceParams
+ */
+class InstanceParams extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Resource manager tags to be bound to the instance.
+ *
+ * Generated from protobuf field map resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $resource_manager_tags;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\MapField $resource_manager_tags
+ * Optional. Resource manager tags to be bound to the instance.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Resource manager tags to be bound to the instance.
+ *
+ * Generated from protobuf field map resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getResourceManagerTags()
+ {
+ return $this->resource_manager_tags;
+ }
+
+ /**
+ * Optional. Resource manager tags to be bound to the instance.
+ *
+ * Generated from protobuf field map resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setResourceManagerTags($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->resource_manager_tags = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/KeyRevocationActionType.php b/BackupDr/src/V1/KeyRevocationActionType.php
new file mode 100644
index 000000000000..9922c9b37b07
--- /dev/null
+++ b/BackupDr/src/V1/KeyRevocationActionType.php
@@ -0,0 +1,63 @@
+google.cloud.backupdr.v1.KeyRevocationActionType
+ */
+class KeyRevocationActionType
+{
+ /**
+ * Default value. This value is unused.
+ *
+ * Generated from protobuf enum KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0;
+ */
+ const KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0;
+ /**
+ * Indicates user chose no operation.
+ *
+ * Generated from protobuf enum NONE = 1;
+ */
+ const NONE = 1;
+ /**
+ * Indicates user chose to opt for VM shutdown on key revocation.
+ *
+ * Generated from protobuf enum STOP = 2;
+ */
+ const STOP = 2;
+
+ private static $valueToName = [
+ self::KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED => 'KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED',
+ self::NONE => 'NONE',
+ self::STOP => 'STOP',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/BackupDr/src/V1/ListBackupPlanAssociationsRequest.php b/BackupDr/src/V1/ListBackupPlanAssociationsRequest.php
new file mode 100644
index 000000000000..1cd640705bf5
--- /dev/null
+++ b/BackupDr/src/V1/ListBackupPlanAssociationsRequest.php
@@ -0,0 +1,212 @@
+google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest
+ */
+class ListBackupPlanAssociationsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The project and location for which to retrieve backup Plan
+ * Associations information, in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations
+ * map to GCP regions, for example **us-central1**. To retrieve backup plan
+ * associations for all locations, use "-" for the
+ * `{location}` value.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. Filtering results
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+
+ /**
+ * @param string $parent Required. The project and location for which to retrieve backup Plan
+ * Associations information, in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations
+ * map to GCP regions, for example **us-central1**. To retrieve backup plan
+ * associations for all locations, use "-" for the
+ * `{location}` value. Please see
+ * {@see BackupDRClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\ListBackupPlanAssociationsRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent): self
+ {
+ return (new self())
+ ->setParent($parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The project and location for which to retrieve backup Plan
+ * Associations information, in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations
+ * map to GCP regions, for example **us-central1**. To retrieve backup plan
+ * associations for all locations, use "-" for the
+ * `{location}` value.
+ * @type int $page_size
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ * @type string $page_token
+ * Optional. A token identifying a page of results the server should return.
+ * @type string $filter
+ * Optional. Filtering results
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplanassociation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The project and location for which to retrieve backup Plan
+ * Associations information, in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations
+ * map to GCP regions, for example **us-central1**. To retrieve backup plan
+ * associations for all locations, use "-" for the
+ * `{location}` value.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The project and location for which to retrieve backup Plan
+ * Associations information, in the format
+ * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations
+ * map to GCP regions, for example **us-central1**. To retrieve backup plan
+ * associations for all locations, use "-" for the
+ * `{location}` value.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setPageSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->page_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getPageToken()
+ {
+ return $this->page_token;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Filtering results
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. Filtering results
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListBackupPlanAssociationsResponse.php b/BackupDr/src/V1/ListBackupPlanAssociationsResponse.php
new file mode 100644
index 000000000000..a92169b9c6c0
--- /dev/null
+++ b/BackupDr/src/V1/ListBackupPlanAssociationsResponse.php
@@ -0,0 +1,159 @@
+google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse
+ */
+class ListBackupPlanAssociationsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupPlanAssociation backup_plan_associations = 1;
+ */
+ private $backup_plan_associations;
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\BackupDR\V1\BackupPlanAssociation>|\Google\Protobuf\Internal\RepeatedField $backup_plan_associations
+ * 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.
+ * @type string $next_page_token
+ * A token identifying a page of results the server should return.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Locations that could not be reached.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplanassociation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupPlanAssociation backup_plan_associations = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBackupPlanAssociations()
+ {
+ return $this->backup_plan_associations;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupPlanAssociation backup_plan_associations = 1;
+ * @param array<\Google\Cloud\BackupDR\V1\BackupPlanAssociation>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBackupPlanAssociations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\BackupPlanAssociation::class);
+ $this->backup_plan_associations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUnreachable($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->unreachable = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListBackupPlansRequest.php b/BackupDr/src/V1/ListBackupPlansRequest.php
new file mode 100644
index 000000000000..59cf4b63f0d6
--- /dev/null
+++ b/BackupDr/src/V1/ListBackupPlansRequest.php
@@ -0,0 +1,277 @@
+google.cloud.backupdr.v1.ListBackupPlansRequest
+ */
+class ListBackupPlansRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The project and location for which to retrieve `BackupPlans`
+ * information. Format: `projects/{project}/locations/{location}`. In Cloud
+ * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To
+ * retrieve backup plans for all locations, use "-" for the
+ * `{location}` value.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * 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.v1.ListBackupPlansResponse.next_page_token]
+ * to determine if there are more instances left to be queried.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. The value of
+ * [next_page_token][google.cloud.backupdr.v1.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.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. Field match expression used to filter the results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+ /**
+ * Optional. Field by which to sort the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+
+ /**
+ * @param string $parent Required. The project and location for which to retrieve `BackupPlans`
+ * information. Format: `projects/{project}/locations/{location}`. In Cloud
+ * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To
+ * retrieve backup plans for all locations, use "-" for the
+ * `{location}` value. Please see
+ * {@see BackupDRClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\ListBackupPlansRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent): self
+ {
+ return (new self())
+ ->setParent($parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The project and location for which to retrieve `BackupPlans`
+ * information. Format: `projects/{project}/locations/{location}`. In Cloud
+ * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To
+ * retrieve backup plans for all locations, use "-" for the
+ * `{location}` value.
+ * @type int $page_size
+ * 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.v1.ListBackupPlansResponse.next_page_token]
+ * to determine if there are more instances left to be queried.
+ * @type string $page_token
+ * Optional. The value of
+ * [next_page_token][google.cloud.backupdr.v1.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.
+ * @type string $filter
+ * Optional. Field match expression used to filter the results.
+ * @type string $order_by
+ * Optional. Field by which to sort the results.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The project and location for which to retrieve `BackupPlans`
+ * information. Format: `projects/{project}/locations/{location}`. In Cloud
+ * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To
+ * retrieve backup plans for all locations, use "-" for the
+ * `{location}` value.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The project and location for which to retrieve `BackupPlans`
+ * information. Format: `projects/{project}/locations/{location}`. In Cloud
+ * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To
+ * retrieve backup plans for all locations, use "-" for the
+ * `{location}` value.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ 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.v1.ListBackupPlansResponse.next_page_token]
+ * to determine if there are more instances left to be queried.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * 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.v1.ListBackupPlansResponse.next_page_token]
+ * to determine if there are more instances left to be queried.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setPageSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->page_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The value of
+ * [next_page_token][google.cloud.backupdr.v1.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.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getPageToken()
+ {
+ return $this->page_token;
+ }
+
+ /**
+ * Optional. The value of
+ * [next_page_token][google.cloud.backupdr.v1.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.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Field match expression used to filter the results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. Field match expression used to filter the results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Field by which to sort the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. Field by which to sort the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListBackupPlansResponse.php b/BackupDr/src/V1/ListBackupPlansResponse.php
new file mode 100644
index 000000000000..ff5e2d64a27c
--- /dev/null
+++ b/BackupDr/src/V1/ListBackupPlansResponse.php
@@ -0,0 +1,179 @@
+google.cloud.backupdr.v1.ListBackupPlansResponse
+ */
+class ListBackupPlansResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupPlan backup_plans = 1;
+ */
+ private $backup_plans;
+ /**
+ * A token which may be sent as
+ * [page_token][google.cloud.backupdr.v1.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.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\BackupDR\V1\BackupPlan>|\Google\Protobuf\Internal\RepeatedField $backup_plans
+ * 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
+ * @type string $next_page_token
+ * A token which may be sent as
+ * [page_token][google.cloud.backupdr.v1.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.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Locations that could not be reached.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupPlan backup_plans = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBackupPlans()
+ {
+ return $this->backup_plans;
+ }
+
+ /**
+ * 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
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupPlan backup_plans = 1;
+ * @param array<\Google\Cloud\BackupDR\V1\BackupPlan>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBackupPlans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\BackupPlan::class);
+ $this->backup_plans = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A token which may be sent as
+ * [page_token][google.cloud.backupdr.v1.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.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A token which may be sent as
+ * [page_token][google.cloud.backupdr.v1.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.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUnreachable($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->unreachable = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListBackupVaultsRequest.php b/BackupDr/src/V1/ListBackupVaultsRequest.php
new file mode 100644
index 000000000000..3f8755430f7e
--- /dev/null
+++ b/BackupDr/src/V1/ListBackupVaultsRequest.php
@@ -0,0 +1,284 @@
+google.cloud.backupdr.v1.ListBackupVaultsRequest
+ */
+class ListBackupVaultsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * Vault.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $view = 0;
+
+ /**
+ * @param string $parent Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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. Please see
+ * {@see BackupDRClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\ListBackupVaultsRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent): self
+ {
+ return (new self())
+ ->setParent($parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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.
+ * @type int $page_size
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ * @type string $page_token
+ * Optional. A token identifying a page of results the server should return.
+ * @type string $filter
+ * Optional. Filtering results.
+ * @type string $order_by
+ * Optional. Hint for how to order the results.
+ * @type int $view
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * Vault.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The project and location for which to retrieve backupvault stores
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setPageSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->page_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getPageToken()
+ {
+ return $this->page_token;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * Vault.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getView()
+ {
+ return $this->view;
+ }
+
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * Vault.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setView($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupVaultView::class);
+ $this->view = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListBackupVaultsResponse.php b/BackupDr/src/V1/ListBackupVaultsResponse.php
new file mode 100644
index 000000000000..34988c886256
--- /dev/null
+++ b/BackupDr/src/V1/ListBackupVaultsResponse.php
@@ -0,0 +1,159 @@
+google.cloud.backupdr.v1.ListBackupVaultsResponse
+ */
+class ListBackupVaultsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupVault backup_vaults = 1;
+ */
+ private $backup_vaults;
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\BackupDR\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $backup_vaults
+ * 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.
+ * @type string $next_page_token
+ * A token identifying a page of results the server should return.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Locations that could not be reached.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupVault backup_vaults = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBackupVaults()
+ {
+ return $this->backup_vaults;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.BackupVault backup_vaults = 1;
+ * @param array<\Google\Cloud\BackupDR\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBackupVaults($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\BackupVault::class);
+ $this->backup_vaults = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUnreachable($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->unreachable = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListBackupsRequest.php b/BackupDr/src/V1/ListBackupsRequest.php
new file mode 100644
index 000000000000..92b535e1b4f0
--- /dev/null
+++ b/BackupDr/src/V1/ListBackupsRequest.php
@@ -0,0 +1,284 @@
+google.cloud.backupdr.v1.ListBackupsRequest
+ */
+class ListBackupsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The project and location for which to retrieve backup
+ * information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $view = 0;
+
+ /**
+ * @param string $parent Required. The project and location for which to retrieve backup
+ * information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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. Please see
+ * {@see BackupDRClient::dataSourceName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\ListBackupsRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent): self
+ {
+ return (new self())
+ ->setParent($parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The project and location for which to retrieve backup
+ * information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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.
+ * @type int $page_size
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ * @type string $page_token
+ * Optional. A token identifying a page of results the server should return.
+ * @type string $filter
+ * Optional. Filtering results.
+ * @type string $order_by
+ * Optional. Hint for how to order the results.
+ * @type int $view
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * resource.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The project and location for which to retrieve backup
+ * information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The project and location for which to retrieve backup
+ * information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setPageSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->page_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getPageToken()
+ {
+ return $this->page_token;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getView()
+ {
+ return $this->view;
+ }
+
+ /**
+ * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+ * resource.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setView($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupView::class);
+ $this->view = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListBackupsResponse.php b/BackupDr/src/V1/ListBackupsResponse.php
new file mode 100644
index 000000000000..04479201f61b
--- /dev/null
+++ b/BackupDr/src/V1/ListBackupsResponse.php
@@ -0,0 +1,159 @@
+google.cloud.backupdr.v1.ListBackupsResponse
+ */
+class ListBackupsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Backup backups = 1;
+ */
+ private $backups;
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\BackupDR\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $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.
+ * @type string $next_page_token
+ * A token identifying a page of results the server should return.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Locations that could not be reached.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Backup backups = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBackups()
+ {
+ return $this->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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Backup backups = 1;
+ * @param array<\Google\Cloud\BackupDR\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBackups($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\Backup::class);
+ $this->backups = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUnreachable($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->unreachable = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListDataSourcesRequest.php b/BackupDr/src/V1/ListDataSourcesRequest.php
new file mode 100644
index 000000000000..ef8584fa5ce2
--- /dev/null
+++ b/BackupDr/src/V1/ListDataSourcesRequest.php
@@ -0,0 +1,246 @@
+google.cloud.backupdr.v1.ListDataSourcesRequest
+ */
+class ListDataSourcesRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The project and location for which to retrieve data
+ * sources information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+
+ /**
+ * @param string $parent Required. The project and location for which to retrieve data
+ * sources information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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. Please see
+ * {@see BackupDRClient::backupVaultName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\ListDataSourcesRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent): self
+ {
+ return (new self())
+ ->setParent($parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The project and location for which to retrieve data
+ * sources information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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.
+ * @type int $page_size
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ * @type string $page_token
+ * Optional. A token identifying a page of results the server should return.
+ * @type string $filter
+ * Optional. Filtering results.
+ * @type string $order_by
+ * Optional. Hint for how to order the results.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The project and location for which to retrieve data
+ * sources information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Required. The project and location for which to retrieve data
+ * sources information, in the format
+ * 'projects/{project_id}/locations/{location}'. In 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.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setParent($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->parent = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * Optional. Requested page size. Server may return fewer items than
+ * requested. If unspecified, server will pick an appropriate default.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setPageSize($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->page_size = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getPageToken()
+ {
+ return $this->page_token;
+ }
+
+ /**
+ * Optional. A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. Filtering results.
+ *
+ * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. Hint for how to order the results.
+ *
+ * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListDataSourcesResponse.php b/BackupDr/src/V1/ListDataSourcesResponse.php
new file mode 100644
index 000000000000..ef509a105897
--- /dev/null
+++ b/BackupDr/src/V1/ListDataSourcesResponse.php
@@ -0,0 +1,159 @@
+google.cloud.backupdr.v1.ListDataSourcesResponse
+ */
+class ListDataSourcesResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.DataSource data_sources = 1;
+ */
+ private $data_sources;
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\BackupDR\V1\DataSource>|\Google\Protobuf\Internal\RepeatedField $data_sources
+ * 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.
+ * @type string $next_page_token
+ * A token identifying a page of results the server should return.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Locations that could not be reached.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.DataSource data_sources = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataSources()
+ {
+ return $this->data_sources;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.DataSource data_sources = 1;
+ * @param array<\Google\Cloud\BackupDR\V1\DataSource>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataSources($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\DataSource::class);
+ $this->data_sources = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A token identifying a page of results the server should return.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Locations that could not be reached.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setUnreachable($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->unreachable = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ListManagementServersRequest.php b/BackupDr/src/V1/ListManagementServersRequest.php
index 37886b801be4..963e2af63f5e 100644
--- a/BackupDr/src/V1/ListManagementServersRequest.php
+++ b/BackupDr/src/V1/ListManagementServersRequest.php
@@ -17,10 +17,11 @@ class ListManagementServersRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The project and location for which to retrieve management servers
- * information, in the format `projects/{project_id}/locations/{location}`. In
- * Cloud BackupDR, locations map to GCP regions, for example **us-central1**.
- * To retrieve management servers for all locations, use "-" for the
- * `{location}` value.
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * Cloud BackupDR, locations map to Google Cloud regions, for example
+ * **us-central1**. To retrieve management servers for all locations, use "-"
+ * for the
+ * '{location}' value.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -53,10 +54,11 @@ class ListManagementServersRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $parent Required. The project and location for which to retrieve management servers
- * information, in the format `projects/{project_id}/locations/{location}`. In
- * Cloud BackupDR, locations map to GCP regions, for example **us-central1**.
- * To retrieve management servers for all locations, use "-" for the
- * `{location}` value. Please see
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * Cloud BackupDR, locations map to Google Cloud regions, for example
+ * **us-central1**. To retrieve management servers for all locations, use "-"
+ * for the
+ * '{location}' value. Please see
* {@see BackupDRClient::locationName()} for help formatting this field.
*
* @return \Google\Cloud\BackupDR\V1\ListManagementServersRequest
@@ -77,10 +79,11 @@ public static function build(string $parent): self
*
* @type string $parent
* Required. The project and location for which to retrieve management servers
- * information, in the format `projects/{project_id}/locations/{location}`. In
- * Cloud BackupDR, locations map to GCP regions, for example **us-central1**.
- * To retrieve management servers for all locations, use "-" for the
- * `{location}` value.
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * Cloud BackupDR, locations map to Google Cloud regions, for example
+ * **us-central1**. To retrieve management servers for all locations, use "-"
+ * for the
+ * '{location}' value.
* @type int $page_size
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
@@ -99,10 +102,11 @@ public function __construct($data = NULL) {
/**
* Required. The project and location for which to retrieve management servers
- * information, in the format `projects/{project_id}/locations/{location}`. In
- * Cloud BackupDR, locations map to GCP regions, for example **us-central1**.
- * To retrieve management servers for all locations, use "-" for the
- * `{location}` value.
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * Cloud BackupDR, locations map to Google Cloud regions, for example
+ * **us-central1**. To retrieve management servers for all locations, use "-"
+ * for the
+ * '{location}' value.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -114,10 +118,11 @@ public function getParent()
/**
* Required. The project and location for which to retrieve management servers
- * information, in the format `projects/{project_id}/locations/{location}`. In
- * Cloud BackupDR, locations map to GCP regions, for example **us-central1**.
- * To retrieve management servers for all locations, use "-" for the
- * `{location}` value.
+ * information, in the format 'projects/{project_id}/locations/{location}'. In
+ * Cloud BackupDR, locations map to Google Cloud regions, for example
+ * **us-central1**. To retrieve management servers for all locations, use "-"
+ * for the
+ * '{location}' value.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/BackupDr/src/V1/ListManagementServersResponse.php b/BackupDr/src/V1/ListManagementServersResponse.php
index fa2d796a5d0e..84bd573686db 100644
--- a/BackupDr/src/V1/ListManagementServersResponse.php
+++ b/BackupDr/src/V1/ListManagementServersResponse.php
@@ -18,7 +18,7 @@ class ListManagementServersResponse extends \Google\Protobuf\Internal\Message
/**
* The list of ManagementServer instances in the project for the specified
* location.
- * If the `{location}` value in the request is "-", the response contains a
+ * 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
@@ -49,7 +49,7 @@ class ListManagementServersResponse extends \Google\Protobuf\Internal\Message
* @type array<\Google\Cloud\BackupDR\V1\ManagementServer>|\Google\Protobuf\Internal\RepeatedField $management_servers
* The list of ManagementServer instances in the project for the specified
* location.
- * If the `{location}` value in the request is "-", the response contains a
+ * 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
@@ -68,7 +68,7 @@ public function __construct($data = NULL) {
/**
* The list of ManagementServer instances in the project for the specified
* location.
- * If the `{location}` value in the request is "-", the response contains a
+ * 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
@@ -85,7 +85,7 @@ public function getManagementServers()
/**
* The list of ManagementServer instances in the project for the specified
* location.
- * If the `{location}` value in the request is "-", the response contains a
+ * 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
diff --git a/BackupDr/src/V1/ManagementServer.php b/BackupDr/src/V1/ManagementServer.php
index 47545858a697..70295addc1c0 100644
--- a/BackupDr/src/V1/ManagementServer.php
+++ b/BackupDr/src/V1/ManagementServer.php
@@ -92,7 +92,7 @@ class ManagementServer extends \Google\Protobuf\Internal\Message
/**
* Output only. The OAuth 2.0 client id is required to make API calls to the
* BackupDR instance API of this ManagementServer. This is the value that
- * should be provided in the ‘aud’ field of the OIDC ID Token (see openid
+ * 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).
*
@@ -164,7 +164,7 @@ class ManagementServer extends \Google\Protobuf\Internal\Message
* @type string $oauth2_client_id
* Output only. The OAuth 2.0 client id is required to make API calls to the
* BackupDR instance API of this ManagementServer. This is the value that
- * should be provided in the ‘aud’ field of the OIDC ID Token (see openid
+ * 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).
* @type \Google\Cloud\BackupDR\V1\WorkforceIdentityBasedOAuth2ClientID $workforce_identity_based_oauth2_client_id
@@ -528,7 +528,7 @@ public function setEtag($var)
/**
* Output only. The OAuth 2.0 client id is required to make API calls to the
* BackupDR instance API of this ManagementServer. This is the value that
- * should be provided in the ‘aud’ field of the OIDC ID Token (see openid
+ * 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).
*
@@ -543,7 +543,7 @@ public function getOauth2ClientId()
/**
* Output only. The OAuth 2.0 client id is required to make API calls to the
* BackupDR instance API of this ManagementServer. This is the value that
- * should be provided in the ‘aud’ field of the OIDC ID Token (see openid
+ * 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).
*
diff --git a/BackupDr/src/V1/Metadata.php b/BackupDr/src/V1/Metadata.php
new file mode 100644
index 000000000000..a47c48d30479
--- /dev/null
+++ b/BackupDr/src/V1/Metadata.php
@@ -0,0 +1,71 @@
+google.cloud.backupdr.v1.Metadata
+ */
+class Metadata extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Array of key/value pairs. The total size of all keys and values
+ * must be less than 512 KB.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $items;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\BackupDR\V1\Entry>|\Google\Protobuf\Internal\RepeatedField $items
+ * Optional. Array of key/value pairs. The total size of all keys and values
+ * must be less than 512 KB.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Array of key/value pairs. The total size of all keys and values
+ * must be less than 512 KB.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getItems()
+ {
+ return $this->items;
+ }
+
+ /**
+ * Optional. Array of key/value pairs. The total size of all keys and values
+ * must be less than 512 KB.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\Entry>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setItems($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\Entry::class);
+ $this->items = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/NetworkInterface.php b/BackupDr/src/V1/NetworkInterface.php
new file mode 100644
index 000000000000..f814b5bc7885
--- /dev/null
+++ b/BackupDr/src/V1/NetworkInterface.php
@@ -0,0 +1,700 @@
+google.cloud.backupdr.v1.NetworkInterface
+ */
+class NetworkInterface extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. URL of the VPC network resource for this instance.
+ *
+ * Generated from protobuf field optional string network = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $network = null;
+ /**
+ * Optional. The URL of the Subnetwork resource for this instance.
+ *
+ * Generated from protobuf field optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $subnetwork = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string ip_address = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $ip_address = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $ipv6_address = null;
+ /**
+ * Optional. The prefix length of the primary internal IPv6 range.
+ *
+ * Generated from protobuf field optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $internal_ipv6_prefix_length = null;
+ /**
+ * Output only. [Output Only] The name of the network interface, which is
+ * generated by the server.
+ *
+ * Generated from protobuf field optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $name = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $access_configs;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $ipv6_access_configs;
+ /**
+ * Optional. An array of alias IP ranges for this network interface.
+ * You can only specify this field for network interfaces in VPC networks.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $alias_ip_ranges;
+ /**
+ * The stack type for this network interface.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.StackType stack_type = 10;
+ */
+ protected $stack_type = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $ipv6_access_type = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $queue_count = null;
+ /**
+ * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+ * or VirtioNet.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $nic_type = null;
+ /**
+ * 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}.
+ *
+ * Generated from protobuf field optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $network_attachment = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $network
+ * Optional. URL of the VPC network resource for this instance.
+ * @type string $subnetwork
+ * Optional. The URL of the Subnetwork resource for this instance.
+ * @type string $ip_address
+ * 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.
+ * @type string $ipv6_address
+ * 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.
+ * @type int $internal_ipv6_prefix_length
+ * Optional. The prefix length of the primary internal IPv6 range.
+ * @type string $name
+ * Output only. [Output Only] The name of the network interface, which is
+ * generated by the server.
+ * @type array<\Google\Cloud\BackupDR\V1\AccessConfig>|\Google\Protobuf\Internal\RepeatedField $access_configs
+ * 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.
+ * @type array<\Google\Cloud\BackupDR\V1\AccessConfig>|\Google\Protobuf\Internal\RepeatedField $ipv6_access_configs
+ * 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.
+ * @type array<\Google\Cloud\BackupDR\V1\AliasIpRange>|\Google\Protobuf\Internal\RepeatedField $alias_ip_ranges
+ * Optional. An array of alias IP ranges for this network interface.
+ * You can only specify this field for network interfaces in VPC networks.
+ * @type int $stack_type
+ * The stack type for this network interface.
+ * @type int $ipv6_access_type
+ * 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.
+ * @type int $queue_count
+ * 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.
+ * @type int $nic_type
+ * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+ * or VirtioNet.
+ * @type string $network_attachment
+ * 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}.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. URL of the VPC network resource for this instance.
+ *
+ * Generated from protobuf field optional string network = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getNetwork()
+ {
+ return isset($this->network) ? $this->network : '';
+ }
+
+ public function hasNetwork()
+ {
+ return isset($this->network);
+ }
+
+ public function clearNetwork()
+ {
+ unset($this->network);
+ }
+
+ /**
+ * Optional. URL of the VPC network resource for this instance.
+ *
+ * Generated from protobuf field optional string network = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setNetwork($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->network = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The URL of the Subnetwork resource for this instance.
+ *
+ * Generated from protobuf field optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getSubnetwork()
+ {
+ return isset($this->subnetwork) ? $this->subnetwork : '';
+ }
+
+ public function hasSubnetwork()
+ {
+ return isset($this->subnetwork);
+ }
+
+ public function clearSubnetwork()
+ {
+ unset($this->subnetwork);
+ }
+
+ /**
+ * Optional. The URL of the Subnetwork resource for this instance.
+ *
+ * Generated from protobuf field optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setSubnetwork($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->subnetwork = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional string ip_address = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getIpAddress()
+ {
+ return isset($this->ip_address) ? $this->ip_address : '';
+ }
+
+ public function hasIpAddress()
+ {
+ return isset($this->ip_address);
+ }
+
+ public function clearIpAddress()
+ {
+ unset($this->ip_address);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string ip_address = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setIpAddress($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->ip_address = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getIpv6Address()
+ {
+ return isset($this->ipv6_address) ? $this->ipv6_address : '';
+ }
+
+ public function hasIpv6Address()
+ {
+ return isset($this->ipv6_address);
+ }
+
+ public function clearIpv6Address()
+ {
+ unset($this->ipv6_address);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setIpv6Address($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->ipv6_address = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The prefix length of the primary internal IPv6 range.
+ *
+ * Generated from protobuf field optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getInternalIpv6PrefixLength()
+ {
+ return isset($this->internal_ipv6_prefix_length) ? $this->internal_ipv6_prefix_length : 0;
+ }
+
+ public function hasInternalIpv6PrefixLength()
+ {
+ return isset($this->internal_ipv6_prefix_length);
+ }
+
+ public function clearInternalIpv6PrefixLength()
+ {
+ unset($this->internal_ipv6_prefix_length);
+ }
+
+ /**
+ * Optional. The prefix length of the primary internal IPv6 range.
+ *
+ * Generated from protobuf field optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setInternalIpv6PrefixLength($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->internal_ipv6_prefix_length = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. [Output Only] The name of the network interface, which is
+ * generated by the server.
+ *
+ * Generated from protobuf field optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getName()
+ {
+ return isset($this->name) ? $this->name : '';
+ }
+
+ public function hasName()
+ {
+ return isset($this->name);
+ }
+
+ public function clearName()
+ {
+ unset($this->name);
+ }
+
+ /**
+ * Output only. [Output Only] The name of the network interface, which is
+ * generated by the server.
+ *
+ * Generated from protobuf field optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAccessConfigs()
+ {
+ return $this->access_configs;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\AccessConfig>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAccessConfigs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\AccessConfig::class);
+ $this->access_configs = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getIpv6AccessConfigs()
+ {
+ return $this->ipv6_access_configs;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\AccessConfig>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setIpv6AccessConfigs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\AccessConfig::class);
+ $this->ipv6_access_configs = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAliasIpRanges()
+ {
+ return $this->alias_ip_ranges;
+ }
+
+ /**
+ * Optional. An array of alias IP ranges for this network interface.
+ * You can only specify this field for network interfaces in VPC networks.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\AliasIpRange>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAliasIpRanges($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\AliasIpRange::class);
+ $this->alias_ip_ranges = $arr;
+
+ return $this;
+ }
+
+ /**
+ * The stack type for this network interface.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.StackType stack_type = 10;
+ * @return int
+ */
+ public function getStackType()
+ {
+ return isset($this->stack_type) ? $this->stack_type : 0;
+ }
+
+ public function hasStackType()
+ {
+ return isset($this->stack_type);
+ }
+
+ public function clearStackType()
+ {
+ unset($this->stack_type);
+ }
+
+ /**
+ * The stack type for this network interface.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.StackType stack_type = 10;
+ * @param int $var
+ * @return $this
+ */
+ public function setStackType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\NetworkInterface\StackType::class);
+ $this->stack_type = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getIpv6AccessType()
+ {
+ return isset($this->ipv6_access_type) ? $this->ipv6_access_type : 0;
+ }
+
+ public function hasIpv6AccessType()
+ {
+ return isset($this->ipv6_access_type);
+ }
+
+ public function clearIpv6AccessType()
+ {
+ unset($this->ipv6_access_type);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setIpv6AccessType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\NetworkInterface\Ipv6AccessType::class);
+ $this->ipv6_access_type = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getQueueCount()
+ {
+ return isset($this->queue_count) ? $this->queue_count : 0;
+ }
+
+ public function hasQueueCount()
+ {
+ return isset($this->queue_count);
+ }
+
+ public function clearQueueCount()
+ {
+ unset($this->queue_count);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setQueueCount($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->queue_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+ * or VirtioNet.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getNicType()
+ {
+ return isset($this->nic_type) ? $this->nic_type : 0;
+ }
+
+ public function hasNicType()
+ {
+ return isset($this->nic_type);
+ }
+
+ public function clearNicType()
+ {
+ unset($this->nic_type);
+ }
+
+ /**
+ * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+ * or VirtioNet.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setNicType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\NetworkInterface\NicType::class);
+ $this->nic_type = $var;
+
+ 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}.
+ *
+ * Generated from protobuf field optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getNetworkAttachment()
+ {
+ return isset($this->network_attachment) ? $this->network_attachment : '';
+ }
+
+ public function hasNetworkAttachment()
+ {
+ return isset($this->network_attachment);
+ }
+
+ public function clearNetworkAttachment()
+ {
+ unset($this->network_attachment);
+ }
+
+ /**
+ * 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}.
+ *
+ * Generated from protobuf field optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setNetworkAttachment($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->network_attachment = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/NetworkInterface/Ipv6AccessType.php b/BackupDr/src/V1/NetworkInterface/Ipv6AccessType.php
new file mode 100644
index 000000000000..0e693955e272
--- /dev/null
+++ b/BackupDr/src/V1/NetworkInterface/Ipv6AccessType.php
@@ -0,0 +1,63 @@
+google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType
+ */
+class Ipv6AccessType
+{
+ /**
+ * IPv6 access type not set. Means this network interface hasn't been
+ * turned on IPv6 yet.
+ *
+ * Generated from protobuf enum UNSPECIFIED_IPV6_ACCESS_TYPE = 0;
+ */
+ const UNSPECIFIED_IPV6_ACCESS_TYPE = 0;
+ /**
+ * This network interface can have internal IPv6.
+ *
+ * Generated from protobuf enum INTERNAL = 1;
+ */
+ const INTERNAL = 1;
+ /**
+ * This network interface can have external IPv6.
+ *
+ * Generated from protobuf enum EXTERNAL = 2;
+ */
+ const EXTERNAL = 2;
+
+ private static $valueToName = [
+ self::UNSPECIFIED_IPV6_ACCESS_TYPE => 'UNSPECIFIED_IPV6_ACCESS_TYPE',
+ self::INTERNAL => 'INTERNAL',
+ self::EXTERNAL => 'EXTERNAL',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/NetworkInterface/NicType.php b/BackupDr/src/V1/NetworkInterface/NicType.php
new file mode 100644
index 000000000000..68e6feafb6d2
--- /dev/null
+++ b/BackupDr/src/V1/NetworkInterface/NicType.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.NetworkInterface.NicType
+ */
+class NicType
+{
+ /**
+ * Default should be NIC_TYPE_UNSPECIFIED.
+ *
+ * Generated from protobuf enum NIC_TYPE_UNSPECIFIED = 0;
+ */
+ const NIC_TYPE_UNSPECIFIED = 0;
+ /**
+ * VIRTIO
+ *
+ * Generated from protobuf enum VIRTIO_NET = 1;
+ */
+ const VIRTIO_NET = 1;
+ /**
+ * GVNIC
+ *
+ * Generated from protobuf enum GVNIC = 2;
+ */
+ const GVNIC = 2;
+
+ private static $valueToName = [
+ self::NIC_TYPE_UNSPECIFIED => 'NIC_TYPE_UNSPECIFIED',
+ self::VIRTIO_NET => 'VIRTIO_NET',
+ self::GVNIC => 'GVNIC',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/NetworkInterface/StackType.php b/BackupDr/src/V1/NetworkInterface/StackType.php
new file mode 100644
index 000000000000..3fa4b59c862e
--- /dev/null
+++ b/BackupDr/src/V1/NetworkInterface/StackType.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.NetworkInterface.StackType
+ */
+class StackType
+{
+ /**
+ * Default should be STACK_TYPE_UNSPECIFIED.
+ *
+ * Generated from protobuf enum STACK_TYPE_UNSPECIFIED = 0;
+ */
+ const STACK_TYPE_UNSPECIFIED = 0;
+ /**
+ * The network interface will be assigned IPv4 address.
+ *
+ * Generated from protobuf enum IPV4_ONLY = 1;
+ */
+ const IPV4_ONLY = 1;
+ /**
+ * The network interface can have both IPv4 and IPv6 addresses.
+ *
+ * Generated from protobuf enum IPV4_IPV6 = 2;
+ */
+ const IPV4_IPV6 = 2;
+
+ private static $valueToName = [
+ self::STACK_TYPE_UNSPECIFIED => 'STACK_TYPE_UNSPECIFIED',
+ self::IPV4_ONLY => 'IPV4_ONLY',
+ self::IPV4_IPV6 => 'IPV4_IPV6',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/NetworkPerformanceConfig.php b/BackupDr/src/V1/NetworkPerformanceConfig.php
new file mode 100644
index 000000000000..9104b7f0e842
--- /dev/null
+++ b/BackupDr/src/V1/NetworkPerformanceConfig.php
@@ -0,0 +1,77 @@
+google.cloud.backupdr.v1.NetworkPerformanceConfig
+ */
+class NetworkPerformanceConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The tier of the total egress bandwidth.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $total_egress_bandwidth_tier = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $total_egress_bandwidth_tier
+ * Optional. The tier of the total egress bandwidth.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The tier of the total egress bandwidth.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getTotalEgressBandwidthTier()
+ {
+ return isset($this->total_egress_bandwidth_tier) ? $this->total_egress_bandwidth_tier : 0;
+ }
+
+ public function hasTotalEgressBandwidthTier()
+ {
+ return isset($this->total_egress_bandwidth_tier);
+ }
+
+ public function clearTotalEgressBandwidthTier()
+ {
+ unset($this->total_egress_bandwidth_tier);
+ }
+
+ /**
+ * Optional. The tier of the total egress bandwidth.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setTotalEgressBandwidthTier($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\NetworkPerformanceConfig\Tier::class);
+ $this->total_egress_bandwidth_tier = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/NetworkPerformanceConfig/Tier.php b/BackupDr/src/V1/NetworkPerformanceConfig/Tier.php
new file mode 100644
index 000000000000..e53e32fa05fb
--- /dev/null
+++ b/BackupDr/src/V1/NetworkPerformanceConfig/Tier.php
@@ -0,0 +1,66 @@
+google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier
+ */
+class Tier
+{
+ /**
+ * This value is unused.
+ *
+ * Generated from protobuf enum TIER_UNSPECIFIED = 0;
+ */
+ const TIER_UNSPECIFIED = 0;
+ /**
+ * Default network performance config.
+ *
+ * Generated from protobuf enum DEFAULT = 1;
+ */
+ const PBDEFAULT = 1;
+ /**
+ * Tier 1 network performance config.
+ *
+ * Generated from protobuf enum TIER_1 = 2;
+ */
+ const TIER_1 = 2;
+
+ private static $valueToName = [
+ self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED',
+ self::PBDEFAULT => 'DEFAULT',
+ self::TIER_1 => 'TIER_1',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ $pbconst = __CLASS__. '::PB' . strtoupper($name);
+ if (!defined($pbconst)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($pbconst);
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/OperationMetadata.php b/BackupDr/src/V1/OperationMetadata.php
index 822d7b9a09a9..e880bbc7986d 100644
--- a/BackupDr/src/V1/OperationMetadata.php
+++ b/BackupDr/src/V1/OperationMetadata.php
@@ -50,7 +50,7 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message
* of the operation. Operations that have successfully been cancelled
* have [Operation.error][] value with a
* [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
+ * 'Code.CANCELLED'.
*
* Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@@ -90,7 +90,7 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message
* of the operation. Operations that have successfully been cancelled
* have [Operation.error][] value with a
* [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
+ * 'Code.CANCELLED'.
* @type string $api_version
* Output only. API version used to start the operation.
* @type array|\Google\Protobuf\Internal\MapField $additional_info
@@ -258,7 +258,7 @@ public function setStatusMessage($var)
* of the operation. Operations that have successfully been cancelled
* have [Operation.error][] value with a
* [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
+ * 'Code.CANCELLED'.
*
* Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return bool
@@ -273,7 +273,7 @@ public function getRequestedCancellation()
* of the operation. Operations that have successfully been cancelled
* have [Operation.error][] value with a
* [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
+ * 'Code.CANCELLED'.
*
* Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param bool $var
diff --git a/BackupDr/src/V1/RestoreBackupRequest.php b/BackupDr/src/V1/RestoreBackupRequest.php
new file mode 100644
index 000000000000..57cda39c282c
--- /dev/null
+++ b/BackupDr/src/V1/RestoreBackupRequest.php
@@ -0,0 +1,244 @@
+google.cloud.backupdr.v1.RestoreBackupRequest
+ */
+class RestoreBackupRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The resource name of the Backup instance, in the format
+ * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+ protected $target_environment;
+ protected $instance_properties;
+
+ /**
+ * @param string $name Required. The resource name of the Backup instance, in the format
+ * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. Please see
+ * {@see BackupDRClient::backupName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\BackupDR\V1\RestoreBackupRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name): self
+ {
+ return (new self())
+ ->setName($name);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The resource name of the Backup instance, in the format
+ * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+ * @type string $request_id
+ * 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).
+ * @type \Google\Cloud\BackupDR\V1\ComputeInstanceTargetEnvironment $compute_instance_target_environment
+ * Compute Engine target environment to be used during restore.
+ * @type \Google\Cloud\BackupDR\V1\ComputeInstanceRestoreProperties $compute_instance_restore_properties
+ * Compute Engine instance properties to be overridden during restore.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The resource name of the Backup instance, in the format
+ * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. The resource name of the Backup instance, in the format
+ * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Compute Engine target environment to be used during restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3;
+ * @return \Google\Cloud\BackupDR\V1\ComputeInstanceTargetEnvironment|null
+ */
+ public function getComputeInstanceTargetEnvironment()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasComputeInstanceTargetEnvironment()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Compute Engine target environment to be used during restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3;
+ * @param \Google\Cloud\BackupDR\V1\ComputeInstanceTargetEnvironment $var
+ * @return $this
+ */
+ public function setComputeInstanceTargetEnvironment($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\ComputeInstanceTargetEnvironment::class);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Compute Engine instance properties to be overridden during restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4;
+ * @return \Google\Cloud\BackupDR\V1\ComputeInstanceRestoreProperties|null
+ */
+ public function getComputeInstanceRestoreProperties()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasComputeInstanceRestoreProperties()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Compute Engine instance properties to be overridden during restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4;
+ * @param \Google\Cloud\BackupDR\V1\ComputeInstanceRestoreProperties $var
+ * @return $this
+ */
+ public function setComputeInstanceRestoreProperties($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\ComputeInstanceRestoreProperties::class);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTargetEnvironment()
+ {
+ return $this->whichOneof("target_environment");
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstanceProperties()
+ {
+ return $this->whichOneof("instance_properties");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/RestoreBackupResponse.php b/BackupDr/src/V1/RestoreBackupResponse.php
new file mode 100644
index 000000000000..27614255363f
--- /dev/null
+++ b/BackupDr/src/V1/RestoreBackupResponse.php
@@ -0,0 +1,77 @@
+google.cloud.backupdr.v1.RestoreBackupResponse
+ */
+class RestoreBackupResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Details of the target resource created/modified as part of restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.TargetResource target_resource = 1;
+ */
+ protected $target_resource = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\BackupDR\V1\TargetResource $target_resource
+ * Details of the target resource created/modified as part of restore.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Details of the target resource created/modified as part of restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.TargetResource target_resource = 1;
+ * @return \Google\Cloud\BackupDR\V1\TargetResource|null
+ */
+ public function getTargetResource()
+ {
+ return $this->target_resource;
+ }
+
+ public function hasTargetResource()
+ {
+ return isset($this->target_resource);
+ }
+
+ public function clearTargetResource()
+ {
+ unset($this->target_resource);
+ }
+
+ /**
+ * Details of the target resource created/modified as part of restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.TargetResource target_resource = 1;
+ * @param \Google\Cloud\BackupDR\V1\TargetResource $var
+ * @return $this
+ */
+ public function setTargetResource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\TargetResource::class);
+ $this->target_resource = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/RuleConfigInfo.php b/BackupDr/src/V1/RuleConfigInfo.php
new file mode 100644
index 000000000000..710f042a26d9
--- /dev/null
+++ b/BackupDr/src/V1/RuleConfigInfo.php
@@ -0,0 +1,201 @@
+google.cloud.backupdr.v1.RuleConfigInfo
+ */
+class RuleConfigInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. Output Only.
+ * Backup Rule id fetched from backup plan.
+ *
+ * Generated from protobuf field string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $rule_id = '';
+ /**
+ * Output only. The last backup state for rule.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $last_backup_state = 0;
+ /**
+ * Output only. Output Only.
+ * google.rpc.Status object to store the last backup error.
+ *
+ * Generated from protobuf field .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $last_backup_error = null;
+ /**
+ * Output only. The point in time when the last successful backup was captured
+ * from the source.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $last_successful_backup_consistency_time = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $rule_id
+ * Output only. Output Only.
+ * Backup Rule id fetched from backup plan.
+ * @type int $last_backup_state
+ * Output only. The last backup state for rule.
+ * @type \Google\Rpc\Status $last_backup_error
+ * Output only. Output Only.
+ * google.rpc.Status object to store the last backup error.
+ * @type \Google\Protobuf\Timestamp $last_successful_backup_consistency_time
+ * Output only. The point in time when the last successful backup was captured
+ * from the source.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplanassociation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. Output Only.
+ * Backup Rule id fetched from backup plan.
+ *
+ * Generated from protobuf field string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getRuleId()
+ {
+ return $this->rule_id;
+ }
+
+ /**
+ * Output only. Output Only.
+ * Backup Rule id fetched from backup plan.
+ *
+ * Generated from protobuf field string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setRuleId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->rule_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The last backup state for rule.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getLastBackupState()
+ {
+ return $this->last_backup_state;
+ }
+
+ /**
+ * Output only. The last backup state for rule.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setLastBackupState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\RuleConfigInfo\LastBackupState::class);
+ $this->last_backup_state = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Output Only.
+ * google.rpc.Status object to store the last backup error.
+ *
+ * Generated from protobuf field .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Rpc\Status|null
+ */
+ public function getLastBackupError()
+ {
+ return $this->last_backup_error;
+ }
+
+ public function hasLastBackupError()
+ {
+ return isset($this->last_backup_error);
+ }
+
+ public function clearLastBackupError()
+ {
+ unset($this->last_backup_error);
+ }
+
+ /**
+ * Output only. Output Only.
+ * google.rpc.Status object to store the last backup error.
+ *
+ * Generated from protobuf field .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Rpc\Status $var
+ * @return $this
+ */
+ public function setLastBackupError($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
+ $this->last_backup_error = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The point in time when the last successful backup was captured
+ * from the source.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getLastSuccessfulBackupConsistencyTime()
+ {
+ return $this->last_successful_backup_consistency_time;
+ }
+
+ public function hasLastSuccessfulBackupConsistencyTime()
+ {
+ return isset($this->last_successful_backup_consistency_time);
+ }
+
+ public function clearLastSuccessfulBackupConsistencyTime()
+ {
+ unset($this->last_successful_backup_consistency_time);
+ }
+
+ /**
+ * Output only. The point in time when the last successful backup was captured
+ * from the source.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setLastSuccessfulBackupConsistencyTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->last_successful_backup_consistency_time = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/RuleConfigInfo/LastBackupState.php b/BackupDr/src/V1/RuleConfigInfo/LastBackupState.php
new file mode 100644
index 000000000000..b8df1c268358
--- /dev/null
+++ b/BackupDr/src/V1/RuleConfigInfo/LastBackupState.php
@@ -0,0 +1,77 @@
+google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState
+ */
+class LastBackupState
+{
+ /**
+ * State not set.
+ *
+ * Generated from protobuf enum LAST_BACKUP_STATE_UNSPECIFIED = 0;
+ */
+ const LAST_BACKUP_STATE_UNSPECIFIED = 0;
+ /**
+ * The first backup is pending.
+ *
+ * Generated from protobuf enum FIRST_BACKUP_PENDING = 1;
+ */
+ const FIRST_BACKUP_PENDING = 1;
+ /**
+ * The most recent backup could not be run/failed because of the lack of
+ * permissions.
+ *
+ * Generated from protobuf enum PERMISSION_DENIED = 2;
+ */
+ const PERMISSION_DENIED = 2;
+ /**
+ * The last backup operation succeeded.
+ *
+ * Generated from protobuf enum SUCCEEDED = 3;
+ */
+ const SUCCEEDED = 3;
+ /**
+ * The last backup operation failed.
+ *
+ * Generated from protobuf enum FAILED = 4;
+ */
+ const FAILED = 4;
+
+ private static $valueToName = [
+ self::LAST_BACKUP_STATE_UNSPECIFIED => 'LAST_BACKUP_STATE_UNSPECIFIED',
+ self::FIRST_BACKUP_PENDING => 'FIRST_BACKUP_PENDING',
+ self::PERMISSION_DENIED => 'PERMISSION_DENIED',
+ self::SUCCEEDED => 'SUCCEEDED',
+ self::FAILED => 'FAILED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/Scheduling.php b/BackupDr/src/V1/Scheduling.php
new file mode 100644
index 000000000000..fceb736acfde
--- /dev/null
+++ b/BackupDr/src/V1/Scheduling.php
@@ -0,0 +1,399 @@
+google.cloud.backupdr.v1.Scheduling
+ */
+class Scheduling extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Defines the maintenance behavior for this instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $on_host_maintenance = null;
+ /**
+ * Optional. Specifies whether the instance should be automatically restarted
+ * if it is terminated by Compute Engine (not terminated by a user).
+ *
+ * Generated from protobuf field optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $automatic_restart = null;
+ /**
+ * Optional. Defines whether the instance is preemptible.
+ *
+ * Generated from protobuf field optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $preemptible = null;
+ /**
+ * Optional. A set of node affinity and anti-affinity configurations.
+ * Overrides reservationAffinity.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $node_affinities;
+ /**
+ * Optional. The minimum number of virtual CPUs this instance will consume
+ * when running on a sole-tenant node.
+ *
+ * Generated from protobuf field optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $min_node_cpus = null;
+ /**
+ * Optional. Specifies the provisioning model of the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $provisioning_model = null;
+ /**
+ * Optional. Specifies the termination action for the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $instance_termination_action = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $local_ssd_recovery_timeout = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $on_host_maintenance
+ * Optional. Defines the maintenance behavior for this instance.
+ * @type bool $automatic_restart
+ * Optional. Specifies whether the instance should be automatically restarted
+ * if it is terminated by Compute Engine (not terminated by a user).
+ * @type bool $preemptible
+ * Optional. Defines whether the instance is preemptible.
+ * @type array<\Google\Cloud\BackupDR\V1\Scheduling\NodeAffinity>|\Google\Protobuf\Internal\RepeatedField $node_affinities
+ * Optional. A set of node affinity and anti-affinity configurations.
+ * Overrides reservationAffinity.
+ * @type int $min_node_cpus
+ * Optional. The minimum number of virtual CPUs this instance will consume
+ * when running on a sole-tenant node.
+ * @type int $provisioning_model
+ * Optional. Specifies the provisioning model of the instance.
+ * @type int $instance_termination_action
+ * Optional. Specifies the termination action for the instance.
+ * @type \Google\Cloud\BackupDR\V1\SchedulingDuration $local_ssd_recovery_timeout
+ * 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.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Defines the maintenance behavior for this instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getOnHostMaintenance()
+ {
+ return isset($this->on_host_maintenance) ? $this->on_host_maintenance : 0;
+ }
+
+ public function hasOnHostMaintenance()
+ {
+ return isset($this->on_host_maintenance);
+ }
+
+ public function clearOnHostMaintenance()
+ {
+ unset($this->on_host_maintenance);
+ }
+
+ /**
+ * Optional. Defines the maintenance behavior for this instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setOnHostMaintenance($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\Scheduling\OnHostMaintenance::class);
+ $this->on_host_maintenance = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Specifies whether the instance should be automatically restarted
+ * if it is terminated by Compute Engine (not terminated by a user).
+ *
+ * Generated from protobuf field optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAutomaticRestart()
+ {
+ return isset($this->automatic_restart) ? $this->automatic_restart : false;
+ }
+
+ public function hasAutomaticRestart()
+ {
+ return isset($this->automatic_restart);
+ }
+
+ public function clearAutomaticRestart()
+ {
+ unset($this->automatic_restart);
+ }
+
+ /**
+ * Optional. Specifies whether the instance should be automatically restarted
+ * if it is terminated by Compute Engine (not terminated by a user).
+ *
+ * Generated from protobuf field optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAutomaticRestart($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->automatic_restart = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Defines whether the instance is preemptible.
+ *
+ * Generated from protobuf field optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getPreemptible()
+ {
+ return isset($this->preemptible) ? $this->preemptible : false;
+ }
+
+ public function hasPreemptible()
+ {
+ return isset($this->preemptible);
+ }
+
+ public function clearPreemptible()
+ {
+ unset($this->preemptible);
+ }
+
+ /**
+ * Optional. Defines whether the instance is preemptible.
+ *
+ * Generated from protobuf field optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setPreemptible($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->preemptible = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. A set of node affinity and anti-affinity configurations.
+ * Overrides reservationAffinity.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getNodeAffinities()
+ {
+ return $this->node_affinities;
+ }
+
+ /**
+ * Optional. A set of node affinity and anti-affinity configurations.
+ * Overrides reservationAffinity.
+ *
+ * Generated from protobuf field repeated .google.cloud.backupdr.v1.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\BackupDR\V1\Scheduling\NodeAffinity>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setNodeAffinities($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\Scheduling\NodeAffinity::class);
+ $this->node_affinities = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The minimum number of virtual CPUs this instance will consume
+ * when running on a sole-tenant node.
+ *
+ * Generated from protobuf field optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getMinNodeCpus()
+ {
+ return isset($this->min_node_cpus) ? $this->min_node_cpus : 0;
+ }
+
+ public function hasMinNodeCpus()
+ {
+ return isset($this->min_node_cpus);
+ }
+
+ public function clearMinNodeCpus()
+ {
+ unset($this->min_node_cpus);
+ }
+
+ /**
+ * Optional. The minimum number of virtual CPUs this instance will consume
+ * when running on a sole-tenant node.
+ *
+ * Generated from protobuf field optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setMinNodeCpus($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->min_node_cpus = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Specifies the provisioning model of the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getProvisioningModel()
+ {
+ return isset($this->provisioning_model) ? $this->provisioning_model : 0;
+ }
+
+ public function hasProvisioningModel()
+ {
+ return isset($this->provisioning_model);
+ }
+
+ public function clearProvisioningModel()
+ {
+ unset($this->provisioning_model);
+ }
+
+ /**
+ * Optional. Specifies the provisioning model of the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setProvisioningModel($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\Scheduling\ProvisioningModel::class);
+ $this->provisioning_model = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Specifies the termination action for the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getInstanceTerminationAction()
+ {
+ return isset($this->instance_termination_action) ? $this->instance_termination_action : 0;
+ }
+
+ public function hasInstanceTerminationAction()
+ {
+ return isset($this->instance_termination_action);
+ }
+
+ public function clearInstanceTerminationAction()
+ {
+ unset($this->instance_termination_action);
+ }
+
+ /**
+ * Optional. Specifies the termination action for the instance.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setInstanceTerminationAction($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\Scheduling\InstanceTerminationAction::class);
+ $this->instance_termination_action = $var;
+
+ 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\SchedulingDuration|null
+ */
+ public function getLocalSsdRecoveryTimeout()
+ {
+ return $this->local_ssd_recovery_timeout;
+ }
+
+ public function hasLocalSsdRecoveryTimeout()
+ {
+ return isset($this->local_ssd_recovery_timeout);
+ }
+
+ public function clearLocalSsdRecoveryTimeout()
+ {
+ unset($this->local_ssd_recovery_timeout);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\SchedulingDuration $var
+ * @return $this
+ */
+ public function setLocalSsdRecoveryTimeout($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\SchedulingDuration::class);
+ $this->local_ssd_recovery_timeout = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/Scheduling/InstanceTerminationAction.php b/BackupDr/src/V1/Scheduling/InstanceTerminationAction.php
new file mode 100644
index 000000000000..cd01151b99d2
--- /dev/null
+++ b/BackupDr/src/V1/Scheduling/InstanceTerminationAction.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction
+ */
+class InstanceTerminationAction
+{
+ /**
+ * Default value. This value is unused.
+ *
+ * Generated from protobuf enum INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0;
+ */
+ const INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0;
+ /**
+ * Delete the VM.
+ *
+ * Generated from protobuf enum DELETE = 1;
+ */
+ const DELETE = 1;
+ /**
+ * Stop the VM without storing in-memory content. default action.
+ *
+ * Generated from protobuf enum STOP = 2;
+ */
+ const STOP = 2;
+
+ private static $valueToName = [
+ self::INSTANCE_TERMINATION_ACTION_UNSPECIFIED => 'INSTANCE_TERMINATION_ACTION_UNSPECIFIED',
+ self::DELETE => 'DELETE',
+ self::STOP => 'STOP',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/Scheduling/NodeAffinity.php b/BackupDr/src/V1/Scheduling/NodeAffinity.php
new file mode 100644
index 000000000000..9068885d9fa7
--- /dev/null
+++ b/BackupDr/src/V1/Scheduling/NodeAffinity.php
@@ -0,0 +1,157 @@
+google.cloud.backupdr.v1.Scheduling.NodeAffinity
+ */
+class NodeAffinity extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Corresponds to the label key of Node resource.
+ *
+ * Generated from protobuf field optional string key = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $key = null;
+ /**
+ * Optional. Defines the operation of node selection.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $operator = null;
+ /**
+ * Optional. Corresponds to the label values of Node resource.
+ *
+ * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $values;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $key
+ * Optional. Corresponds to the label key of Node resource.
+ * @type int $operator
+ * Optional. Defines the operation of node selection.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $values
+ * Optional. Corresponds to the label values of Node resource.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Corresponds to the label key of Node resource.
+ *
+ * Generated from protobuf field optional string key = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getKey()
+ {
+ return isset($this->key) ? $this->key : '';
+ }
+
+ public function hasKey()
+ {
+ return isset($this->key);
+ }
+
+ public function clearKey()
+ {
+ unset($this->key);
+ }
+
+ /**
+ * Optional. Corresponds to the label key of Node resource.
+ *
+ * Generated from protobuf field optional string key = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->key = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Defines the operation of node selection.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getOperator()
+ {
+ return isset($this->operator) ? $this->operator : 0;
+ }
+
+ public function hasOperator()
+ {
+ return isset($this->operator);
+ }
+
+ public function clearOperator()
+ {
+ unset($this->operator);
+ }
+
+ /**
+ * Optional. Defines the operation of node selection.
+ *
+ * Generated from protobuf field optional .google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setOperator($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\Scheduling\NodeAffinity\Operator::class);
+ $this->operator = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Corresponds to the label values of Node resource.
+ *
+ * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * Optional. Corresponds to the label values of Node resource.
+ *
+ * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->values = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/BackupDr/src/V1/Scheduling/NodeAffinity/Operator.php b/BackupDr/src/V1/Scheduling/NodeAffinity/Operator.php
new file mode 100644
index 000000000000..3117fed94931
--- /dev/null
+++ b/BackupDr/src/V1/Scheduling/NodeAffinity/Operator.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator
+ */
+class Operator
+{
+ /**
+ * Default value. This value is unused.
+ *
+ * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0;
+ */
+ const OPERATOR_UNSPECIFIED = 0;
+ /**
+ * Requires Compute Engine to seek for matched nodes.
+ *
+ * Generated from protobuf enum IN = 1;
+ */
+ const IN = 1;
+ /**
+ * Requires Compute Engine to avoid certain nodes.
+ *
+ * Generated from protobuf enum NOT_IN = 2;
+ */
+ const NOT_IN = 2;
+
+ private static $valueToName = [
+ self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED',
+ self::IN => 'IN',
+ self::NOT_IN => 'NOT_IN',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/Scheduling/OnHostMaintenance.php b/BackupDr/src/V1/Scheduling/OnHostMaintenance.php
new file mode 100644
index 000000000000..9a388fd66a95
--- /dev/null
+++ b/BackupDr/src/V1/Scheduling/OnHostMaintenance.php
@@ -0,0 +1,64 @@
+google.cloud.backupdr.v1.Scheduling.OnHostMaintenance
+ */
+class OnHostMaintenance
+{
+ /**
+ * Default value. This value is unused.
+ *
+ * Generated from protobuf enum ON_HOST_MAINTENANCE_UNSPECIFIED = 0;
+ */
+ const ON_HOST_MAINTENANCE_UNSPECIFIED = 0;
+ /**
+ * Tells Compute Engine to terminate and (optionally) restart the instance
+ * away from the maintenance activity.
+ *
+ * Generated from protobuf enum TERMINATE = 1;
+ */
+ const TERMINATE = 1;
+ /**
+ * Default, Allows Compute Engine to automatically migrate instances
+ * out of the way of maintenance events.
+ *
+ * Generated from protobuf enum MIGRATE = 1000;
+ */
+ const MIGRATE = 1000;
+
+ private static $valueToName = [
+ self::ON_HOST_MAINTENANCE_UNSPECIFIED => 'ON_HOST_MAINTENANCE_UNSPECIFIED',
+ self::TERMINATE => 'TERMINATE',
+ self::MIGRATE => 'MIGRATE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/Scheduling/ProvisioningModel.php b/BackupDr/src/V1/Scheduling/ProvisioningModel.php
new file mode 100644
index 000000000000..50d92477518f
--- /dev/null
+++ b/BackupDr/src/V1/Scheduling/ProvisioningModel.php
@@ -0,0 +1,62 @@
+google.cloud.backupdr.v1.Scheduling.ProvisioningModel
+ */
+class ProvisioningModel
+{
+ /**
+ * Default value. This value is not used.
+ *
+ * Generated from protobuf enum PROVISIONING_MODEL_UNSPECIFIED = 0;
+ */
+ const PROVISIONING_MODEL_UNSPECIFIED = 0;
+ /**
+ * Standard provisioning with user controlled runtime, no discounts.
+ *
+ * Generated from protobuf enum STANDARD = 1;
+ */
+ const STANDARD = 1;
+ /**
+ * Heavily discounted, no guaranteed runtime.
+ *
+ * Generated from protobuf enum SPOT = 2;
+ */
+ const SPOT = 2;
+
+ private static $valueToName = [
+ self::PROVISIONING_MODEL_UNSPECIFIED => 'PROVISIONING_MODEL_UNSPECIFIED',
+ self::STANDARD => 'STANDARD',
+ self::SPOT => 'SPOT',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/SchedulingDuration.php b/BackupDr/src/V1/SchedulingDuration.php
new file mode 100644
index 000000000000..cc3c3abf8a1a
--- /dev/null
+++ b/BackupDr/src/V1/SchedulingDuration.php
@@ -0,0 +1,128 @@
+google.cloud.backupdr.v1.SchedulingDuration
+ */
+class SchedulingDuration extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Span of time at a resolution of a second.
+ *
+ * Generated from protobuf field optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $seconds = null;
+ /**
+ * Optional. Span of time that's a fraction of a second at nanosecond
+ * resolution.
+ *
+ * Generated from protobuf field optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $nanos = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $seconds
+ * Optional. Span of time at a resolution of a second.
+ * @type int $nanos
+ * Optional. Span of time that's a fraction of a second at nanosecond
+ * resolution.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Span of time at a resolution of a second.
+ *
+ * Generated from protobuf field optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int|string
+ */
+ public function getSeconds()
+ {
+ return isset($this->seconds) ? $this->seconds : 0;
+ }
+
+ public function hasSeconds()
+ {
+ return isset($this->seconds);
+ }
+
+ public function clearSeconds()
+ {
+ unset($this->seconds);
+ }
+
+ /**
+ * Optional. Span of time at a resolution of a second.
+ *
+ * Generated from protobuf field optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSeconds($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->seconds = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Span of time that's a fraction of a second at nanosecond
+ * resolution.
+ *
+ * Generated from protobuf field optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getNanos()
+ {
+ return isset($this->nanos) ? $this->nanos : 0;
+ }
+
+ public function hasNanos()
+ {
+ return isset($this->nanos);
+ }
+
+ public function clearNanos()
+ {
+ unset($this->nanos);
+ }
+
+ /**
+ * Optional. Span of time that's a fraction of a second at nanosecond
+ * resolution.
+ *
+ * Generated from protobuf field optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ServiceAccount.php b/BackupDr/src/V1/ServiceAccount.php
new file mode 100644
index 000000000000..2555e69a2e1d
--- /dev/null
+++ b/BackupDr/src/V1/ServiceAccount.php
@@ -0,0 +1,111 @@
+google.cloud.backupdr.v1.ServiceAccount
+ */
+class ServiceAccount extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Email address of the service account.
+ *
+ * Generated from protobuf field optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $email = null;
+ /**
+ * Optional. The list of scopes to be made available for this service account.
+ *
+ * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $scopes;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $email
+ * Optional. Email address of the service account.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $scopes
+ * Optional. The list of scopes to be made available for this service account.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Email address of the service account.
+ *
+ * Generated from protobuf field optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEmail()
+ {
+ return isset($this->email) ? $this->email : '';
+ }
+
+ public function hasEmail()
+ {
+ return isset($this->email);
+ }
+
+ public function clearEmail()
+ {
+ unset($this->email);
+ }
+
+ /**
+ * Optional. Email address of the service account.
+ *
+ * Generated from protobuf field optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEmail($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->email = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The list of scopes to be made available for this service account.
+ *
+ * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getScopes()
+ {
+ return $this->scopes;
+ }
+
+ /**
+ * Optional. The list of scopes to be made available for this service account.
+ *
+ * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setScopes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->scopes = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/ServiceLockInfo.php b/BackupDr/src/V1/ServiceLockInfo.php
new file mode 100644
index 000000000000..1191b4e15201
--- /dev/null
+++ b/BackupDr/src/V1/ServiceLockInfo.php
@@ -0,0 +1,72 @@
+google.cloud.backupdr.v1.ServiceLockInfo
+ */
+class ServiceLockInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. The name of the operation that created this lock.
+ * The lock will automatically be released when the operation completes.
+ *
+ * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $operation = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $operation
+ * Output only. The name of the operation that created this lock.
+ * The lock will automatically be released when the operation completes.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. The name of the operation that created this lock.
+ * The lock will automatically be released when the operation completes.
+ *
+ * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getOperation()
+ {
+ return $this->operation;
+ }
+
+ /**
+ * Output only. The name of the operation that created this lock.
+ * The lock will automatically be released when the operation completes.
+ *
+ * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setOperation($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->operation = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/StandardSchedule.php b/BackupDr/src/V1/StandardSchedule.php
new file mode 100644
index 000000000000..a6936ec9b05d
--- /dev/null
+++ b/BackupDr/src/V1/StandardSchedule.php
@@ -0,0 +1,447 @@
+google.cloud.backupdr.v1.StandardSchedule
+ */
+class StandardSchedule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Specifies the `RecurrenceType` for the schedule.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $recurrence_type = 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`.
+ * Value of hourly frequency should be between 6 and 23.
+ * Reason for limit : We found that there is bandwidth limitation of 3GB/S for
+ * GMI while taking a backup and 5GB/S while doing a restore. Given the amount
+ * of parallel backups and restore we are targeting, this will potentially
+ * take the backup time to mins and hours (in worst case scenario).
+ *
+ * Generated from protobuf field int32 hourly_frequency = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $hourly_frequency = 0;
+ /**
+ * 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`.
+ *
+ * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $days_of_week;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $days_of_month;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $week_day_of_month = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $months;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_window = null;
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string time_zone = 8 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $time_zone = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $recurrence_type
+ * Required. Specifies the `RecurrenceType` for the schedule.
+ * @type int $hourly_frequency
+ * 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`.
+ * Value of hourly frequency should be between 6 and 23.
+ * Reason for limit : We found that there is bandwidth limitation of 3GB/S for
+ * GMI while taking a backup and 5GB/S while doing a restore. Given the amount
+ * of parallel backups and restore we are targeting, this will potentially
+ * take the backup time to mins and hours (in worst case scenario).
+ * @type array|\Google\Protobuf\Internal\RepeatedField $days_of_week
+ * 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`.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $days_of_month
+ * 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.
+ * @type \Google\Cloud\BackupDR\V1\WeekDayOfMonth $week_day_of_month
+ * 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.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $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.
+ * @type \Google\Cloud\BackupDR\V1\BackupWindow $backup_window
+ * 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.
+ * @type string $time_zone
+ * 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.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Specifies the `RecurrenceType` for the schedule.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return int
+ */
+ public function getRecurrenceType()
+ {
+ return $this->recurrence_type;
+ }
+
+ /**
+ * Required. Specifies the `RecurrenceType` for the schedule.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param int $var
+ * @return $this
+ */
+ public function setRecurrenceType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\StandardSchedule\RecurrenceType::class);
+ $this->recurrence_type = $var;
+
+ 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`.
+ * Value of hourly frequency should be between 6 and 23.
+ * Reason for limit : We found that there is bandwidth limitation of 3GB/S for
+ * GMI while taking a backup and 5GB/S while doing a restore. Given the amount
+ * of parallel backups and restore we are targeting, this will potentially
+ * take the backup time to mins and hours (in worst case scenario).
+ *
+ * Generated from protobuf field int32 hourly_frequency = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getHourlyFrequency()
+ {
+ return $this->hourly_frequency;
+ }
+
+ /**
+ * 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`.
+ * Value of hourly frequency should be between 6 and 23.
+ * Reason for limit : We found that there is bandwidth limitation of 3GB/S for
+ * GMI while taking a backup and 5GB/S while doing a restore. Given the amount
+ * of parallel backups and restore we are targeting, this will potentially
+ * take the backup time to mins and hours (in worst case scenario).
+ *
+ * Generated from protobuf field int32 hourly_frequency = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setHourlyFrequency($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->hourly_frequency = $var;
+
+ 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`.
+ *
+ * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDaysOfWeek()
+ {
+ return $this->days_of_week;
+ }
+
+ /**
+ * 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`.
+ *
+ * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDaysOfWeek($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\DayOfWeek::class);
+ $this->days_of_week = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDaysOfMonth()
+ {
+ return $this->days_of_month;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDaysOfMonth($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->days_of_month = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\BackupDR\V1\WeekDayOfMonth|null
+ */
+ public function getWeekDayOfMonth()
+ {
+ return $this->week_day_of_month;
+ }
+
+ public function hasWeekDayOfMonth()
+ {
+ return isset($this->week_day_of_month);
+ }
+
+ public function clearWeekDayOfMonth()
+ {
+ unset($this->week_day_of_month);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\BackupDR\V1\WeekDayOfMonth $var
+ * @return $this
+ */
+ public function setWeekDayOfMonth($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\WeekDayOfMonth::class);
+ $this->week_day_of_month = $var;
+
+ 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.
+ *
+ * Generated from protobuf field repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMonths()
+ {
+ return $this->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.
+ *
+ * Generated from protobuf field repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMonths($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\Month::class);
+ $this->months = $arr;
+
+ 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.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\BackupDR\V1\BackupWindow|null
+ */
+ public function getBackupWindow()
+ {
+ return $this->backup_window;
+ }
+
+ public function hasBackupWindow()
+ {
+ return isset($this->backup_window);
+ }
+
+ public function clearBackupWindow()
+ {
+ unset($this->backup_window);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\BackupDR\V1\BackupWindow $var
+ * @return $this
+ */
+ public function setBackupWindow($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupWindow::class);
+ $this->backup_window = $var;
+
+ 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.
+ *
+ * Generated from protobuf field string time_zone = 8 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getTimeZone()
+ {
+ return $this->time_zone;
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field string time_zone = 8 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setTimeZone($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->time_zone = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/StandardSchedule/RecurrenceType.php b/BackupDr/src/V1/StandardSchedule/RecurrenceType.php
new file mode 100644
index 000000000000..4ee2035fcff1
--- /dev/null
+++ b/BackupDr/src/V1/StandardSchedule/RecurrenceType.php
@@ -0,0 +1,83 @@
+google.cloud.backupdr.v1.StandardSchedule.RecurrenceType
+ */
+class RecurrenceType
+{
+ /**
+ * recurrence type not set
+ *
+ * Generated from protobuf enum RECURRENCE_TYPE_UNSPECIFIED = 0;
+ */
+ const RECURRENCE_TYPE_UNSPECIFIED = 0;
+ /**
+ * The `BackupRule` is to be applied hourly.
+ *
+ * Generated from protobuf enum HOURLY = 1;
+ */
+ const HOURLY = 1;
+ /**
+ * The `BackupRule` is to be applied daily.
+ *
+ * Generated from protobuf enum DAILY = 2;
+ */
+ const DAILY = 2;
+ /**
+ * The `BackupRule` is to be applied weekly.
+ *
+ * Generated from protobuf enum WEEKLY = 3;
+ */
+ const WEEKLY = 3;
+ /**
+ * The `BackupRule` is to be applied monthly.
+ *
+ * Generated from protobuf enum MONTHLY = 4;
+ */
+ const MONTHLY = 4;
+ /**
+ * The `BackupRule` is to be applied yearly.
+ *
+ * Generated from protobuf enum YEARLY = 5;
+ */
+ const YEARLY = 5;
+
+ private static $valueToName = [
+ self::RECURRENCE_TYPE_UNSPECIFIED => 'RECURRENCE_TYPE_UNSPECIFIED',
+ self::HOURLY => 'HOURLY',
+ self::DAILY => 'DAILY',
+ self::WEEKLY => 'WEEKLY',
+ self::MONTHLY => 'MONTHLY',
+ self::YEARLY => 'YEARLY',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/Tags.php b/BackupDr/src/V1/Tags.php
new file mode 100644
index 000000000000..5c7e2cc19aff
--- /dev/null
+++ b/BackupDr/src/V1/Tags.php
@@ -0,0 +1,71 @@
+google.cloud.backupdr.v1.Tags
+ */
+class Tags extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. An array of tags. Each tag must be 1-63 characters long, and
+ * comply with RFC1035.
+ *
+ * Generated from protobuf field repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $items;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $items
+ * Optional. An array of tags. Each tag must be 1-63 characters long, and
+ * comply with RFC1035.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\BackupvaultGce::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. An array of tags. Each tag must be 1-63 characters long, and
+ * comply with RFC1035.
+ *
+ * Generated from protobuf field repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getItems()
+ {
+ return $this->items;
+ }
+
+ /**
+ * Optional. An array of tags. Each tag must be 1-63 characters long, and
+ * comply with RFC1035.
+ *
+ * Generated from protobuf field repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setItems($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->items = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/TargetResource.php b/BackupDr/src/V1/TargetResource.php
new file mode 100644
index 000000000000..2b664c8ac0b2
--- /dev/null
+++ b/BackupDr/src/V1/TargetResource.php
@@ -0,0 +1,75 @@
+google.cloud.backupdr.v1.TargetResource
+ */
+class TargetResource extends \Google\Protobuf\Internal\Message
+{
+ protected $target_resource_info;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\BackupDR\V1\GcpResource $gcp_resource
+ * Details of the native Google Cloud resource created as part of restore.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Details of the native Google Cloud resource created as part of restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.GcpResource gcp_resource = 1;
+ * @return \Google\Cloud\BackupDR\V1\GcpResource|null
+ */
+ public function getGcpResource()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasGcpResource()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Details of the native Google Cloud resource created as part of restore.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.GcpResource gcp_resource = 1;
+ * @param \Google\Cloud\BackupDR\V1\GcpResource $var
+ * @return $this
+ */
+ public function setGcpResource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\GcpResource::class);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTargetResourceInfo()
+ {
+ return $this->whichOneof("target_resource_info");
+ }
+
+}
+
diff --git a/BackupDr/src/V1/TriggerBackupRequest.php b/BackupDr/src/V1/TriggerBackupRequest.php
new file mode 100644
index 000000000000..c83aa7eafd80
--- /dev/null
+++ b/BackupDr/src/V1/TriggerBackupRequest.php
@@ -0,0 +1,196 @@
+google.cloud.backupdr.v1.TriggerBackupRequest
+ */
+class TriggerBackupRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * Required. backup rule_id for which a backup needs to be triggered.
+ *
+ * Generated from protobuf field string rule_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $rule_id = '';
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+
+ /**
+ * @param string $name Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ * Please see {@see BackupDRClient::backupPlanAssociationName()} for help formatting this field.
+ * @param string $ruleId Required. backup rule_id for which a backup needs to be triggered.
+ *
+ * @return \Google\Cloud\BackupDR\V1\TriggerBackupRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name, string $ruleId): self
+ {
+ return (new self())
+ ->setName($name)
+ ->setRuleId($ruleId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ * @type string $rule_id
+ * Required. backup rule_id for which a backup needs to be triggered.
+ * @type string $request_id
+ * 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).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplanassociation::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Required. Name of the backup plan association resource, in the format
+ * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. backup rule_id for which a backup needs to be triggered.
+ *
+ * Generated from protobuf field string rule_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getRuleId()
+ {
+ return $this->rule_id;
+ }
+
+ /**
+ * Required. backup rule_id for which a backup needs to be triggered.
+ *
+ * Generated from protobuf field string rule_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setRuleId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->rule_id = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/UpdateBackupRequest.php b/BackupDr/src/V1/UpdateBackupRequest.php
new file mode 100644
index 000000000000..45590b90791f
--- /dev/null
+++ b/BackupDr/src/V1/UpdateBackupRequest.php
@@ -0,0 +1,230 @@
+google.cloud.backupdr.v1.UpdateBackupRequest
+ */
+class UpdateBackupRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $update_mask = null;
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup = null;
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+
+ /**
+ * @param \Google\Cloud\BackupDR\V1\Backup $backup Required. The resource being updated
+ * @param \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.
+ *
+ * @return \Google\Cloud\BackupDR\V1\UpdateBackupRequest
+ *
+ * @experimental
+ */
+ public static function build(\Google\Cloud\BackupDR\V1\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self
+ {
+ return (new self())
+ ->setBackup($backup)
+ ->setUpdateMask($updateMask);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\FieldMask $update_mask
+ * 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.
+ * @type \Google\Cloud\BackupDR\V1\Backup $backup
+ * Required. The resource being updated
+ * @type string $request_id
+ * 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).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getUpdateMask()
+ {
+ return $this->update_mask;
+ }
+
+ public function hasUpdateMask()
+ {
+ return isset($this->update_mask);
+ }
+
+ public function clearUpdateMask()
+ {
+ unset($this->update_mask);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setUpdateMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->update_mask = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\BackupDR\V1\Backup|null
+ */
+ public function getBackup()
+ {
+ return $this->backup;
+ }
+
+ public function hasBackup()
+ {
+ return isset($this->backup);
+ }
+
+ public function clearBackup()
+ {
+ unset($this->backup);
+ }
+
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\BackupDR\V1\Backup $var
+ * @return $this
+ */
+ public function setBackup($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\Backup::class);
+ $this->backup = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/UpdateBackupVaultRequest.php b/BackupDr/src/V1/UpdateBackupVaultRequest.php
new file mode 100644
index 000000000000..4a985422b43f
--- /dev/null
+++ b/BackupDr/src/V1/UpdateBackupVaultRequest.php
@@ -0,0 +1,306 @@
+google.cloud.backupdr.v1.UpdateBackupVaultRequest
+ */
+class UpdateBackupVaultRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $update_mask = null;
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $backup_vault = null;
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+ /**
+ * Optional. If set to true, will not check plan duration against backup vault
+ * enforcement duration.
+ *
+ * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $force = false;
+
+ /**
+ * @param \Google\Cloud\BackupDR\V1\BackupVault $backupVault Required. The resource being updated
+ * @param \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.
+ *
+ * @return \Google\Cloud\BackupDR\V1\UpdateBackupVaultRequest
+ *
+ * @experimental
+ */
+ public static function build(\Google\Cloud\BackupDR\V1\BackupVault $backupVault, \Google\Protobuf\FieldMask $updateMask): self
+ {
+ return (new self())
+ ->setBackupVault($backupVault)
+ ->setUpdateMask($updateMask);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\FieldMask $update_mask
+ * 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.
+ * @type \Google\Cloud\BackupDR\V1\BackupVault $backup_vault
+ * Required. The resource being updated
+ * @type string $request_id
+ * 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).
+ * @type bool $validate_only
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ * @type bool $force
+ * Optional. If set to true, will not check plan duration against backup vault
+ * enforcement duration.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getUpdateMask()
+ {
+ return $this->update_mask;
+ }
+
+ public function hasUpdateMask()
+ {
+ return isset($this->update_mask);
+ }
+
+ public function clearUpdateMask()
+ {
+ unset($this->update_mask);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setUpdateMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->update_mask = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\BackupDR\V1\BackupVault|null
+ */
+ public function getBackupVault()
+ {
+ return $this->backup_vault;
+ }
+
+ public function hasBackupVault()
+ {
+ return isset($this->backup_vault);
+ }
+
+ public function clearBackupVault()
+ {
+ unset($this->backup_vault);
+ }
+
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\BackupDR\V1\BackupVault $var
+ * @return $this
+ */
+ public function setBackupVault($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupVault::class);
+ $this->backup_vault = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. Only validate the request, but do not perform mutations.
+ * The default is 'false'.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, will not check plan duration against backup vault
+ * enforcement duration.
+ *
+ * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getForce()
+ {
+ return $this->force;
+ }
+
+ /**
+ * Optional. If set to true, will not check plan duration against backup vault
+ * enforcement duration.
+ *
+ * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setForce($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->force = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/UpdateDataSourceRequest.php b/BackupDr/src/V1/UpdateDataSourceRequest.php
new file mode 100644
index 000000000000..86e234620cef
--- /dev/null
+++ b/BackupDr/src/V1/UpdateDataSourceRequest.php
@@ -0,0 +1,264 @@
+google.cloud.backupdr.v1.UpdateDataSourceRequest
+ */
+class UpdateDataSourceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $update_mask = null;
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $data_source = null;
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ */
+ protected $request_id = '';
+ /**
+ * Optional. Enable upsert.
+ *
+ * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+
+ /**
+ * @param \Google\Cloud\BackupDR\V1\DataSource $dataSource Required. The resource being updated
+ * @param \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.
+ *
+ * @return \Google\Cloud\BackupDR\V1\UpdateDataSourceRequest
+ *
+ * @experimental
+ */
+ public static function build(\Google\Cloud\BackupDR\V1\DataSource $dataSource, \Google\Protobuf\FieldMask $updateMask): self
+ {
+ return (new self())
+ ->setDataSource($dataSource)
+ ->setUpdateMask($updateMask);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\FieldMask $update_mask
+ * 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.
+ * @type \Google\Cloud\BackupDR\V1\DataSource $data_source
+ * Required. The resource being updated
+ * @type string $request_id
+ * 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).
+ * @type bool $allow_missing
+ * Optional. Enable upsert.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupvault::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getUpdateMask()
+ {
+ return $this->update_mask;
+ }
+
+ public function hasUpdateMask()
+ {
+ return isset($this->update_mask);
+ }
+
+ public function clearUpdateMask()
+ {
+ unset($this->update_mask);
+ }
+
+ /**
+ * 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.
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setUpdateMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->update_mask = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\BackupDR\V1\DataSource|null
+ */
+ public function getDataSource()
+ {
+ return $this->data_source;
+ }
+
+ public function hasDataSource()
+ {
+ return isset($this->data_source);
+ }
+
+ public function clearDataSource()
+ {
+ unset($this->data_source);
+ }
+
+ /**
+ * Required. The resource being updated
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\BackupDR\V1\DataSource $var
+ * @return $this
+ */
+ public function setDataSource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\DataSource::class);
+ $this->data_source = $var;
+
+ 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getRequestId()
+ {
+ return $this->request_id;
+ }
+
+ /**
+ * 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).
+ *
+ * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setRequestId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->request_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Enable upsert.
+ *
+ * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. Enable upsert.
+ *
+ * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/WeekDayOfMonth.php b/BackupDr/src/V1/WeekDayOfMonth.php
new file mode 100644
index 000000000000..31a37263235e
--- /dev/null
+++ b/BackupDr/src/V1/WeekDayOfMonth.php
@@ -0,0 +1,103 @@
+google.cloud.backupdr.v1.WeekDayOfMonth
+ */
+class WeekDayOfMonth extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Specifies the week of the month.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $week_of_month = 0;
+ /**
+ * Required. Specifies the day of the week.
+ *
+ * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $day_of_week = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $week_of_month
+ * Required. Specifies the week of the month.
+ * @type int $day_of_week
+ * Required. Specifies the day of the week.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Backupdr\V1\Backupplan::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Specifies the week of the month.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return int
+ */
+ public function getWeekOfMonth()
+ {
+ return $this->week_of_month;
+ }
+
+ /**
+ * Required. Specifies the week of the month.
+ *
+ * Generated from protobuf field .google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param int $var
+ * @return $this
+ */
+ public function setWeekOfMonth($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\WeekDayOfMonth\WeekOfMonth::class);
+ $this->week_of_month = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Specifies the day of the week.
+ *
+ * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return int
+ */
+ public function getDayOfWeek()
+ {
+ return $this->day_of_week;
+ }
+
+ /**
+ * Required. Specifies the day of the week.
+ *
+ * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param int $var
+ * @return $this
+ */
+ public function setDayOfWeek($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class);
+ $this->day_of_week = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/BackupDr/src/V1/WeekDayOfMonth/WeekOfMonth.php b/BackupDr/src/V1/WeekDayOfMonth/WeekOfMonth.php
new file mode 100644
index 000000000000..261806c3b318
--- /dev/null
+++ b/BackupDr/src/V1/WeekDayOfMonth/WeekOfMonth.php
@@ -0,0 +1,84 @@
+google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth
+ */
+class WeekOfMonth
+{
+ /**
+ * The zero value. Do not use.
+ *
+ * Generated from protobuf enum WEEK_OF_MONTH_UNSPECIFIED = 0;
+ */
+ const WEEK_OF_MONTH_UNSPECIFIED = 0;
+ /**
+ * The first week of the month.
+ *
+ * Generated from protobuf enum FIRST = 1;
+ */
+ const FIRST = 1;
+ /**
+ * The second week of the month.
+ *
+ * Generated from protobuf enum SECOND = 2;
+ */
+ const SECOND = 2;
+ /**
+ * The third week of the month.
+ *
+ * Generated from protobuf enum THIRD = 3;
+ */
+ const THIRD = 3;
+ /**
+ * The fourth week of the month.
+ *
+ * Generated from protobuf enum FOURTH = 4;
+ */
+ const FOURTH = 4;
+ /**
+ * The last week of the month.
+ *
+ * Generated from protobuf enum LAST = 5;
+ */
+ const LAST = 5;
+
+ private static $valueToName = [
+ self::WEEK_OF_MONTH_UNSPECIFIED => 'WEEK_OF_MONTH_UNSPECIFIED',
+ self::FIRST => 'FIRST',
+ self::SECOND => 'SECOND',
+ self::THIRD => 'THIRD',
+ self::FOURTH => 'FOURTH',
+ self::LAST => 'LAST',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/BackupDr/src/V1/gapic_metadata.json b/BackupDr/src/V1/gapic_metadata.json
index 37b3567fa87d..130c7f38a667 100644
--- a/BackupDr/src/V1/gapic_metadata.json
+++ b/BackupDr/src/V1/gapic_metadata.json
@@ -10,26 +10,141 @@
"grpc": {
"libraryClient": "BackupDRGapicClient",
"rpcs": {
+ "CreateBackupPlan": {
+ "methods": [
+ "createBackupPlan"
+ ]
+ },
+ "CreateBackupPlanAssociation": {
+ "methods": [
+ "createBackupPlanAssociation"
+ ]
+ },
+ "CreateBackupVault": {
+ "methods": [
+ "createBackupVault"
+ ]
+ },
"CreateManagementServer": {
"methods": [
"createManagementServer"
]
},
+ "DeleteBackup": {
+ "methods": [
+ "deleteBackup"
+ ]
+ },
+ "DeleteBackupPlan": {
+ "methods": [
+ "deleteBackupPlan"
+ ]
+ },
+ "DeleteBackupPlanAssociation": {
+ "methods": [
+ "deleteBackupPlanAssociation"
+ ]
+ },
+ "DeleteBackupVault": {
+ "methods": [
+ "deleteBackupVault"
+ ]
+ },
"DeleteManagementServer": {
"methods": [
"deleteManagementServer"
]
},
+ "FetchUsableBackupVaults": {
+ "methods": [
+ "fetchUsableBackupVaults"
+ ]
+ },
+ "GetBackup": {
+ "methods": [
+ "getBackup"
+ ]
+ },
+ "GetBackupPlan": {
+ "methods": [
+ "getBackupPlan"
+ ]
+ },
+ "GetBackupPlanAssociation": {
+ "methods": [
+ "getBackupPlanAssociation"
+ ]
+ },
+ "GetBackupVault": {
+ "methods": [
+ "getBackupVault"
+ ]
+ },
+ "GetDataSource": {
+ "methods": [
+ "getDataSource"
+ ]
+ },
"GetManagementServer": {
"methods": [
"getManagementServer"
]
},
+ "ListBackupPlanAssociations": {
+ "methods": [
+ "listBackupPlanAssociations"
+ ]
+ },
+ "ListBackupPlans": {
+ "methods": [
+ "listBackupPlans"
+ ]
+ },
+ "ListBackupVaults": {
+ "methods": [
+ "listBackupVaults"
+ ]
+ },
+ "ListBackups": {
+ "methods": [
+ "listBackups"
+ ]
+ },
+ "ListDataSources": {
+ "methods": [
+ "listDataSources"
+ ]
+ },
"ListManagementServers": {
"methods": [
"listManagementServers"
]
},
+ "RestoreBackup": {
+ "methods": [
+ "restoreBackup"
+ ]
+ },
+ "TriggerBackup": {
+ "methods": [
+ "triggerBackup"
+ ]
+ },
+ "UpdateBackup": {
+ "methods": [
+ "updateBackup"
+ ]
+ },
+ "UpdateBackupVault": {
+ "methods": [
+ "updateBackupVault"
+ ]
+ },
+ "UpdateDataSource": {
+ "methods": [
+ "updateDataSource"
+ ]
+ },
"GetLocation": {
"methods": [
"getLocation"
diff --git a/BackupDr/src/V1/resources/backup_dr_client_config.json b/BackupDr/src/V1/resources/backup_dr_client_config.json
index 5c162679d6d7..c505f44b1add 100644
--- a/BackupDr/src/V1/resources/backup_dr_client_config.json
+++ b/BackupDr/src/V1/resources/backup_dr_client_config.json
@@ -38,26 +38,141 @@
}
},
"methods": {
+ "CreateBackupPlan": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "CreateBackupPlanAssociation": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "CreateBackupVault": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
"CreateManagementServer": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
+ "DeleteBackup": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "DeleteBackupPlan": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "DeleteBackupPlanAssociation": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "DeleteBackupVault": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
"DeleteManagementServer": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
+ "FetchUsableBackupVaults": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "GetBackup": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "GetBackupPlan": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "GetBackupPlanAssociation": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "GetBackupVault": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "GetDataSource": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
"GetManagementServer": {
"timeout_millis": 60000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
+ "ListBackupPlanAssociations": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "ListBackupPlans": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "ListBackupVaults": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "ListBackups": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "ListDataSources": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
"ListManagementServers": {
"timeout_millis": 60000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params"
},
+ "RestoreBackup": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "TriggerBackup": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_codes",
+ "retry_params_name": "no_retry_params"
+ },
+ "UpdateBackup": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "UpdateBackupVault": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "UpdateDataSource": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
"GetLocation": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_codes",
diff --git a/BackupDr/src/V1/resources/backup_dr_descriptor_config.php b/BackupDr/src/V1/resources/backup_dr_descriptor_config.php
index 44417b94b54a..669fa4bd998c 100644
--- a/BackupDr/src/V1/resources/backup_dr_descriptor_config.php
+++ b/BackupDr/src/V1/resources/backup_dr_descriptor_config.php
@@ -23,6 +23,63 @@
return [
'interfaces' => [
'google.cloud.backupdr.v1.BackupDR' => [
+ 'CreateBackupPlan' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\BackupPlan',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'CreateBackupPlanAssociation' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\BackupPlanAssociation',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'CreateBackupVault' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\BackupVault',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'CreateManagementServer' => [
'longRunning' => [
'operationReturnType' => '\Google\Cloud\BackupDR\V1\ManagementServer',
@@ -42,6 +99,82 @@
],
],
],
+ 'DeleteBackup' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\Backup',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteBackupPlan' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteBackupPlanAssociation' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteBackupVault' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'DeleteManagementServer' => [
'longRunning' => [
'operationReturnType' => '\Google\Protobuf\GPBEmpty',
@@ -61,6 +194,184 @@
],
],
],
+ 'RestoreBackup' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\RestoreBackupResponse',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'TriggerBackup' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\BackupPlanAssociation',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdateBackup' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\Backup',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'backup.name',
+ 'fieldAccessors' => [
+ 'getBackup',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdateBackupVault' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\BackupVault',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'backup_vault.name',
+ 'fieldAccessors' => [
+ 'getBackupVault',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdateDataSource' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\BackupDR\V1\DataSource',
+ 'metadataReturnType' => '\Google\Cloud\BackupDR\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'data_source.name',
+ 'fieldAccessors' => [
+ 'getDataSource',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'FetchUsableBackupVaults' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getBackupVaults',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\FetchUsableBackupVaultsResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'GetBackup' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\Backup',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetBackupPlan' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\BackupPlan',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetBackupPlanAssociation' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\BackupPlanAssociation',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetBackupVault' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\BackupVault',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetDataSource' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\DataSource',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetManagementServer' => [
'callType' => \Google\ApiCore\Call::UNARY_CALL,
'responseType' => 'Google\Cloud\BackupDR\V1\ManagementServer',
@@ -73,6 +384,106 @@
],
],
],
+ 'ListBackupPlanAssociations' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getBackupPlanAssociations',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\ListBackupPlanAssociationsResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListBackupPlans' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getBackupPlans',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\ListBackupPlansResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListBackupVaults' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getBackupVaults',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\ListBackupVaultsResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListBackups' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getBackups',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\ListBackupsResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListDataSources' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getDataSources',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\BackupDR\V1\ListDataSourcesResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'ListManagementServers' => [
'pageStreaming' => [
'requestPageTokenGetMethod' => 'getPageToken',
@@ -167,6 +578,11 @@
'interfaceOverride' => 'google.iam.v1.IAMPolicy',
],
'templateMap' => [
+ 'backup' => 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}',
+ 'backupPlan' => 'projects/{project}/locations/{location}/backupPlans/{backup_plan}',
+ 'backupPlanAssociation' => 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}',
+ 'backupVault' => 'projects/{project}/locations/{location}/backupVaults/{backupvault}',
+ 'dataSource' => 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}',
'location' => 'projects/{project}/locations/{location}',
'managementServer' => 'projects/{project}/locations/{location}/managementServers/{managementserver}',
],
diff --git a/BackupDr/src/V1/resources/backup_dr_rest_client_config.php b/BackupDr/src/V1/resources/backup_dr_rest_client_config.php
index 41f4e3a9cf92..072b35af529f 100644
--- a/BackupDr/src/V1/resources/backup_dr_rest_client_config.php
+++ b/BackupDr/src/V1/resources/backup_dr_rest_client_config.php
@@ -23,6 +23,51 @@
return [
'interfaces' => [
'google.cloud.backupdr.v1.BackupDR' => [
+ 'CreateBackupPlan' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlans',
+ 'body' => 'backup_plan',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'backup_plan_id',
+ ],
+ ],
+ 'CreateBackupPlanAssociation' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlanAssociations',
+ 'body' => 'backup_plan_association',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'backup_plan_association_id',
+ ],
+ ],
+ 'CreateBackupVault' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults',
+ 'body' => 'backup_vault',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'backup_vault_id',
+ ],
+ ],
'CreateManagementServer' => [
'method' => 'post',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/managementServers',
@@ -38,6 +83,50 @@
'management_server_id',
],
],
+ 'DeleteBackup' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteBackupPlan' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteBackupPlanAssociation' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlanAssociations/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteBackupVault' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'DeleteManagementServer' => [
'method' => 'delete',
'uriTemplate' => '/v1/{name=projects/*/locations/*/managementServers/*}',
@@ -49,6 +138,72 @@
],
],
],
+ 'FetchUsableBackupVaults' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'GetBackup' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetBackupPlan' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetBackupPlanAssociation' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlanAssociations/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetBackupVault' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetDataSource' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetManagementServer' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/locations/*/managementServers/*}',
@@ -60,6 +215,61 @@
],
],
],
+ 'ListBackupPlanAssociations' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlanAssociations',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListBackupPlans' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlans',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListBackupVaults' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListBackups' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListDataSources' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'ListManagementServers' => [
'method' => 'get',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/managementServers',
@@ -71,6 +281,78 @@
],
],
],
+ 'RestoreBackup' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore',
+ 'body' => '*',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'TriggerBackup' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup',
+ 'body' => '*',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdateBackup' => [
+ 'method' => 'patch',
+ 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}',
+ 'body' => 'backup',
+ 'placeholders' => [
+ 'backup.name' => [
+ 'getters' => [
+ 'getBackup',
+ 'getName',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'update_mask',
+ ],
+ ],
+ 'UpdateBackupVault' => [
+ 'method' => 'patch',
+ 'uriTemplate' => '/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}',
+ 'body' => 'backup_vault',
+ 'placeholders' => [
+ 'backup_vault.name' => [
+ 'getters' => [
+ 'getBackupVault',
+ 'getName',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'update_mask',
+ ],
+ ],
+ 'UpdateDataSource' => [
+ 'method' => 'patch',
+ 'uriTemplate' => '/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}',
+ 'body' => 'data_source',
+ 'placeholders' => [
+ 'data_source.name' => [
+ 'getters' => [
+ 'getDataSource',
+ 'getName',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'update_mask',
+ ],
+ ],
],
'google.cloud.location.Locations' => [
'GetLocation' => [
diff --git a/BackupDr/tests/Unit/V1/Client/BackupDRClientTest.php b/BackupDr/tests/Unit/V1/Client/BackupDRClientTest.php
index 899c1b728151..f836c6098019 100644
--- a/BackupDr/tests/Unit/V1/Client/BackupDRClientTest.php
+++ b/BackupDr/tests/Unit/V1/Client/BackupDRClientTest.php
@@ -26,13 +26,48 @@
use Google\ApiCore\CredentialsWrapper;
use Google\ApiCore\Testing\GeneratedTest;
use Google\ApiCore\Testing\MockTransport;
+use Google\Cloud\BackupDR\V1\Backup;
+use Google\Cloud\BackupDR\V1\BackupPlan;
+use Google\Cloud\BackupDR\V1\BackupPlanAssociation;
+use Google\Cloud\BackupDR\V1\BackupVault;
use Google\Cloud\BackupDR\V1\Client\BackupDRClient;
+use Google\Cloud\BackupDR\V1\CreateBackupPlanAssociationRequest;
+use Google\Cloud\BackupDR\V1\CreateBackupPlanRequest;
+use Google\Cloud\BackupDR\V1\CreateBackupVaultRequest;
use Google\Cloud\BackupDR\V1\CreateManagementServerRequest;
+use Google\Cloud\BackupDR\V1\DataSource;
+use Google\Cloud\BackupDR\V1\DeleteBackupPlanAssociationRequest;
+use Google\Cloud\BackupDR\V1\DeleteBackupPlanRequest;
+use Google\Cloud\BackupDR\V1\DeleteBackupRequest;
+use Google\Cloud\BackupDR\V1\DeleteBackupVaultRequest;
use Google\Cloud\BackupDR\V1\DeleteManagementServerRequest;
+use Google\Cloud\BackupDR\V1\FetchUsableBackupVaultsRequest;
+use Google\Cloud\BackupDR\V1\FetchUsableBackupVaultsResponse;
+use Google\Cloud\BackupDR\V1\GetBackupPlanAssociationRequest;
+use Google\Cloud\BackupDR\V1\GetBackupPlanRequest;
+use Google\Cloud\BackupDR\V1\GetBackupRequest;
+use Google\Cloud\BackupDR\V1\GetBackupVaultRequest;
+use Google\Cloud\BackupDR\V1\GetDataSourceRequest;
use Google\Cloud\BackupDR\V1\GetManagementServerRequest;
+use Google\Cloud\BackupDR\V1\ListBackupPlanAssociationsRequest;
+use Google\Cloud\BackupDR\V1\ListBackupPlanAssociationsResponse;
+use Google\Cloud\BackupDR\V1\ListBackupPlansRequest;
+use Google\Cloud\BackupDR\V1\ListBackupPlansResponse;
+use Google\Cloud\BackupDR\V1\ListBackupVaultsRequest;
+use Google\Cloud\BackupDR\V1\ListBackupVaultsResponse;
+use Google\Cloud\BackupDR\V1\ListBackupsRequest;
+use Google\Cloud\BackupDR\V1\ListBackupsResponse;
+use Google\Cloud\BackupDR\V1\ListDataSourcesRequest;
+use Google\Cloud\BackupDR\V1\ListDataSourcesResponse;
use Google\Cloud\BackupDR\V1\ListManagementServersRequest;
use Google\Cloud\BackupDR\V1\ListManagementServersResponse;
use Google\Cloud\BackupDR\V1\ManagementServer;
+use Google\Cloud\BackupDR\V1\RestoreBackupRequest;
+use Google\Cloud\BackupDR\V1\RestoreBackupResponse;
+use Google\Cloud\BackupDR\V1\TriggerBackupRequest;
+use Google\Cloud\BackupDR\V1\UpdateBackupRequest;
+use Google\Cloud\BackupDR\V1\UpdateBackupVaultRequest;
+use Google\Cloud\BackupDR\V1\UpdateDataSourceRequest;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
@@ -46,6 +81,8 @@
use Google\LongRunning\GetOperationRequest;
use Google\LongRunning\Operation;
use Google\Protobuf\Any;
+use Google\Protobuf\Duration;
+use Google\Protobuf\FieldMask;
use Google\Protobuf\GPBEmpty;
use Google\Rpc\Code;
use stdClass;
@@ -81,7 +118,7 @@ private function createClient(array $options = [])
}
/** @test */
- public function createManagementServerTest()
+ public function createBackupPlanTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -98,38 +135,2387 @@ public function createManagementServerTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createManagementServerTest');
+ $incompleteOperation->setName('operations/createBackupPlanTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$name = 'name3373707';
$description = 'description-1724546052';
+ $resourceType = 'resourceType979623115';
$etag = 'etag3123477';
- $oauth2ClientId = 'oauth2ClientId-1833466037';
- $satisfiesPzi = false;
- $expectedResponse = new ManagementServer();
+ $backupVault = 'backupVault353808757';
+ $backupVaultServiceAccount = 'backupVaultServiceAccount-1170477095';
+ $expectedResponse = new BackupPlan();
$expectedResponse->setName($name);
$expectedResponse->setDescription($description);
+ $expectedResponse->setResourceType($resourceType);
$expectedResponse->setEtag($etag);
- $expectedResponse->setOauth2ClientId($oauth2ClientId);
- $expectedResponse->setSatisfiesPzi($satisfiesPzi);
+ $expectedResponse->setBackupVault($backupVault);
+ $expectedResponse->setBackupVaultServiceAccount($backupVaultServiceAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
- $completeOperation->setName('operations/createManagementServerTest');
+ $completeOperation->setName('operations/createBackupPlanTest');
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $managementServerId = 'managementServerId1884787355';
- $managementServer = new ManagementServer();
- $managementServerNetworks = [];
- $managementServer->setNetworks($managementServerNetworks);
- $request = (new CreateManagementServerRequest())
+ $backupPlanId = 'backupPlanId-25762700';
+ $backupPlan = new BackupPlan();
+ $backupPlanBackupRules = [];
+ $backupPlan->setBackupRules($backupPlanBackupRules);
+ $backupPlanResourceType = 'backupPlanResourceType1515155475';
+ $backupPlan->setResourceType($backupPlanResourceType);
+ $backupPlanBackupVault = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $backupPlan->setBackupVault($backupPlanBackupVault);
+ $request = (new CreateBackupPlanRequest())
->setParent($formattedParent)
- ->setManagementServerId($managementServerId)
- ->setManagementServer($managementServer);
- $response = $gapicClient->createManagementServer($request);
+ ->setBackupPlanId($backupPlanId)
+ ->setBackupPlan($backupPlan);
+ $response = $gapicClient->createBackupPlan($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/CreateBackupPlan', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupPlanId();
+ $this->assertProtobufEquals($backupPlanId, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupPlan();
+ $this->assertProtobufEquals($backupPlan, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createBackupPlanTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function createBackupPlanExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createBackupPlanTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $backupPlanId = 'backupPlanId-25762700';
+ $backupPlan = new BackupPlan();
+ $backupPlanBackupRules = [];
+ $backupPlan->setBackupRules($backupPlanBackupRules);
+ $backupPlanResourceType = 'backupPlanResourceType1515155475';
+ $backupPlan->setResourceType($backupPlanResourceType);
+ $backupPlanBackupVault = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $backupPlan->setBackupVault($backupPlanBackupVault);
+ $request = (new CreateBackupPlanRequest())
+ ->setParent($formattedParent)
+ ->setBackupPlanId($backupPlanId)
+ ->setBackupPlan($backupPlan);
+ $response = $gapicClient->createBackupPlan($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createBackupPlanTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function createBackupPlanAssociationTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createBackupPlanAssociationTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $resourceType = 'resourceType979623115';
+ $resource = 'resource-341064690';
+ $backupPlan = 'backupPlan1119623046';
+ $dataSource = 'dataSource-1333894576';
+ $expectedResponse = new BackupPlanAssociation();
+ $expectedResponse->setName($name);
+ $expectedResponse->setResourceType($resourceType);
+ $expectedResponse->setResource($resource);
+ $expectedResponse->setBackupPlan($backupPlan);
+ $expectedResponse->setDataSource($dataSource);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/createBackupPlanAssociationTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $backupPlanAssociationId = 'backupPlanAssociationId133124978';
+ $backupPlanAssociation = new BackupPlanAssociation();
+ $backupPlanAssociationResource = 'backupPlanAssociationResource1527164324';
+ $backupPlanAssociation->setResource($backupPlanAssociationResource);
+ $backupPlanAssociationBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]');
+ $backupPlanAssociation->setBackupPlan($backupPlanAssociationBackupPlan);
+ $request = (new CreateBackupPlanAssociationRequest())
+ ->setParent($formattedParent)
+ ->setBackupPlanAssociationId($backupPlanAssociationId)
+ ->setBackupPlanAssociation($backupPlanAssociation);
+ $response = $gapicClient->createBackupPlanAssociation($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/CreateBackupPlanAssociation', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupPlanAssociationId();
+ $this->assertProtobufEquals($backupPlanAssociationId, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupPlanAssociation();
+ $this->assertProtobufEquals($backupPlanAssociation, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createBackupPlanAssociationTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function createBackupPlanAssociationExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createBackupPlanAssociationTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $backupPlanAssociationId = 'backupPlanAssociationId133124978';
+ $backupPlanAssociation = new BackupPlanAssociation();
+ $backupPlanAssociationResource = 'backupPlanAssociationResource1527164324';
+ $backupPlanAssociation->setResource($backupPlanAssociationResource);
+ $backupPlanAssociationBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]');
+ $backupPlanAssociation->setBackupPlan($backupPlanAssociationBackupPlan);
+ $request = (new CreateBackupPlanAssociationRequest())
+ ->setParent($formattedParent)
+ ->setBackupPlanAssociationId($backupPlanAssociationId)
+ ->setBackupPlanAssociation($backupPlanAssociation);
+ $response = $gapicClient->createBackupPlanAssociation($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createBackupPlanAssociationTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function createBackupVaultTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createBackupVaultTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $description = 'description-1724546052';
+ $deletable = true;
+ $etag = 'etag3123477';
+ $backupCount = 336678994;
+ $serviceAccount = 'serviceAccount-1948028253';
+ $totalStoredBytes = 1181597162;
+ $uid = 'uid115792';
+ $expectedResponse = new BackupVault();
+ $expectedResponse->setName($name);
+ $expectedResponse->setDescription($description);
+ $expectedResponse->setDeletable($deletable);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBackupCount($backupCount);
+ $expectedResponse->setServiceAccount($serviceAccount);
+ $expectedResponse->setTotalStoredBytes($totalStoredBytes);
+ $expectedResponse->setUid($uid);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/createBackupVaultTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $backupVaultId = 'backupVaultId467030053';
+ $backupVault = new BackupVault();
+ $backupVaultBackupMinimumEnforcedRetentionDuration = new Duration();
+ $backupVault->setBackupMinimumEnforcedRetentionDuration($backupVaultBackupMinimumEnforcedRetentionDuration);
+ $request = (new CreateBackupVaultRequest())
+ ->setParent($formattedParent)
+ ->setBackupVaultId($backupVaultId)
+ ->setBackupVault($backupVault);
+ $response = $gapicClient->createBackupVault($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/CreateBackupVault', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupVaultId();
+ $this->assertProtobufEquals($backupVaultId, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupVault();
+ $this->assertProtobufEquals($backupVault, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createBackupVaultTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function createBackupVaultExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createBackupVaultTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $backupVaultId = 'backupVaultId467030053';
+ $backupVault = new BackupVault();
+ $backupVaultBackupMinimumEnforcedRetentionDuration = new Duration();
+ $backupVault->setBackupMinimumEnforcedRetentionDuration($backupVaultBackupMinimumEnforcedRetentionDuration);
+ $request = (new CreateBackupVaultRequest())
+ ->setParent($formattedParent)
+ ->setBackupVaultId($backupVaultId)
+ ->setBackupVault($backupVault);
+ $response = $gapicClient->createBackupVault($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createBackupVaultTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function createManagementServerTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createManagementServerTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $description = 'description-1724546052';
+ $etag = 'etag3123477';
+ $oauth2ClientId = 'oauth2ClientId-1833466037';
+ $satisfiesPzi = false;
+ $expectedResponse = new ManagementServer();
+ $expectedResponse->setName($name);
+ $expectedResponse->setDescription($description);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setOauth2ClientId($oauth2ClientId);
+ $expectedResponse->setSatisfiesPzi($satisfiesPzi);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/createManagementServerTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $managementServerId = 'managementServerId1884787355';
+ $managementServer = new ManagementServer();
+ $managementServerNetworks = [];
+ $managementServer->setNetworks($managementServerNetworks);
+ $request = (new CreateManagementServerRequest())
+ ->setParent($formattedParent)
+ ->setManagementServerId($managementServerId)
+ ->setManagementServer($managementServer);
+ $response = $gapicClient->createManagementServer($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/CreateManagementServer', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getManagementServerId();
+ $this->assertProtobufEquals($managementServerId, $actualValue);
+ $actualValue = $actualApiRequestObject->getManagementServer();
+ $this->assertProtobufEquals($managementServer, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createManagementServerTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function createManagementServerExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createManagementServerTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $managementServerId = 'managementServerId1884787355';
+ $managementServer = new ManagementServer();
+ $managementServerNetworks = [];
+ $managementServer->setNetworks($managementServerNetworks);
+ $request = (new CreateManagementServerRequest())
+ ->setParent($formattedParent)
+ ->setManagementServerId($managementServerId)
+ ->setManagementServer($managementServer);
+ $response = $gapicClient->createManagementServer($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createManagementServerTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteBackupTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteBackupTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $description = 'description-1724546052';
+ $etag = 'etag3123477';
+ $resourceSizeBytes = 275424386;
+ $expectedResponse = new Backup();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setDescription($description);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setResourceSizeBytes($resourceSizeBytes);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteBackupTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+ $request = (new DeleteBackupRequest())->setName($formattedName);
+ $response = $gapicClient->deleteBackup($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/DeleteBackup', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteBackupTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteBackupExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteBackupTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+ $request = (new DeleteBackupRequest())->setName($formattedName);
+ $response = $gapicClient->deleteBackup($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteBackupTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteBackupPlanTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteBackupPlanTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new GPBEmpty();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteBackupPlanTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]');
+ $request = (new DeleteBackupPlanRequest())->setName($formattedName);
+ $response = $gapicClient->deleteBackupPlan($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/DeleteBackupPlan', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteBackupPlanTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteBackupPlanExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteBackupPlanTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]');
+ $request = (new DeleteBackupPlanRequest())->setName($formattedName);
+ $response = $gapicClient->deleteBackupPlan($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteBackupPlanTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteBackupPlanAssociationTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteBackupPlanAssociationTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new GPBEmpty();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteBackupPlanAssociationTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+ $request = (new DeleteBackupPlanAssociationRequest())->setName($formattedName);
+ $response = $gapicClient->deleteBackupPlanAssociation($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/DeleteBackupPlanAssociation', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteBackupPlanAssociationTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteBackupPlanAssociationExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteBackupPlanAssociationTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+ $request = (new DeleteBackupPlanAssociationRequest())->setName($formattedName);
+ $response = $gapicClient->deleteBackupPlanAssociation($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteBackupPlanAssociationTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteBackupVaultTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteBackupVaultTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new GPBEmpty();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteBackupVaultTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $request = (new DeleteBackupVaultRequest())->setName($formattedName);
+ $response = $gapicClient->deleteBackupVault($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/DeleteBackupVault', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteBackupVaultTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteBackupVaultExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteBackupVaultTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $request = (new DeleteBackupVaultRequest())->setName($formattedName);
+ $response = $gapicClient->deleteBackupVault($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteBackupVaultTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteManagementServerTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteManagementServerTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new GPBEmpty();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteManagementServerTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->managementServerName('[PROJECT]', '[LOCATION]', '[MANAGEMENTSERVER]');
+ $request = (new DeleteManagementServerRequest())->setName($formattedName);
+ $response = $gapicClient->deleteManagementServer($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/DeleteManagementServer', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteManagementServerTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteManagementServerExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteManagementServerTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->managementServerName('[PROJECT]', '[LOCATION]', '[MANAGEMENTSERVER]');
+ $request = (new DeleteManagementServerRequest())->setName($formattedName);
+ $response = $gapicClient->deleteManagementServer($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteManagementServerTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function fetchUsableBackupVaultsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $backupVaultsElement = new BackupVault();
+ $backupVaults = [$backupVaultsElement];
+ $expectedResponse = new FetchUsableBackupVaultsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setBackupVaults($backupVaults);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new FetchUsableBackupVaultsRequest())->setParent($formattedParent);
+ $response = $gapicClient->fetchUsableBackupVaults($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getBackupVaults()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/FetchUsableBackupVaults', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function fetchUsableBackupVaultsExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new FetchUsableBackupVaultsRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->fetchUsableBackupVaults($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getBackupTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $description = 'description-1724546052';
+ $etag = 'etag3123477';
+ $resourceSizeBytes = 275424386;
+ $expectedResponse = new Backup();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setDescription($description);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setResourceSizeBytes($resourceSizeBytes);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+ $request = (new GetBackupRequest())->setName($formattedName);
+ $response = $gapicClient->getBackup($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/GetBackup', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getBackupExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+ $request = (new GetBackupRequest())->setName($formattedName);
+ try {
+ $gapicClient->getBackup($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getBackupPlanTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $description = 'description-1724546052';
+ $resourceType = 'resourceType979623115';
+ $etag = 'etag3123477';
+ $backupVault = 'backupVault353808757';
+ $backupVaultServiceAccount = 'backupVaultServiceAccount-1170477095';
+ $expectedResponse = new BackupPlan();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setDescription($description);
+ $expectedResponse->setResourceType($resourceType);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBackupVault($backupVault);
+ $expectedResponse->setBackupVaultServiceAccount($backupVaultServiceAccount);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]');
+ $request = (new GetBackupPlanRequest())->setName($formattedName);
+ $response = $gapicClient->getBackupPlan($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/GetBackupPlan', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getBackupPlanExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]');
+ $request = (new GetBackupPlanRequest())->setName($formattedName);
+ try {
+ $gapicClient->getBackupPlan($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getBackupPlanAssociationTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $resourceType = 'resourceType979623115';
+ $resource = 'resource-341064690';
+ $backupPlan = 'backupPlan1119623046';
+ $dataSource = 'dataSource-1333894576';
+ $expectedResponse = new BackupPlanAssociation();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setResourceType($resourceType);
+ $expectedResponse->setResource($resource);
+ $expectedResponse->setBackupPlan($backupPlan);
+ $expectedResponse->setDataSource($dataSource);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+ $request = (new GetBackupPlanAssociationRequest())->setName($formattedName);
+ $response = $gapicClient->getBackupPlanAssociation($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/GetBackupPlanAssociation', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getBackupPlanAssociationExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+ $request = (new GetBackupPlanAssociationRequest())->setName($formattedName);
+ try {
+ $gapicClient->getBackupPlanAssociation($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getBackupVaultTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $description = 'description-1724546052';
+ $deletable = true;
+ $etag = 'etag3123477';
+ $backupCount = 336678994;
+ $serviceAccount = 'serviceAccount-1948028253';
+ $totalStoredBytes = 1181597162;
+ $uid = 'uid115792';
+ $expectedResponse = new BackupVault();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setDescription($description);
+ $expectedResponse->setDeletable($deletable);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setBackupCount($backupCount);
+ $expectedResponse->setServiceAccount($serviceAccount);
+ $expectedResponse->setTotalStoredBytes($totalStoredBytes);
+ $expectedResponse->setUid($uid);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $request = (new GetBackupVaultRequest())->setName($formattedName);
+ $response = $gapicClient->getBackupVault($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/GetBackupVault', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getBackupVaultExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $request = (new GetBackupVaultRequest())->setName($formattedName);
+ try {
+ $gapicClient->getBackupVault($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getDataSourceTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $backupCount = 336678994;
+ $etag = 'etag3123477';
+ $totalStoredBytes = 1181597162;
+ $expectedResponse = new DataSource();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setBackupCount($backupCount);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setTotalStoredBytes($totalStoredBytes);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->dataSourceName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]', '[DATASOURCE]');
+ $request = (new GetDataSourceRequest())->setName($formattedName);
+ $response = $gapicClient->getDataSource($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/GetDataSource', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getDataSourceExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->dataSourceName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]', '[DATASOURCE]');
+ $request = (new GetDataSourceRequest())->setName($formattedName);
+ try {
+ $gapicClient->getDataSource($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getManagementServerTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $description = 'description-1724546052';
+ $etag = 'etag3123477';
+ $oauth2ClientId = 'oauth2ClientId-1833466037';
+ $satisfiesPzi = false;
+ $expectedResponse = new ManagementServer();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setDescription($description);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setOauth2ClientId($oauth2ClientId);
+ $expectedResponse->setSatisfiesPzi($satisfiesPzi);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->managementServerName('[PROJECT]', '[LOCATION]', '[MANAGEMENTSERVER]');
+ $request = (new GetManagementServerRequest())->setName($formattedName);
+ $response = $gapicClient->getManagementServer($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/GetManagementServer', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getManagementServerExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->managementServerName('[PROJECT]', '[LOCATION]', '[MANAGEMENTSERVER]');
+ $request = (new GetManagementServerRequest())->setName($formattedName);
+ try {
+ $gapicClient->getManagementServer($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listBackupPlanAssociationsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $backupPlanAssociationsElement = new BackupPlanAssociation();
+ $backupPlanAssociations = [$backupPlanAssociationsElement];
+ $expectedResponse = new ListBackupPlanAssociationsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setBackupPlanAssociations($backupPlanAssociations);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListBackupPlanAssociationsRequest())->setParent($formattedParent);
+ $response = $gapicClient->listBackupPlanAssociations($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getBackupPlanAssociations()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/ListBackupPlanAssociations', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listBackupPlanAssociationsExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListBackupPlanAssociationsRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listBackupPlanAssociations($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listBackupPlansTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $backupPlansElement = new BackupPlan();
+ $backupPlans = [$backupPlansElement];
+ $expectedResponse = new ListBackupPlansResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setBackupPlans($backupPlans);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListBackupPlansRequest())->setParent($formattedParent);
+ $response = $gapicClient->listBackupPlans($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getBackupPlans()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/ListBackupPlans', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listBackupPlansExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListBackupPlansRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listBackupPlans($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listBackupVaultsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $backupVaultsElement = new BackupVault();
+ $backupVaults = [$backupVaultsElement];
+ $expectedResponse = new ListBackupVaultsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setBackupVaults($backupVaults);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListBackupVaultsRequest())->setParent($formattedParent);
+ $response = $gapicClient->listBackupVaults($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getBackupVaults()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/ListBackupVaults', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listBackupVaultsExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListBackupVaultsRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listBackupVaults($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listBackupsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $backupsElement = new Backup();
+ $backups = [$backupsElement];
+ $expectedResponse = new ListBackupsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setBackups($backups);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->dataSourceName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]', '[DATASOURCE]');
+ $request = (new ListBackupsRequest())->setParent($formattedParent);
+ $response = $gapicClient->listBackups($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/ListBackups', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listBackupsExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->dataSourceName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]', '[DATASOURCE]');
+ $request = (new ListBackupsRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listBackups($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listDataSourcesTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $dataSourcesElement = new DataSource();
+ $dataSources = [$dataSourcesElement];
+ $expectedResponse = new ListDataSourcesResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setDataSources($dataSources);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $request = (new ListDataSourcesRequest())->setParent($formattedParent);
+ $response = $gapicClient->listDataSources($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getDataSources()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/ListDataSources', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listDataSourcesExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $request = (new ListDataSourcesRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listDataSources($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listManagementServersTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $managementServersElement = new ManagementServer();
+ $managementServers = [$managementServersElement];
+ $expectedResponse = new ListManagementServersResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setManagementServers($managementServers);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListManagementServersRequest())->setParent($formattedParent);
+ $response = $gapicClient->listManagementServers($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getManagementServers()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/ListManagementServers', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listManagementServersExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $transport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListManagementServersRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listManagementServers($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function restoreBackupTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/restoreBackupTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $expectedResponse = new RestoreBackupResponse();
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/restoreBackupTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+ $request = (new RestoreBackupRequest())->setName($formattedName);
+ $response = $gapicClient->restoreBackup($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/RestoreBackup', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/restoreBackupTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function restoreBackupExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/restoreBackupTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode(
+ [
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ],
+ JSON_PRETTY_PRINT
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->backupName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUPVAULT]',
+ '[DATASOURCE]',
+ '[BACKUP]'
+ );
+ $request = (new RestoreBackupRequest())->setName($formattedName);
+ $response = $gapicClient->restoreBackup($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/restoreBackupTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function triggerBackupTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/triggerBackupTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $resourceType = 'resourceType979623115';
+ $resource = 'resource-341064690';
+ $backupPlan = 'backupPlan1119623046';
+ $dataSource = 'dataSource-1333894576';
+ $expectedResponse = new BackupPlanAssociation();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setResourceType($resourceType);
+ $expectedResponse->setResource($resource);
+ $expectedResponse->setBackupPlan($backupPlan);
+ $expectedResponse->setDataSource($dataSource);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/triggerBackupTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+ $ruleId = 'ruleId1548659006';
+ $request = (new TriggerBackupRequest())->setName($formattedName)->setRuleId($ruleId);
+ $response = $gapicClient->triggerBackup($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$apiRequests = $transport->popReceivedCalls();
@@ -138,15 +2524,13 @@ public function createManagementServerTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.backupdr.v1.BackupDR/CreateManagementServer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getManagementServerId();
- $this->assertProtobufEquals($managementServerId, $actualValue);
- $actualValue = $actualApiRequestObject->getManagementServer();
- $this->assertProtobufEquals($managementServer, $actualValue);
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/TriggerBackup', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $actualValue = $actualApiRequestObject->getRuleId();
+ $this->assertProtobufEquals($ruleId, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createManagementServerTest');
+ $expectedOperationsRequestObject->setName('operations/triggerBackupTest');
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
]);
@@ -165,7 +2549,7 @@ public function createManagementServerTest()
}
/** @test */
- public function createManagementServerExceptionTest()
+ public function triggerBackupExceptionTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -182,7 +2566,7 @@ public function createManagementServerExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createManagementServerTest');
+ $incompleteOperation->setName('operations/triggerBackupTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$status = new stdClass();
@@ -199,20 +2583,18 @@ public function createManagementServerExceptionTest()
);
$operationsTransport->addResponse(null, $status);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $managementServerId = 'managementServerId1884787355';
- $managementServer = new ManagementServer();
- $managementServerNetworks = [];
- $managementServer->setNetworks($managementServerNetworks);
- $request = (new CreateManagementServerRequest())
- ->setParent($formattedParent)
- ->setManagementServerId($managementServerId)
- ->setManagementServer($managementServer);
- $response = $gapicClient->createManagementServer($request);
+ $formattedName = $gapicClient->backupPlanAssociationName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[BACKUP_PLAN_ASSOCIATION]'
+ );
+ $ruleId = 'ruleId1548659006';
+ $request = (new TriggerBackupRequest())->setName($formattedName)->setRuleId($ruleId);
+ $response = $gapicClient->triggerBackup($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createManagementServerTest');
+ $expectedOperationsRequestObject->setName('operations/triggerBackupTest');
try {
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
@@ -231,7 +2613,7 @@ public function createManagementServerExceptionTest()
}
/** @test */
- public function deleteManagementServerTest()
+ public function updateBackupTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -248,21 +2630,30 @@ public function deleteManagementServerTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteManagementServerTest');
+ $incompleteOperation->setName('operations/updateBackupTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
+ $name = 'name3373707';
+ $description = 'description-1724546052';
+ $etag = 'etag3123477';
+ $resourceSizeBytes = 275424386;
+ $expectedResponse = new Backup();
+ $expectedResponse->setName($name);
+ $expectedResponse->setDescription($description);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setResourceSizeBytes($resourceSizeBytes);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
- $completeOperation->setName('operations/deleteManagementServerTest');
+ $completeOperation->setName('operations/updateBackupTest');
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedName = $gapicClient->managementServerName('[PROJECT]', '[LOCATION]', '[MANAGEMENTSERVER]');
- $request = (new DeleteManagementServerRequest())->setName($formattedName);
- $response = $gapicClient->deleteManagementServer($request);
+ $updateMask = new FieldMask();
+ $backup = new Backup();
+ $request = (new UpdateBackupRequest())->setUpdateMask($updateMask)->setBackup($backup);
+ $response = $gapicClient->updateBackup($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$apiRequests = $transport->popReceivedCalls();
@@ -271,11 +2662,13 @@ public function deleteManagementServerTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.backupdr.v1.BackupDR/DeleteManagementServer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/UpdateBackup', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getUpdateMask();
+ $this->assertProtobufEquals($updateMask, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackup();
+ $this->assertProtobufEquals($backup, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteManagementServerTest');
+ $expectedOperationsRequestObject->setName('operations/updateBackupTest');
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
]);
@@ -294,7 +2687,7 @@ public function deleteManagementServerTest()
}
/** @test */
- public function deleteManagementServerExceptionTest()
+ public function updateBackupExceptionTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -311,7 +2704,7 @@ public function deleteManagementServerExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteManagementServerTest');
+ $incompleteOperation->setName('operations/updateBackupTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$status = new stdClass();
@@ -328,13 +2721,14 @@ public function deleteManagementServerExceptionTest()
);
$operationsTransport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->managementServerName('[PROJECT]', '[LOCATION]', '[MANAGEMENTSERVER]');
- $request = (new DeleteManagementServerRequest())->setName($formattedName);
- $response = $gapicClient->deleteManagementServer($request);
+ $updateMask = new FieldMask();
+ $backup = new Backup();
+ $request = (new UpdateBackupRequest())->setUpdateMask($updateMask)->setBackup($backup);
+ $response = $gapicClient->updateBackup($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteManagementServerTest');
+ $expectedOperationsRequestObject->setName('operations/updateBackupTest');
try {
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
@@ -353,49 +2747,110 @@ public function deleteManagementServerExceptionTest()
}
/** @test */
- public function getManagementServerTest()
+ public function updateBackupVaultTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
// Mock response
- $name2 = 'name2-1052831874';
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateBackupVaultTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
$description = 'description-1724546052';
+ $deletable = true;
$etag = 'etag3123477';
- $oauth2ClientId = 'oauth2ClientId-1833466037';
- $satisfiesPzi = false;
- $expectedResponse = new ManagementServer();
- $expectedResponse->setName($name2);
+ $backupCount = 336678994;
+ $serviceAccount = 'serviceAccount-1948028253';
+ $totalStoredBytes = 1181597162;
+ $uid = 'uid115792';
+ $expectedResponse = new BackupVault();
+ $expectedResponse->setName($name);
$expectedResponse->setDescription($description);
+ $expectedResponse->setDeletable($deletable);
$expectedResponse->setEtag($etag);
- $expectedResponse->setOauth2ClientId($oauth2ClientId);
- $expectedResponse->setSatisfiesPzi($satisfiesPzi);
- $transport->addResponse($expectedResponse);
+ $expectedResponse->setBackupCount($backupCount);
+ $expectedResponse->setServiceAccount($serviceAccount);
+ $expectedResponse->setTotalStoredBytes($totalStoredBytes);
+ $expectedResponse->setUid($uid);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/updateBackupVaultTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedName = $gapicClient->managementServerName('[PROJECT]', '[LOCATION]', '[MANAGEMENTSERVER]');
- $request = (new GetManagementServerRequest())->setName($formattedName);
- $response = $gapicClient->getManagementServer($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.backupdr.v1.BackupDR/GetManagementServer', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
+ $updateMask = new FieldMask();
+ $backupVault = new BackupVault();
+ $backupVaultBackupMinimumEnforcedRetentionDuration = new Duration();
+ $backupVault->setBackupMinimumEnforcedRetentionDuration($backupVaultBackupMinimumEnforcedRetentionDuration);
+ $request = (new UpdateBackupVaultRequest())->setUpdateMask($updateMask)->setBackupVault($backupVault);
+ $response = $gapicClient->updateBackupVault($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/UpdateBackupVault', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getUpdateMask();
+ $this->assertProtobufEquals($updateMask, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupVault();
+ $this->assertProtobufEquals($backupVault, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateBackupVaultTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function getManagementServerExceptionTest()
+ public function updateBackupVaultExceptionTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateBackupVaultTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
@@ -408,65 +2863,130 @@ public function getManagementServerExceptionTest()
],
JSON_PRETTY_PRINT
);
- $transport->addResponse(null, $status);
+ $operationsTransport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->managementServerName('[PROJECT]', '[LOCATION]', '[MANAGEMENTSERVER]');
- $request = (new GetManagementServerRequest())->setName($formattedName);
+ $updateMask = new FieldMask();
+ $backupVault = new BackupVault();
+ $backupVaultBackupMinimumEnforcedRetentionDuration = new Duration();
+ $backupVault->setBackupMinimumEnforcedRetentionDuration($backupVaultBackupMinimumEnforcedRetentionDuration);
+ $request = (new UpdateBackupVaultRequest())->setUpdateMask($updateMask)->setBackupVault($backupVault);
+ $response = $gapicClient->updateBackupVault($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateBackupVaultTest');
try {
- $gapicClient->getManagementServer($request);
- // If the $gapicClient method call did not throw, fail the test
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
$this->fail('Expected an ApiException, but no exception was thrown.');
} catch (ApiException $ex) {
$this->assertEquals($status->code, $ex->getCode());
$this->assertEquals($expectedExceptionMessage, $ex->getMessage());
}
- // Call popReceivedCalls to ensure the stub is exhausted
+ // Call popReceivedCalls to ensure the stubs are exhausted
$transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function listManagementServersTest()
+ public function updateDataSourceTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
// Mock response
- $nextPageToken = '';
- $managementServersElement = new ManagementServer();
- $managementServers = [$managementServersElement];
- $expectedResponse = new ListManagementServersResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setManagementServers($managementServers);
- $transport->addResponse($expectedResponse);
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateDataSourceTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $backupCount = 336678994;
+ $etag = 'etag3123477';
+ $totalStoredBytes = 1181597162;
+ $expectedResponse = new DataSource();
+ $expectedResponse->setName($name);
+ $expectedResponse->setBackupCount($backupCount);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setTotalStoredBytes($totalStoredBytes);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/updateDataSourceTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListManagementServersRequest())->setParent($formattedParent);
- $response = $gapicClient->listManagementServers($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getManagementServers()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.backupdr.v1.BackupDR/ListManagementServers', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
+ $updateMask = new FieldMask();
+ $dataSource = new DataSource();
+ $request = (new UpdateDataSourceRequest())->setUpdateMask($updateMask)->setDataSource($dataSource);
+ $response = $gapicClient->updateDataSource($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/UpdateDataSource', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getUpdateMask();
+ $this->assertProtobufEquals($updateMask, $actualValue);
+ $actualValue = $actualApiRequestObject->getDataSource();
+ $this->assertProtobufEquals($dataSource, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateDataSourceTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function listManagementServersExceptionTest()
+ public function updateDataSourceExceptionTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateDataSourceTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
@@ -479,21 +2999,31 @@ public function listManagementServersExceptionTest()
],
JSON_PRETTY_PRINT
);
- $transport->addResponse(null, $status);
+ $operationsTransport->addResponse(null, $status);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListManagementServersRequest())->setParent($formattedParent);
+ $updateMask = new FieldMask();
+ $dataSource = new DataSource();
+ $request = (new UpdateDataSourceRequest())->setUpdateMask($updateMask)->setDataSource($dataSource);
+ $response = $gapicClient->updateDataSource($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateDataSourceTest');
try {
- $gapicClient->listManagementServers($request);
- // If the $gapicClient method call did not throw, fail the test
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() method call did not throw, fail the test
$this->fail('Expected an ApiException, but no exception was thrown.');
} catch (ApiException $ex) {
$this->assertEquals($status->code, $ex->getCode());
$this->assertEquals($expectedExceptionMessage, $ex->getMessage());
}
- // Call popReceivedCalls to ensure the stub is exhausted
+ // Call popReceivedCalls to ensure the stubs are exhausted
$transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
@@ -830,7 +3360,7 @@ public function testIamPermissionsExceptionTest()
}
/** @test */
- public function createManagementServerAsyncTest()
+ public function createBackupPlanAsyncTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -847,38 +3377,44 @@ public function createManagementServerAsyncTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createManagementServerTest');
+ $incompleteOperation->setName('operations/createBackupPlanTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$name = 'name3373707';
$description = 'description-1724546052';
+ $resourceType = 'resourceType979623115';
$etag = 'etag3123477';
- $oauth2ClientId = 'oauth2ClientId-1833466037';
- $satisfiesPzi = false;
- $expectedResponse = new ManagementServer();
+ $backupVault = 'backupVault353808757';
+ $backupVaultServiceAccount = 'backupVaultServiceAccount-1170477095';
+ $expectedResponse = new BackupPlan();
$expectedResponse->setName($name);
$expectedResponse->setDescription($description);
+ $expectedResponse->setResourceType($resourceType);
$expectedResponse->setEtag($etag);
- $expectedResponse->setOauth2ClientId($oauth2ClientId);
- $expectedResponse->setSatisfiesPzi($satisfiesPzi);
+ $expectedResponse->setBackupVault($backupVault);
+ $expectedResponse->setBackupVaultServiceAccount($backupVaultServiceAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
- $completeOperation->setName('operations/createManagementServerTest');
+ $completeOperation->setName('operations/createBackupPlanTest');
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $managementServerId = 'managementServerId1884787355';
- $managementServer = new ManagementServer();
- $managementServerNetworks = [];
- $managementServer->setNetworks($managementServerNetworks);
- $request = (new CreateManagementServerRequest())
+ $backupPlanId = 'backupPlanId-25762700';
+ $backupPlan = new BackupPlan();
+ $backupPlanBackupRules = [];
+ $backupPlan->setBackupRules($backupPlanBackupRules);
+ $backupPlanResourceType = 'backupPlanResourceType1515155475';
+ $backupPlan->setResourceType($backupPlanResourceType);
+ $backupPlanBackupVault = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUPVAULT]');
+ $backupPlan->setBackupVault($backupPlanBackupVault);
+ $request = (new CreateBackupPlanRequest())
->setParent($formattedParent)
- ->setManagementServerId($managementServerId)
- ->setManagementServer($managementServer);
- $response = $gapicClient->createManagementServerAsync($request)->wait();
+ ->setBackupPlanId($backupPlanId)
+ ->setBackupPlan($backupPlan);
+ $response = $gapicClient->createBackupPlanAsync($request)->wait();
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$apiRequests = $transport->popReceivedCalls();
@@ -887,15 +3423,15 @@ public function createManagementServerAsyncTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.backupdr.v1.BackupDR/CreateManagementServer', $actualApiFuncCall);
+ $this->assertSame('/google.cloud.backupdr.v1.BackupDR/CreateBackupPlan', $actualApiFuncCall);
$actualValue = $actualApiRequestObject->getParent();
$this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getManagementServerId();
- $this->assertProtobufEquals($managementServerId, $actualValue);
- $actualValue = $actualApiRequestObject->getManagementServer();
- $this->assertProtobufEquals($managementServer, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupPlanId();
+ $this->assertProtobufEquals($backupPlanId, $actualValue);
+ $actualValue = $actualApiRequestObject->getBackupPlan();
+ $this->assertProtobufEquals($backupPlan, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createManagementServerTest');
+ $expectedOperationsRequestObject->setName('operations/createBackupPlanTest');
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
]);