From 63386db4ff565811e071ac0462df748ee8d0d69f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 10 Jan 2026 01:46:49 +0000 Subject: [PATCH 1/2] feat: A new service `BackupDrProtectionSummary` is added feat: A new message `ListResourceBackupConfigsRequest` is added feat: A new message `ListResourceBackupConfigsResponse` is added feat: A new message `ResourceBackupConfig` is added feat: A new resource_definition `backupdr.googleapis.com/ResourceBackupConfig` is added feat: A new message `BackupConfigDetails` is added feat: A new message `PitrSettings` is added feat: A new message `BackupDrTemplateConfig` is added feat: A new message `BackupDrPlanConfig` is added feat: A new message `BackupDrPlanRule` is added feat: A new message `BackupLocation` is added PiperOrigin-RevId: 854009996 Source-Link: https://github.com/googleapis/googleapis/commit/524b2de63ab28fd96abd5a1b077f00a5503d79c4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/89b4811a23cd2976091304113fb10f871ab01e3e Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4OWI0ODExYTIzY2QyOTc2MDkxMzA0MTEzZmIxMGY4NzFhYjAxZTNlIn0= --- .../google-cloud-backupdr-v1/.gitignore | 22 + .../.repo-metadata.json | 19 + .../google-cloud-backupdr-v1/.rubocop.yml | 33 + .../google-cloud-backupdr-v1/.toys.rb | 28 + .../google-cloud-backupdr-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-backupdr-v1/CHANGELOG.md | 2 + .../google-cloud-backupdr-v1/Gemfile | 11 + .../google-cloud-backupdr-v1/LICENSE.md | 201 + .../google-cloud-backupdr-v1/README.md | 154 + .../google-cloud-backupdr-v1/Rakefile | 169 + .../gapic_metadata.json | 217 + .../google-cloud-backupdr-v1.gemspec | 30 + .../lib/google-cloud-backupdr-v1.rb | 21 + .../lib/google/cloud/backupdr/v1.rb | 46 + .../v1/backup_dr_protection_summary.rb | 55 + .../v1/backup_dr_protection_summary/client.rb | 530 ++ .../credentials.rb | 47 + .../v1/backup_dr_protection_summary/paths.rb | 50 + .../v1/backup_dr_protection_summary/rest.rb | 53 + .../rest/client.rb | 489 ++ .../rest/service_stub.rb | 142 + .../lib/google/cloud/backupdr/v1/backupdr.rb | 56 + .../cloud/backupdr/v1/backupdr/client.rb | 4786 +++++++++++++++++ .../cloud/backupdr/v1/backupdr/credentials.rb | 47 + .../cloud/backupdr/v1/backupdr/operations.rb | 841 +++ .../cloud/backupdr/v1/backupdr/paths.rb | 290 + .../google/cloud/backupdr/v1/backupdr/rest.rb | 54 + .../cloud/backupdr/v1/backupdr/rest/client.rb | 4493 ++++++++++++++++ .../backupdr/v1/backupdr/rest/operations.rb | 925 ++++ .../backupdr/v1/backupdr/rest/service_stub.rb | 2350 ++++++++ .../google/cloud/backupdr/v1/backupdr_pb.rb | 75 + .../cloud/backupdr/v1/backupdr_services_pb.rb | 119 + .../google/cloud/backupdr/v1/backupplan_pb.rb | 70 + .../backupdr/v1/backupplanassociation_pb.rb | 66 + .../cloud/backupdr/v1/backupvault_ba_pb.rb | 46 + .../backupdr/v1/backupvault_cloudsql_pb.rb | 52 + .../cloud/backupdr/v1/backupvault_disk_pb.rb | 54 + .../cloud/backupdr/v1/backupvault_gce_pb.rb | 87 + .../cloud/backupdr/v1/backupvault_pb.rb | 108 + .../cloud/backupdr/v1/bindings_override.rb | 108 + .../backupdr/v1/datasourcereference_pb.rb | 57 + .../backupdr/v1/protection_summary_pb.rb | 62 + .../v1/protection_summary_services_pb.rb | 45 + .../lib/google/cloud/backupdr/v1/rest.rb | 39 + .../lib/google/cloud/backupdr/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/backupdr/v1/backupdr.rb | 415 ++ .../google/cloud/backupdr/v1/backupplan.rb | 588 ++ .../backupdr/v1/backupplanassociation.rb | 381 ++ .../google/cloud/backupdr/v1/backupvault.rb | 1355 +++++ .../cloud/backupdr/v1/backupvault_ba.rb | 47 + .../cloud/backupdr/v1/backupvault_cloudsql.rb | 131 + .../cloud/backupdr/v1/backupvault_disk.rb | 241 + .../cloud/backupdr/v1/backupvault_gce.rb | 1001 ++++ .../cloud/backupdr/v1/datasourcereference.rb | 228 + .../cloud/backupdr/v1/protection_summary.rb | 309 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 121 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/expr.rb | 75 + .../proto_docs/google/type/month.rb | 64 + .../google-cloud-backupdr-v1/snippets/Gemfile | 32 + .../list_resource_backup_configs.rb | 51 + .../snippets/backupdr/create_backup_plan.rb | 54 + .../create_backup_plan_association.rb | 54 + .../snippets/backupdr/create_backup_vault.rb | 54 + .../backupdr/create_management_server.rb | 54 + .../snippets/backupdr/delete_backup.rb | 54 + .../snippets/backupdr/delete_backup_plan.rb | 54 + .../delete_backup_plan_association.rb | 54 + .../snippets/backupdr/delete_backup_vault.rb | 54 + .../backupdr/delete_management_server.rb | 54 + ...kup_plan_associations_for_resource_type.rb | 51 + .../fetch_backups_for_resource_type.rb | 51 + ...ata_source_references_for_resource_type.rb | 51 + .../backupdr/fetch_usable_backup_vaults.rb | 51 + .../snippets/backupdr/get_backup.rb | 47 + .../snippets/backupdr/get_backup_plan.rb | 47 + .../backupdr/get_backup_plan_association.rb | 47 + .../backupdr/get_backup_plan_revision.rb | 47 + .../snippets/backupdr/get_backup_vault.rb | 47 + .../snippets/backupdr/get_data_source.rb | 47 + .../backupdr/get_data_source_reference.rb | 47 + .../backupdr/get_management_server.rb | 47 + .../snippets/backupdr/initialize_service.rb | 54 + .../backupdr/list_backup_plan_associations.rb | 51 + .../backupdr/list_backup_plan_revisions.rb | 51 + .../snippets/backupdr/list_backup_plans.rb | 51 + .../snippets/backupdr/list_backup_vaults.rb | 51 + .../snippets/backupdr/list_backups.rb | 51 + .../backupdr/list_data_source_references.rb | 51 + .../snippets/backupdr/list_data_sources.rb | 51 + .../backupdr/list_management_servers.rb | 51 + .../snippets/backupdr/restore_backup.rb | 54 + .../snippets/backupdr/trigger_backup.rb | 54 + .../snippets/backupdr/update_backup.rb | 54 + .../snippets/backupdr/update_backup_plan.rb | 54 + .../update_backup_plan_association.rb | 54 + .../snippets/backupdr/update_backup_vault.rb | 54 + .../snippets/backupdr/update_data_source.rb | 54 + ...pet_metadata_google.cloud.backupdr.v1.json | 1535 ++++++ ...backup_dr_protection_summary_paths_test.rb | 55 + .../backup_dr_protection_summary_rest_test.rb | 157 + .../v1/backup_dr_protection_summary_test.rb | 175 + .../backupdr/v1/backupdr_operations_test.rb | 400 ++ .../cloud/backupdr/v1/backupdr_paths_test.rb | 199 + .../cloud/backupdr/v1/backupdr_rest_test.rb | 2196 ++++++++ .../google/cloud/backupdr/v1/backupdr_test.rb | 2613 +++++++++ .../google-cloud-backupdr-v1/test/helper.rb | 25 + 121 files changed, 33480 insertions(+) create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/README.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb create mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.gitignore b/owl-bot-staging/google-cloud-backupdr-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json new file mode 100644 index 000000000000..11a24894cf9d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json @@ -0,0 +1,19 @@ +{ + "api_id": "backupdr.googleapis.com", + "api_shortname": "backupdr", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest", + "distribution_name": "google-cloud-backupdr-v1", + "is_cloud": true, + "language": "ruby", + "name": "backupdr", + "name_pretty": "Backup and DR Service V1 API", + "product_documentation": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", + "ruby-cloud-path-override": "backup_dr=backupdr", + "ruby-cloud-namespace-override": "Backupdr=BackupDR", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml new file mode 100644 index 000000000000..cbd65e44ff07 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-backupdr-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-backupdr-v1.rb" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb b/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.yardopts b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts new file mode 100644 index 000000000000..17df553d8c78 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Backup and DR Service V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..d053ec6f167e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-backupdr-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-backupdr-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/backupdr/v1" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/backupdr/v1" + +::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-backupdr-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/backupdr/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md b/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/README.md b/owl-bot-staging/google-cloud-backupdr-v1/README.md new file mode 100644 index 000000000000..39e91f6e239b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Backup and DR Service V1 API + +API Client library for the Backup and DR Service V1 API + +google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Backup and DR Service V1 API. Most users should consider using +the main client gem, +[google-cloud-backupdr](https://rubygems.org/gems/google-cloud-backupdr). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-backupdr-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/backupdr.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/backupdr/v1" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new +request = ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new # (request fields as keyword arguments...) +response = client.list_management_servers request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/backupdr/v1" +require "logger" + +client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-backupdr`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-backupdr-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-backupdr`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-backupdr-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Rakefile b/owl-bot-staging/google-cloud-backupdr-v1/Rakefile new file mode 100644 index 000000000000..7990877ac4bf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-backupdr-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/backupdr/v1/backupdr/credentials" + ::Google::Cloud::BackupDR::V1::BackupDR::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-backupdr-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-backupdr-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-backupdr-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-backupdr-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-backupdr-v1" + header "google-cloud-backupdr-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-backupdr-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-backupdr-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-backupdr-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-backupdr-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json new file mode 100644 index 000000000000..590f02f148a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json @@ -0,0 +1,217 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.backupdr.v1", + "libraryPackage": "::Google::Cloud::BackupDR::V1", + "services": { + "BackupDR": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDR::Client", + "rpcs": { + "ListManagementServers": { + "methods": [ + "list_management_servers" + ] + }, + "GetManagementServer": { + "methods": [ + "get_management_server" + ] + }, + "CreateManagementServer": { + "methods": [ + "create_management_server" + ] + }, + "DeleteManagementServer": { + "methods": [ + "delete_management_server" + ] + }, + "CreateBackupVault": { + "methods": [ + "create_backup_vault" + ] + }, + "ListBackupVaults": { + "methods": [ + "list_backup_vaults" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetch_usable_backup_vaults" + ] + }, + "GetBackupVault": { + "methods": [ + "get_backup_vault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "update_backup_vault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "delete_backup_vault" + ] + }, + "ListDataSources": { + "methods": [ + "list_data_sources" + ] + }, + "GetDataSource": { + "methods": [ + "get_data_source" + ] + }, + "UpdateDataSource": { + "methods": [ + "update_data_source" + ] + }, + "ListBackups": { + "methods": [ + "list_backups" + ] + }, + "FetchBackupsForResourceType": { + "methods": [ + "fetch_backups_for_resource_type" + ] + }, + "GetBackup": { + "methods": [ + "get_backup" + ] + }, + "UpdateBackup": { + "methods": [ + "update_backup" + ] + }, + "DeleteBackup": { + "methods": [ + "delete_backup" + ] + }, + "RestoreBackup": { + "methods": [ + "restore_backup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "create_backup_plan" + ] + }, + "UpdateBackupPlan": { + "methods": [ + "update_backup_plan" + ] + }, + "GetBackupPlan": { + "methods": [ + "get_backup_plan" + ] + }, + "ListBackupPlans": { + "methods": [ + "list_backup_plans" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "delete_backup_plan" + ] + }, + "GetBackupPlanRevision": { + "methods": [ + "get_backup_plan_revision" + ] + }, + "ListBackupPlanRevisions": { + "methods": [ + "list_backup_plan_revisions" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "create_backup_plan_association" + ] + }, + "UpdateBackupPlanAssociation": { + "methods": [ + "update_backup_plan_association" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "get_backup_plan_association" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "list_backup_plan_associations" + ] + }, + "FetchBackupPlanAssociationsForResourceType": { + "methods": [ + "fetch_backup_plan_associations_for_resource_type" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "delete_backup_plan_association" + ] + }, + "TriggerBackup": { + "methods": [ + "trigger_backup" + ] + }, + "GetDataSourceReference": { + "methods": [ + "get_data_source_reference" + ] + }, + "ListDataSourceReferences": { + "methods": [ + "list_data_source_references" + ] + }, + "FetchDataSourceReferencesForResourceType": { + "methods": [ + "fetch_data_source_references_for_resource_type" + ] + }, + "InitializeService": { + "methods": [ + "initialize_service" + ] + } + } + } + } + }, + "BackupDrProtectionSummary": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client", + "rpcs": { + "ListResourceBackupConfigs": { + "methods": [ + "list_resource_backup_configs" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec new file mode 100644 index 000000000000..7f269ee27d8c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/backupdr/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-backupdr-v1" + gem.version = Google::Cloud::BackupDR::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details." + gem.summary = "API Client library for the Backup and DR Service V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb new file mode 100644 index 000000000000..7bea88dbd327 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/backupdr/v1" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb new file mode 100644 index 000000000000..978a9a0cc88f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/backupdr" +require "google/cloud/backupdr/v1/backup_dr_protection_summary" +require "google/cloud/backupdr/v1/version" + +module Google + module Cloud + module BackupDR + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/backupdr/v1" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/backupdr/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb new file mode 100644 index 000000000000..52b98449e819 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/backupdr/v1/version" + +require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/client" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The Protection Summary service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + module BackupDrProtectionSummary + end + end + end + end +end + +helper_path = ::File.join __dir__, "backup_dr_protection_summary", "helpers.rb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb new file mode 100644 index 000000000000..4c2e0d3c63ad --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb @@ -0,0 +1,530 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + ## + # Client for the BackupDrProtectionSummary service. + # + # The Protection Summary service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_protection_summary_stub + + ## + # Configure the BackupDrProtectionSummary Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDrProtectionSummary clients + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_resource_backup_configs.timeout = 60.0 + default_config.rpcs.list_resource_backup_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDrProtectionSummary Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @backup_dr_protection_summary_stub.universe_domain + end + + ## + # Create a new BackupDrProtectionSummary client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDrProtectionSummary client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/backupdr/v1/protection_summary_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @backup_dr_protection_summary_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @backup_dr_protection_summary_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @backup_dr_protection_summary_stub.logger + end + + # Service calls + + ## + # Lists ResourceBackupConfigs. + # + # @overload list_resource_backup_configs(request, options = nil) + # Pass arguments to `list_resource_backup_configs` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_resource_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + # + # # Call the list_resource_backup_configs method. + # result = client.list_resource_backup_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. + # p item + # end + # + def list_resource_backup_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_resource_backup_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_resource_backup_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_protection_summary_stub.call_rpc :list_resource_backup_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BackupDrProtectionSummary API. + # + # This class represents the configuration for BackupDrProtectionSummary, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_resource_backup_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BackupDrProtectionSummary API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_resource_backup_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_backup_configs + + # @private + def initialize parent_rpcs = nil + list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs + @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb new file mode 100644 index 000000000000..94614c32dfd5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + # Credentials for the BackupDrProtectionSummary API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb new file mode 100644 index 000000000000..cbaeba7a3956 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + # Path helper methods for the BackupDrProtectionSummary API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb new file mode 100644 index 000000000000..38b3a06e8a03 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/backupdr/v1/version" +require "google/cloud/backupdr/v1/bindings_override" + +require "google/cloud/backupdr/v1/backup_dr_protection_summary/credentials" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/paths" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The Protection Summary service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + module BackupDrProtectionSummary + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb new file mode 100644 index 000000000000..e4d6e17e4350 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb @@ -0,0 +1,489 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + module Rest + ## + # REST client for the BackupDrProtectionSummary service. + # + # The Protection Summary service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_protection_summary_stub + + ## + # Configure the BackupDrProtectionSummary Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDrProtectionSummary clients + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_resource_backup_configs.timeout = 60.0 + default_config.rpcs.list_resource_backup_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDrProtectionSummary Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @backup_dr_protection_summary_stub.universe_domain + end + + ## + # Create a new BackupDrProtectionSummary REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDrProtectionSummary client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @backup_dr_protection_summary_stub = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @backup_dr_protection_summary_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_protection_summary_stub.endpoint + config.universe_domain = @backup_dr_protection_summary_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @backup_dr_protection_summary_stub.logger + end + + # Service calls + + ## + # Lists ResourceBackupConfigs. + # + # @overload list_resource_backup_configs(request, options = nil) + # Pass arguments to `list_resource_backup_configs` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_resource_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + # + # # Call the list_resource_backup_configs method. + # result = client.list_resource_backup_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. + # p item + # end + # + def list_resource_backup_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_resource_backup_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_resource_backup_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_protection_summary_stub.list_resource_backup_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, "resource_backup_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BackupDrProtectionSummary REST API. + # + # This class represents the configuration for BackupDrProtectionSummary REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_resource_backup_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_resource_backup_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BackupDrProtectionSummary API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_resource_backup_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_backup_configs + + # @private + def initialize parent_rpcs = nil + list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs + @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb new file mode 100644 index 000000000000..b788e5ec9af1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/protection_summary_pb" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + module Rest + ## + # REST service stub for the BackupDrProtectionSummary service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_resource_backup_configs REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse] + # A result object deserialized from the server's reply + def list_resource_backup_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_backup_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_resource_backup_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_backup_configs REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_resource_backup_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceBackupConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb new file mode 100644 index 000000000000..9807b8cc2845 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/backupdr/v1/version" + +require "google/cloud/backupdr/v1/backupdr/credentials" +require "google/cloud/backupdr/v1/backupdr/paths" +require "google/cloud/backupdr/v1/backupdr/operations" +require "google/cloud/backupdr/v1/backupdr/client" +require "google/cloud/backupdr/v1/backupdr/rest" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The BackupDR Service + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/backupdr/v1/backupdr" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/backupdr/v1/backupdr/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module BackupDR + end + end + end + end +end + +helper_path = ::File.join __dir__, "backupdr", "helpers.rb" +require "google/cloud/backupdr/v1/backupdr/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb new file mode 100644 index 000000000000..869e163a5b2c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb @@ -0,0 +1,4786 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + ## + # Client for the BackupDR service. + # + # The BackupDR Service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_stub + + ## + # Configure the BackupDR Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDR clients + # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_management_servers.timeout = 60.0 + default_config.rpcs.list_management_servers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_management_server.timeout = 60.0 + default_config.rpcs.get_management_server.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_management_server.timeout = 60.0 + + default_config.rpcs.delete_management_server.timeout = 60.0 + + default_config.rpcs.create_backup_vault.timeout = 60.0 + default_config.rpcs.create_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_backup_vaults.timeout = 60.0 + default_config.rpcs.list_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 + default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_vault.timeout = 60.0 + default_config.rpcs.get_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_vault.timeout = 60.0 + + default_config.rpcs.delete_backup_vault.timeout = 60.0 + default_config.rpcs.delete_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_sources.timeout = 60.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_source.timeout = 60.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_source.timeout = 60.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup.timeout = 60.0 + + default_config.rpcs.restore_backup.timeout = 60.0 + + default_config.rpcs.initialize_service.timeout = 60.0 + default_config.rpcs.initialize_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDR Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @backup_dr_stub.universe_domain + end + + ## + # Create a new BackupDR client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDR client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/backupdr/v1/backupdr_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @backup_dr_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BackupDR::V1::BackupDR::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @backup_dr_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BackupDR::V1::BackupDR::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @backup_dr_stub.logger + end + + # Service calls + + ## + # Lists ManagementServers in a given project and location. + # + # @overload list_management_servers(request, options = nil) + # Pass arguments to `list_management_servers` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_management_servers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + # + # # Call the list_management_servers method. + # result = client.list_management_servers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + # p item + # end + # + def list_management_servers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_management_servers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_management_servers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_management_servers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_management_servers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ManagementServer. + # + # @overload get_management_server(request, options = nil) + # Pass arguments to `get_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_management_server(name: nil) + # Pass arguments to `get_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + # + # # Call the get_management_server method. + # result = client.get_management_server request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + # p result + # + def get_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_management_server, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new ManagementServer in a given project and location. + # + # @overload create_management_server(request, options = nil) + # Pass arguments to `create_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) + # Pass arguments to `create_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @param management_server_id [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + # + # # Call the create_management_server method. + # result = client.create_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_management_server, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ManagementServer. + # + # @overload delete_management_server(request, options = nil) + # Pass arguments to `delete_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_management_server(name: nil, request_id: nil) + # Pass arguments to `delete_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + # + # # Call the delete_management_server method. + # result = client.delete_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_management_server.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_management_server, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new BackupVault in a given project and location. + # + # @overload create_backup_vault(request, options = nil) + # Pass arguments to `create_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param backup_vault_id [::String] + # 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 + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # 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). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + # + # # Call the create_backup_vault method. + # result = client.create_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupVaults in a given project and location. + # + # @overload list_backup_vaults(request, options = nil) + # Pass arguments to `list_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + # + # # Call the list_backup_vaults method. + # result = client.list_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def list_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + # + # @overload fetch_usable_backup_vaults(request, options = nil) + # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + # + # # Call the fetch_usable_backup_vaults method. + # result = client.fetch_usable_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def fetch_usable_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_usable_backup_vaults, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a BackupVault. + # + # @overload get_backup_vault(request, options = nil) + # Pass arguments to `get_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_vault(name: nil, view: nil) + # Pass arguments to `get_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + # + # # Call the get_backup_vault method. + # result = client.get_backup_vault request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + # p result + # + def get_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_vault, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a BackupVault. + # + # @overload update_backup_vault(request, options = nil) + # Pass arguments to `update_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) + # Pass arguments to `update_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # 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). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param force [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @param force_update_access_restriction [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + # + # # Call the update_backup_vault method. + # result = client.update_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_vault&.name + header_params["backup_vault.name"] = request.backup_vault.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a BackupVault. + # + # @overload delete_backup_vault(request, options = nil) + # Pass arguments to `delete_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) + # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # 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). + # @param force [::Boolean] + # Optional. If set to true, any data source from this backup vault will also + # be deleted. + # @param etag [::String] + # 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. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param allow_missing [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @param ignore_backup_plan_references [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + # + # # Call the delete_backup_vault method. + # result = client.delete_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataSources in a given project and location. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_data_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a DataSource. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a DataSource. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # 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). + # @param allow_missing [::Boolean] + # Optional. Enable upsert. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_source&.name + header_params["data_source.name"] = request.data_source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_data_source, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Backups in a given project and location. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch Backups for a given resource type. + # + # @overload fetch_backups_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + # + # # Call the fetch_backups_for_resource_type method. + # result = client.fetch_backups_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def fetch_backups_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_backups_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_backups_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_backups_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a Backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup(name: nil, view: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::Backup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a Backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup(update_mask: nil, backup: nil, request_id: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup&.name + header_params["backup.name"] = request.backup.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup(name: nil, request_id: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restore from a Backup + # + # @overload restore_backup(request, options = nil) + # Pass arguments to `restore_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) + # Pass arguments to `restore_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @param request_id [::String] + # 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). + # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] + # Compute Engine target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] + # Disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] + # Region disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] + # Disk properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + # + # # Call the restore_backup method. + # result = client.restore_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restore_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.restore_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :restore_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlan + # + # @overload create_backup_plan(request, options = nil) + # Pass arguments to `create_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) + # Pass arguments to `create_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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**. + # @param backup_plan_id [::String] + # 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}/. + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The `BackupPlan` resource object to create. + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + # + # # Call the create_backup_plan method. + # result = client.create_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_plan&.name + header_params["backup_plan.name"] = request.backup_plan.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlan. + # + # @overload get_backup_plan(request, options = nil) + # Pass arguments to `get_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_plan(name: nil) + # Pass arguments to `get_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + # + # # Call the get_backup_plan method. + # result = client.get_backup_plan request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + # p result + # + def get_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlans in a given project and location. + # + # @overload list_backup_plans(request, options = nil) + # Pass arguments to `list_backup_plans` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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 + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + # + # # Call the list_backup_plans method. + # result = client.list_backup_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + # p item + # end + # + def list_backup_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plans, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlan. + # + # @overload delete_backup_plan(request, options = nil) + # Pass arguments to `delete_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_plan(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + # + # # Call the delete_backup_plan method. + # result = client.delete_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_plan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanRevision. + # + # @overload get_backup_plan_revision(request, options = nil) + # Pass arguments to `get_backup_plan_revision` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_plan_revision(name: nil) + # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + # + # # Call the get_backup_plan_revision method. + # result = client.get_backup_plan_revision request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p result + # + def get_backup_plan_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan_revision, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlanRevisions in a given project and location. + # + # @overload list_backup_plan_revisions(request, options = nil) + # Pass arguments to `list_backup_plan_revisions` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @param page_size [::Integer] + # 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 + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + # + # # Call the list_backup_plan_revisions method. + # result = client.list_backup_plan_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p item + # end + # + def list_backup_plan_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plan_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlanAssociation + # + # @overload create_backup_plan_association(request, options = nil) + # Pass arguments to `create_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) + # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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**. + # @param backup_plan_association_id [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # + # # Call the create_backup_plan_association method. + # result = client.create_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :create_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlanAssociation. + # + # @overload update_backup_plan_association(request, options = nil) + # Pass arguments to `update_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + # + # # Call the update_backup_plan_association method. + # result = client.update_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_plan_association&.name + header_params["backup_plan_association.name"] = request.backup_plan_association.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :update_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanAssociation. + # + # @overload get_backup_plan_association(request, options = nil) + # Pass arguments to `get_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_plan_association(name: nil) + # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + # + # # Call the get_backup_plan_association method. + # result = client.get_backup_plan_association request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p result + # + def get_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_backup_plan_association, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlanAssociations in a given project and location. + # + # @overload list_backup_plan_associations(request, options = nil) + # Pass arguments to `list_backup_plan_associations` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + # + # # Call the list_backup_plan_associations method. + # result = client.list_backup_plan_associations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def list_backup_plan_associations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_backup_plan_associations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List BackupPlanAssociations for a given resource type. + # + # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + # + # # Call the fetch_backup_plan_associations_for_resource_type method. + # result = client.fetch_backup_plan_associations_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def fetch_backup_plan_associations_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_backup_plan_associations_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlanAssociation. + # + # @overload delete_backup_plan_association(request, options = nil) + # Pass arguments to `delete_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_plan_association(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + # + # # Call the delete_backup_plan_association method. + # result = client.delete_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :delete_backup_plan_association, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Triggers a new Backup. + # + # @overload trigger_backup(request, options = nil) + # Pass arguments to `trigger_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) + # Pass arguments to `trigger_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param rule_id [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @param request_id [::String] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + # + # # Call the trigger_backup method. + # result = client.trigger_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def trigger_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.trigger_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.trigger_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :trigger_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single DataSourceReference. + # + # @overload get_data_source_reference(request, options = nil) + # Pass arguments to `get_data_source_reference` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_source_reference(name: nil) + # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + # + # # Call the get_data_source_reference method. + # result = client.get_data_source_reference request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + # p result + # + def get_data_source_reference request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_source_reference.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source_reference.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :get_data_source_reference, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataSourceReferences for a given project and location. + # + # @overload list_data_source_references(request, options = nil) + # Pass arguments to `list_data_source_references` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_source_references` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + # + # # Call the list_data_source_references method. + # result = client.list_data_source_references request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def list_data_source_references request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_source_references.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_source_references.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :list_data_source_references, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch DataSourceReferences for a given project, location and resource type. + # + # @overload fetch_data_source_references_for_resource_type(request, options = nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + # + # # Call the fetch_data_source_references_for_resource_type method. + # result = client.fetch_data_source_references_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def fetch_data_source_references_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :fetch_data_source_references_for_resource_type, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Initializes the service related config for a project. + # + # @overload initialize_service(request, options = nil) + # Pass arguments to `initialize_service` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) + # Pass arguments to `initialize_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @param resource_type [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @param request_id [::String] + # 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). + # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] + # Optional. The configuration for initializing a Cloud SQL instance. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + # + # # Call the initialize_service method. + # result = client.initialize_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def initialize_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.initialize_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.initialize_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.call_rpc :initialize_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BackupDR API. + # + # This class represents the configuration for BackupDR, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_management_servers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BackupDR API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_management_servers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_management_servers + ## + # RPC-specific configuration for `get_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :get_management_server + ## + # RPC-specific configuration for `create_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :create_management_server + ## + # RPC-specific configuration for `delete_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_management_server + ## + # RPC-specific configuration for `create_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_vault + ## + # RPC-specific configuration for `list_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_vaults + ## + # RPC-specific configuration for `fetch_usable_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_usable_backup_vaults + ## + # RPC-specific configuration for `get_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_vault + ## + # RPC-specific configuration for `update_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_vault + ## + # RPC-specific configuration for `delete_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_vault + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `fetch_backups_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backups_for_resource_type + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `restore_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_backup + ## + # RPC-specific configuration for `create_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan + ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## + # RPC-specific configuration for `get_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan + ## + # RPC-specific configuration for `list_backup_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plans + ## + # RPC-specific configuration for `delete_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan + ## + # RPC-specific configuration for `get_backup_plan_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_revision + ## + # RPC-specific configuration for `list_backup_plan_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_revisions + ## + # RPC-specific configuration for `create_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan_association + ## + # RPC-specific configuration for `update_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan_association + ## + # RPC-specific configuration for `get_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_association + ## + # RPC-specific configuration for `list_backup_plan_associations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_associations + ## + # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backup_plan_associations_for_resource_type + ## + # RPC-specific configuration for `delete_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan_association + ## + # RPC-specific configuration for `trigger_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_backup + ## + # RPC-specific configuration for `get_data_source_reference` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source_reference + ## + # RPC-specific configuration for `list_data_source_references` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_source_references + ## + # RPC-specific configuration for `fetch_data_source_references_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source_references_for_resource_type + ## + # RPC-specific configuration for `initialize_service` + # @return [::Gapic::Config::Method] + # + attr_reader :initialize_service + + # @private + def initialize parent_rpcs = nil + list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers + @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config + get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server + @get_management_server = ::Gapic::Config::Method.new get_management_server_config + create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server + @create_management_server = ::Gapic::Config::Method.new create_management_server_config + delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server + @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config + create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault + @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config + list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults + @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config + fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults + @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config + get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault + @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config + update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault + @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config + delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault + @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type + @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup + @restore_backup = ::Gapic::Config::Method.new restore_backup_config + create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan + @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config + get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan + @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config + list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans + @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config + delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan + @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision + @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config + list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions + @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config + create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association + @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config + update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association + @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config + get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association + @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config + list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations + @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config + fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type + @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config + delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association + @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config + trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup + @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config + get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference + @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config + list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references + @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config + fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type + @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config + initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service + @initialize_service = ::Gapic::Config::Method.new initialize_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb new file mode 100644 index 000000000000..f6fc3fd1ca69 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # Credentials for the BackupDR API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb new file mode 100644 index 000000000000..6eeece6aaa79 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BackupDR Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDR Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb new file mode 100644 index 000000000000..ab31d1858c98 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb @@ -0,0 +1,290 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # Path helper methods for the BackupDR API. + module Paths + ## + # Create a fully-qualified Backup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # @param datasource [String] + # @param backup [String] + # + # @return [::String] + def backup_path project:, location:, backupvault:, datasource:, backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" + raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}/backups/#{backup}" + end + + ## + # Create a fully-qualified BackupPlan resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # + # @return [::String] + def backup_plan_path project:, location:, backup_plan: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}" + end + + ## + # Create a fully-qualified BackupPlanAssociation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}` + # + # @param project [String] + # @param location [String] + # @param backup_plan_association [String] + # + # @return [::String] + def backup_plan_association_path project:, location:, backup_plan_association: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlanAssociations/#{backup_plan_association}" + end + + ## + # Create a fully-qualified BackupPlanRevision resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # @param revision [String] + # + # @return [::String] + def backup_plan_revision_path project:, location:, backup_plan:, revision: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/revisions/#{revision}" + end + + ## + # Create a fully-qualified BackupVault resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # + # @return [::String] + def backup_vault_path project:, location:, backupvault: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}` + # + # @param project [String] + # @param location [String] + # @param ring [String] + # @param key [String] + # + # @return [::String] + def crypto_key_path project:, location:, ring:, key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "ring cannot contain /" if ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{ring}/cryptoKeys/#{key}" + end + + ## + # Create a fully-qualified CryptoKeyVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified DataSource resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}` + # + # @param project [String] + # @param location [String] + # @param backupvault [String] + # @param datasource [String] + # + # @return [::String] + def data_source_path project:, location:, backupvault:, datasource: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}" + end + + ## + # Create a fully-qualified DataSourceReference resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}` + # + # @param project [String] + # @param location [String] + # @param data_source_reference [String] + # + # @return [::String] + def data_source_reference_path project:, location:, data_source_reference: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataSourceReferences/#{data_source_reference}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}` + # + # @param project [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/instances/#{instance}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified ManagementServer resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/managementServers/{managementserver}` + # + # @param project [String] + # @param location [String] + # @param managementserver [String] + # + # @return [::String] + def management_server_path project:, location:, managementserver: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/managementServers/#{managementserver}" + end + + ## + # Create a fully-qualified StoragePool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/zones/{zone}/storagePools/{storage_pool}` + # + # @param project [String] + # @param zone [String] + # @param storage_pool [String] + # + # @return [::String] + def storage_pool_path project:, zone:, storage_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/zones/#{zone}/storagePools/#{storage_pool}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb new file mode 100644 index 000000000000..5b7fba263be4 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/backupdr/v1/version" +require "google/cloud/backupdr/v1/bindings_override" + +require "google/cloud/backupdr/v1/backupdr/credentials" +require "google/cloud/backupdr/v1/backupdr/paths" +require "google/cloud/backupdr/v1/backupdr/rest/operations" +require "google/cloud/backupdr/v1/backupdr/rest/client" + +module Google + module Cloud + module BackupDR + module V1 + ## + # The BackupDR Service + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/backupdr/v1/backupdr/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module BackupDR + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/backupdr/v1/backupdr/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb new file mode 100644 index 000000000000..343bd216f57b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb @@ -0,0 +1,4493 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + module Rest + ## + # REST client for the BackupDR service. + # + # The BackupDR Service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_dr_stub + + ## + # Configure the BackupDR Client class. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupDR clients + # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_management_servers.timeout = 60.0 + default_config.rpcs.list_management_servers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_management_server.timeout = 60.0 + default_config.rpcs.get_management_server.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_management_server.timeout = 60.0 + + default_config.rpcs.delete_management_server.timeout = 60.0 + + default_config.rpcs.create_backup_vault.timeout = 60.0 + default_config.rpcs.create_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_backup_vaults.timeout = 60.0 + default_config.rpcs.list_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 + default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_vault.timeout = 60.0 + default_config.rpcs.get_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_vault.timeout = 60.0 + + default_config.rpcs.delete_backup_vault.timeout = 60.0 + default_config.rpcs.delete_backup_vault.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_sources.timeout = 60.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_source.timeout = 60.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_source.timeout = 60.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup.timeout = 60.0 + + default_config.rpcs.restore_backup.timeout = 60.0 + + default_config.rpcs.initialize_service.timeout = 60.0 + default_config.rpcs.initialize_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDR Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @backup_dr_stub.universe_domain + end + + ## + # Create a new BackupDR REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupDR client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @backup_dr_stub = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @backup_dr_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @backup_dr_stub.endpoint + config.universe_domain = @backup_dr_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_dr_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @backup_dr_stub.logger + end + + # Service calls + + ## + # Lists ManagementServers in a given project and location. + # + # @overload list_management_servers(request, options = nil) + # Pass arguments to `list_management_servers` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_management_servers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + # + # # Call the list_management_servers method. + # result = client.list_management_servers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + # p item + # end + # + def list_management_servers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_management_servers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_management_servers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_management_servers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_management_servers, "management_servers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ManagementServer. + # + # @overload get_management_server(request, options = nil) + # Pass arguments to `get_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_management_server(name: nil) + # Pass arguments to `get_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + # + # # Call the get_management_server method. + # result = client.get_management_server request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + # p result + # + def get_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_management_server request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new ManagementServer in a given project and location. + # + # @overload create_management_server(request, options = nil) + # Pass arguments to `create_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) + # Pass arguments to `create_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @param management_server_id [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + # + # # Call the create_management_server method. + # result = client.create_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_management_server request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ManagementServer. + # + # @overload delete_management_server(request, options = nil) + # Pass arguments to `delete_management_server` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_management_server(name: nil, request_id: nil) + # Pass arguments to `delete_management_server` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + # + # # Call the delete_management_server method. + # result = client.delete_management_server request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_management_server request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_management_server.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_management_server.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_management_server.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_management_server request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new BackupVault in a given project and location. + # + # @overload create_backup_vault(request, options = nil) + # Pass arguments to `create_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param backup_vault_id [::String] + # 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 + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # 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). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + # + # # Call the create_backup_vault method. + # result = client.create_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupVaults in a given project and location. + # + # @overload list_backup_vaults(request, options = nil) + # Pass arguments to `list_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + # + # # Call the list_backup_vaults method. + # result = client.list_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def list_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_vaults request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, "backup_vaults", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + # + # @overload fetch_usable_backup_vaults(request, options = nil) + # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + # + # # Call the fetch_usable_backup_vaults method. + # result = client.fetch_usable_backup_vaults request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + # p item + # end + # + def fetch_usable_backup_vaults request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_usable_backup_vaults request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, "backup_vaults", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a BackupVault. + # + # @overload get_backup_vault(request, options = nil) + # Pass arguments to `get_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_vault(name: nil, view: nil) + # Pass arguments to `get_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + # + # # Call the get_backup_vault method. + # result = client.get_backup_vault request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + # p result + # + def get_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_vault request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a BackupVault. + # + # @overload update_backup_vault(request, options = nil) + # Pass arguments to `update_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) + # Pass arguments to `update_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # 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). + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param force [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @param force_update_access_restriction [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + # + # # Call the update_backup_vault method. + # result = client.update_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a BackupVault. + # + # @overload delete_backup_vault(request, options = nil) + # Pass arguments to `delete_backup_vault` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) + # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # 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). + # @param force [::Boolean] + # Optional. If set to true, any data source from this backup vault will also + # be deleted. + # @param etag [::String] + # 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. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @param allow_missing [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @param ignore_backup_plan_references [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + # + # # Call the delete_backup_vault method. + # result = client.delete_backup_vault request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_vault request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup_vault.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_vault.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_vault request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataSources in a given project and location. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_data_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_sources, "data_sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a DataSource. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a DataSource. + # + # @overload update_data_source(request, options = nil) + # Pass arguments to `update_data_source` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) + # Pass arguments to `update_data_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # 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). + # @param allow_missing [::Boolean] + # Optional. Enable upsert. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + # + # # Call the update_data_source method. + # result = client.update_data_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_data_source request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Backups in a given project and location. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backups, "backups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch Backups for a given resource type. + # + # @overload fetch_backups_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + # + # # Call the fetch_backups_for_resource_type method. + # result = client.fetch_backups_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + # p item + # end + # + def fetch_backups_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_backups_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_backups_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_backups_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, "backups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a Backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup(name: nil, view: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @param view [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the settings of a Backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup(update_mask: nil, backup: nil, request_id: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup(name: nil, request_id: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restore from a Backup + # + # @overload restore_backup(request, options = nil) + # Pass arguments to `restore_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) + # Pass arguments to `restore_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @param request_id [::String] + # 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). + # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] + # Compute Engine target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] + # Disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] + # Region disk target environment to be used during restore. + # + # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] + # Disk properties to be overridden during restore. + # + # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + # + # # Call the restore_backup method. + # result = client.restore_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restore_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restore_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.restore_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlan + # + # @overload create_backup_plan(request, options = nil) + # Pass arguments to `create_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) + # Pass arguments to `create_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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**. + # @param backup_plan_id [::String] + # 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}/. + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The `BackupPlan` resource object to create. + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + # + # # Call the create_backup_plan method. + # result = client.create_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlan. + # + # @overload get_backup_plan(request, options = nil) + # Pass arguments to `get_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_plan(name: nil) + # Pass arguments to `get_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + # + # # Call the get_backup_plan method. + # result = client.get_backup_plan request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + # p result + # + def get_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlans in a given project and location. + # + # @overload list_backup_plans(request, options = nil) + # Pass arguments to `list_backup_plans` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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 + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + # + # # Call the list_backup_plans method. + # result = client.list_backup_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + # p item + # end + # + def list_backup_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plans request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, "backup_plans", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlan. + # + # @overload delete_backup_plan(request, options = nil) + # Pass arguments to `delete_backup_plan` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_plan(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + # + # # Call the delete_backup_plan method. + # result = client.delete_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_plan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanRevision. + # + # @overload get_backup_plan_revision(request, options = nil) + # Pass arguments to `get_backup_plan_revision` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_plan_revision(name: nil) + # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + # + # # Call the get_backup_plan_revision method. + # result = client.get_backup_plan_revision request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p result + # + def get_backup_plan_revision request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan_revision request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlanRevisions in a given project and location. + # + # @overload list_backup_plan_revisions(request, options = nil) + # Pass arguments to `list_backup_plan_revisions` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @param page_size [::Integer] + # 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 + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + # + # # Call the list_backup_plan_revisions method. + # result = client.list_backup_plan_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + # p item + # end + # + def list_backup_plan_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plan_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, "backup_plan_revisions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a BackupPlanAssociation + # + # @overload create_backup_plan_association(request, options = nil) + # Pass arguments to `create_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) + # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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**. + # @param backup_plan_association_id [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + # + # # Call the create_backup_plan_association method. + # result = client.create_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.create_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a BackupPlanAssociation. + # + # @overload update_backup_plan_association(request, options = nil) + # Pass arguments to `update_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] + # Required. The resource being updated + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + # + # # Call the update_backup_plan_association method. + # result = client.update_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.update_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single BackupPlanAssociation. + # + # @overload get_backup_plan_association(request, options = nil) + # Pass arguments to `get_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_plan_association(name: nil) + # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + # + # # Call the get_backup_plan_association method. + # result = client.get_backup_plan_association request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p result + # + def get_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_backup_plan_association request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BackupPlanAssociations in a given project and location. + # + # @overload list_backup_plan_associations(request, options = nil) + # Pass arguments to `list_backup_plan_associations` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + # + # # Call the list_backup_plan_associations method. + # result = client.list_backup_plan_associations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def list_backup_plan_associations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_backup_plan_associations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, "backup_plan_associations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List BackupPlanAssociations for a given resource type. + # + # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + # + # # Call the fetch_backup_plan_associations_for_resource_type method. + # result = client.fetch_backup_plan_associations_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + # p item + # end + # + def fetch_backup_plan_associations_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_backup_plan_associations_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, "backup_plan_associations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single BackupPlanAssociation. + # + # @overload delete_backup_plan_association(request, options = nil) + # Pass arguments to `delete_backup_plan_association` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_plan_association(name: nil, request_id: nil) + # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + # + # # Call the delete_backup_plan_association method. + # result = client.delete_backup_plan_association request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_backup_plan_association request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.delete_backup_plan_association request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Triggers a new Backup. + # + # @overload trigger_backup(request, options = nil) + # Pass arguments to `trigger_backup` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) + # Pass arguments to `trigger_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @param rule_id [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @param request_id [::String] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + # + # # Call the trigger_backup method. + # result = client.trigger_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def trigger_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.trigger_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.trigger_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.trigger_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single DataSourceReference. + # + # @overload get_data_source_reference(request, options = nil) + # Pass arguments to `get_data_source_reference` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_source_reference(name: nil) + # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + # + # # Call the get_data_source_reference method. + # result = client.get_data_source_reference request + # + # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + # p result + # + def get_data_source_reference request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_source_reference.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source_reference.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.get_data_source_reference request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataSourceReferences for a given project and location. + # + # @overload list_data_source_references(request, options = nil) + # Pass arguments to `list_data_source_references` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_source_references` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + # + # # Call the list_data_source_references method. + # result = client.list_data_source_references request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def list_data_source_references request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_source_references.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_source_references.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.list_data_source_references request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, "data_source_references", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch DataSourceReferences for a given project, location and resource type. + # + # @overload fetch_data_source_references_for_resource_type(request, options = nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @param resource_type [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @param page_size [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @param order_by [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + # + # # Call the fetch_data_source_references_for_resource_type method. + # result = client.fetch_data_source_references_for_resource_type request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + # p item + # end + # + def fetch_data_source_references_for_resource_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.fetch_data_source_references_for_resource_type request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, "data_source_references", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Initializes the service related config for a project. + # + # @overload initialize_service(request, options = nil) + # Pass arguments to `initialize_service` via a request object, either of type + # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) + # Pass arguments to `initialize_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @param resource_type [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @param request_id [::String] + # 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). + # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] + # Optional. The configuration for initializing a Cloud SQL instance. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/backupdr/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + # + # # Call the initialize_service method. + # result = client.initialize_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def initialize_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.initialize_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.initialize_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_dr_stub.initialize_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BackupDR REST API. + # + # This class represents the configuration for BackupDR REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_management_servers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_management_servers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BackupDR API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_management_servers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_management_servers + ## + # RPC-specific configuration for `get_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :get_management_server + ## + # RPC-specific configuration for `create_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :create_management_server + ## + # RPC-specific configuration for `delete_management_server` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_management_server + ## + # RPC-specific configuration for `create_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_vault + ## + # RPC-specific configuration for `list_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_vaults + ## + # RPC-specific configuration for `fetch_usable_backup_vaults` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_usable_backup_vaults + ## + # RPC-specific configuration for `get_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_vault + ## + # RPC-specific configuration for `update_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_vault + ## + # RPC-specific configuration for `delete_backup_vault` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_vault + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `update_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_source + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `fetch_backups_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backups_for_resource_type + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `restore_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_backup + ## + # RPC-specific configuration for `create_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan + ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## + # RPC-specific configuration for `get_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan + ## + # RPC-specific configuration for `list_backup_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plans + ## + # RPC-specific configuration for `delete_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan + ## + # RPC-specific configuration for `get_backup_plan_revision` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_revision + ## + # RPC-specific configuration for `list_backup_plan_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_revisions + ## + # RPC-specific configuration for `create_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan_association + ## + # RPC-specific configuration for `update_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan_association + ## + # RPC-specific configuration for `get_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_association + ## + # RPC-specific configuration for `list_backup_plan_associations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_associations + ## + # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_backup_plan_associations_for_resource_type + ## + # RPC-specific configuration for `delete_backup_plan_association` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan_association + ## + # RPC-specific configuration for `trigger_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :trigger_backup + ## + # RPC-specific configuration for `get_data_source_reference` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source_reference + ## + # RPC-specific configuration for `list_data_source_references` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_source_references + ## + # RPC-specific configuration for `fetch_data_source_references_for_resource_type` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_data_source_references_for_resource_type + ## + # RPC-specific configuration for `initialize_service` + # @return [::Gapic::Config::Method] + # + attr_reader :initialize_service + + # @private + def initialize parent_rpcs = nil + list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers + @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config + get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server + @get_management_server = ::Gapic::Config::Method.new get_management_server_config + create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server + @create_management_server = ::Gapic::Config::Method.new create_management_server_config + delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server + @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config + create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault + @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config + list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults + @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config + fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults + @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config + get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault + @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config + update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault + @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config + delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault + @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source + @update_data_source = ::Gapic::Config::Method.new update_data_source_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type + @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup + @restore_backup = ::Gapic::Config::Method.new restore_backup_config + create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan + @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config + get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan + @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config + list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans + @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config + delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan + @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision + @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config + list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions + @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config + create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association + @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config + update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association + @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config + get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association + @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config + list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations + @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config + fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type + @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config + delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association + @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config + trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup + @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config + get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference + @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config + list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references + @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config + fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type + @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config + initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service + @initialize_service = ::Gapic::Config::Method.new initialize_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb new file mode 100644 index 000000000000..382f29324032 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BackupDR Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupDR Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "backupdr.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb new file mode 100644 index 000000000000..c6ef2555cab9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb @@ -0,0 +1,2350 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/backupdr_pb" + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + module Rest + ## + # REST service stub for the BackupDR service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_management_servers REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] + # A result object deserialized from the server's reply + def list_management_servers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_management_servers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_management_servers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # A result object deserialized from the server's reply + def get_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ManagementServer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_management_server request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_management_server_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_management_server", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_backup_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] + # A result object deserialized from the server's reply + def list_backup_vaults request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_vaults", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_usable_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] + # A result object deserialized from the server's reply + def fetch_usable_backup_vaults request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_usable_backup_vaults_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_usable_backup_vaults", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # A result object deserialized from the server's reply + def get_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupVault.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup_vault", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] + # A result object deserialized from the server's reply + def list_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # A result object deserialized from the server's reply + def get_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::DataSource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backups REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupsResponse] + # A result object deserialized from the server's reply + def list_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_backups_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_backups_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backups_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_backups_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::Backup] + # A result object deserialized from the server's reply + def get_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::Backup.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restore_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def restore_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restore_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # A result object deserialized from the server's reply + def get_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlan.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_plans REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] + # A result object deserialized from the server's reply + def list_backup_plans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_plans", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_plan_revision REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] + # A result object deserialized from the server's reply + def get_backup_plan_revision request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_revision_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_plan_revision", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_plan_revisions REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] + # A result object deserialized from the server's reply + def list_backup_plan_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_revisions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_plan_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # A result object deserialized from the server's reply + def get_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_plan_associations REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] + # A result object deserialized from the server's reply + def list_backup_plan_associations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_associations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_plan_associations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_backup_plan_associations_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_backup_plan_associations_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_backup_plan_associations_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup_plan_association request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_association_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup_plan_association", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the trigger_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def trigger_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_trigger_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "trigger_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_data_source_reference REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] + # A result object deserialized from the server's reply + def get_data_source_reference request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_reference_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_source_reference", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::DataSourceReference.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_source_references REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] + # A result object deserialized from the server's reply + def list_data_source_references request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_source_references_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_source_references", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_data_source_references_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] + # A result object deserialized from the server's reply + def fetch_data_source_references_for_resource_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_references_for_resource_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_data_source_references_for_resource_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the initialize_service REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def initialize_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_initialize_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "initialize_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_management_servers REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_management_servers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/managementServers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/managementServers", + body: "management_server", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_management_server REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_management_server_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupVaults", + body: "backup_vault", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_vaults_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupVaults", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_usable_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_usable_backup_vaults_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupVaults:fetchUsable", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_vault.name}", + body: "backup_vault", + matches: [ + ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_vault REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_source REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_source.name}", + body: "data_source", + matches: [ + ["data_source.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_backups_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_backups_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup.name}", + body: "backup", + matches: [ + ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restore_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:restore", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupPlans", + body: "backup_plan", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan.name}", + body: "backup_plan", + matches: [ + ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plans REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_plans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlans", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_plan REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan_revision REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_plan_revision_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/revisions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plan_revisions REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_plan_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/revisions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupPlanAssociations", + body: "backup_plan_association", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan_association.name}", + body: "backup_plan_association", + matches: [ + ["backup_plan_association.name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plan_associations REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_plan_associations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlanAssociations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_backup_plan_associations_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlanAssociations:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_plan_association REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_plan_association_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the trigger_backup REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_trigger_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:triggerBackup", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source_reference REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_source_reference_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataSourceReferences/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_source_references REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_source_references_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSourceReferences", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_data_source_references_for_resource_type REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_data_source_references_for_resource_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSourceReferences:fetchForResourceType", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the initialize_service REST call + # + # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_initialize_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:initialize", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb new file mode 100644 index 000000000000..3d9f31b6c12a --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupdr.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupplan_pb' +require 'google/cloud/backupdr/v1/backupplanassociation_pb' +require 'google/cloud/backupdr/v1/backupvault_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/cloud/backupdr/v1/datasourcereference_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n\'google/cloud/backupdr/v1/backupdr.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/backupdr/v1/backupplan.proto\x1a\x34google/cloud/backupdr/v1/backupplanassociation.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x32google/cloud/backupdr/v1/datasourcereference.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x01\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cpeering_mode\x18\x02 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.NetworkConfig.PeeringModeB\x03\xe0\x41\x01\"G\n\x0bPeeringMode\x12\x1c\n\x18PEERING_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x01\"6\n\rManagementURI\x12\x13\n\x06web_ui\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\"w\n#WorkforceIdentityBasedManagementURI\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"|\n$WorkforceIdentityBasedOAuth2ClientID\x12)\n\x1c\x66irst_party_oauth2_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1cthird_party_oauth2_client_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd1\n\n\x10ManagementServer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.ManagementServer.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x04type\x18\x0e \x01(\x0e\x32\x37.google.cloud.backupdr.v1.ManagementServer.InstanceTypeB\x03\xe0\x41\x01\x12\x44\n\x0emanagement_uri\x18\x0b \x01(\x0b\x32\'.google.cloud.backupdr.v1.ManagementURIB\x03\xe0\x41\x03\x12s\n\'workforce_identity_based_management_uri\x18\x10 \x01(\x0b\x32=.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURIB\x03\xe0\x41\x03\x12L\n\x05state\x18\x07 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.ManagementServer.InstanceStateB\x03\xe0\x41\x03\x12>\n\x08networks\x18\x08 \x03(\x0b\x32\'.google.cloud.backupdr.v1.NetworkConfigB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10oauth2_client_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12v\n)workforce_identity_based_oauth2_client_id\x18\x11 \x01(\x0b\x32>.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientIDB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61_proxy_uri\x18\x12 \x03(\tB\x03\xe0\x41\x03\x12\x36\n\rsatisfies_pzs\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41\x43KUP_RESTORE\x10\x01\"\x8f\x01\n\rInstanceState\x12\x1e\n\x1aINSTANCE_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\t\n\x05\x45RROR\x10\x07:\xa1\x01\xea\x41\x9d\x01\n(backupdr.googleapis.com/ManagementServer\x12Lprojects/{project}/locations/{location}/managementServers/{managementserver}*\x11managementServers2\x10managementServer\"\xdf\x01\n\x1cListManagementServersRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_filterB\x0b\n\t_order_by\"\x95\x01\n\x1dListManagementServersResponse\x12\x46\n\x12management_servers\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.ManagementServer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x1aGetManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\"\xe9\x01\n\x1d\x43reateManagementServerRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12!\n\x14management_server_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11management_server\x18\x03 \x01(\x0b\x32*.google.cloud.backupdr.v1.ManagementServerB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x1d\x44\x65leteManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xfc\x01\n\x18InitializeServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12w\n(cloud_sql_instance_initialization_config\x18\x04 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfigB\x03\xe0\x41\x01H\x00\x42\x17\n\x15initialization_config\"P\n\x19InitializeServiceResponse\x12\x19\n\x11\x62\x61\x63kup_vault_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_plan_name\x18\x02 \x01(\t\"\x96\x03\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0f\x61\x64\x64itional_info\x18\x08 \x03(\x0b\x32?.google.cloud.backupdr.v1.OperationMetadata.AdditionalInfoEntryB\x03\xe0\x41\x03\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xd4\x43\n\x08\x42\x61\x63kupDR\x12\xd0\x01\n\x15ListManagementServers\x12\x36.google.cloud.backupdr.v1.ListManagementServersRequest\x1a\x37.google.cloud.backupdr.v1.ListManagementServersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/managementServers\x12\xbd\x01\n\x13GetManagementServer\x12\x34.google.cloud.backupdr.v1.GetManagementServerRequest\x1a*.google.cloud.backupdr.v1.ManagementServer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/managementServers/*}\x12\x9b\x02\n\x16\x43reateManagementServer\x12\x37.google.cloud.backupdr.v1.CreateManagementServerRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10ManagementServer\x12\x11OperationMetadata\xda\x41-parent,management_server,management_server_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/managementServers:\x11management_server\x12\xe3\x01\n\x16\x44\x65leteManagementServer\x12\x37.google.cloud.backupdr.v1.DeleteManagementServerRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/managementServers/*}\x12\xf8\x01\n\x11\x43reateBackupVault\x12\x32.google.cloud.backupdr.v1.CreateBackupVaultRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x42\x61\x63kupVault\x12\x11OperationMetadata\xda\x41#parent,backup_vault,backup_vault_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/backupVaults:\x0c\x62\x61\x63kup_vault\x12\xbc\x01\n\x10ListBackupVaults\x12\x31.google.cloud.backupdr.v1.ListBackupVaultsRequest\x1a\x32.google.cloud.backupdr.v1.ListBackupVaultsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/backupVaults\x12\xdd\x01\n\x17\x46\x65tchUsableBackupVaults\x12\x38.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest\x1a\x39.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources\x12\xb4\x01\n\rGetDataSource\x12..google.cloud.backupdr.v1.GetDataSourceRequest\x1a$.google.cloud.backupdr.v1.DataSource\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\x12\x82\x02\n\x10UpdateDataSource\x12\x31.google.cloud.backupdr.v1.UpdateDataSourceRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nDataSource\x12\x11OperationMetadata\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xc5\x01\n\x0bListBackups\x12,.google.cloud.backupdr.v1.ListBackupsRequest\x1a-.google.cloud.backupdr.v1.ListBackupsResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\x12\x98\x02\n\x1b\x46\x65tchBackupsForResourceType\x12<.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest\x1a=.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse\"|\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02_\x12]/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType\x12\xb2\x01\n\tGetBackup\x12*.google.cloud.backupdr.v1.GetBackupRequest\x1a .google.cloud.backupdr.v1.Backup\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf1\x01\n\x0cUpdateBackup\x12-.google.cloud.backupdr.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02Y2O/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:\x06\x62\x61\x63kup\x12\xd3\x01\n\x0c\x44\x65leteBackup\x12-.google.cloud.backupdr.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf0\x01\n\rRestoreBackup\x12..google.cloud.backupdr.v1.RestoreBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15RestoreBackupResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore:\x01*\x12\xf1\x01\n\x10\x43reateBackupPlan\x12\x31.google.cloud.backupdr.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xf3\x01\n\x10UpdateBackupPlan\x12\x31.google.cloud.backupdr.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xa5\x01\n\rGetBackupPlan\x12..google.cloud.backupdr.v1.GetBackupPlanRequest\x1a$.google.cloud.backupdr.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xb8\x01\n\x0fListBackupPlans\x12\x30.google.cloud.backupdr.v1.ListBackupPlansRequest\x1a\x31.google.cloud.backupdr.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xd1\x01\n\x10\x44\x65leteBackupPlan\x12\x31.google.cloud.backupdr.v1.DeleteBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xc9\x01\n\x15GetBackupPlanRevision\x12\x36.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest\x1a,.google.cloud.backupdr.v1.BackupPlanRevision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/backupPlans/*/revisions/*}\x12\xdc\x01\n\x17ListBackupPlanRevisions\x12\x38.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest\x1a\x39.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/backupPlans/*}/revisions\x12\xc1\x02\n\x1b\x43reateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x39parent,backup_plan_association,backup_plan_association_id\x82\xd3\xe4\x93\x02U\":/v1/{parent=projects/*/locations/*}/backupPlanAssociations:\x17\x62\x61\x63kup_plan_association\x12\xc3\x02\n\x1bUpdateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc6\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41#backup_plan_association,update_mask\x82\xd3\xe4\x93\x02m2R/v1/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}:\x17\x62\x61\x63kup_plan_association\x12\xd1\x01\n\x18GetBackupPlanAssociation\x12\x39.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest\x1a/.google.cloud.backupdr.v1.BackupPlanAssociation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xe4\x01\n\x1aListBackupPlanAssociations\x12;.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest\x1a<.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/backupPlanAssociations\x12\xb7\x02\n*FetchBackupPlanAssociationsForResourceType\x12K.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest\x1aL.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse\"n\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02Q\x12O/v1/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType\x12\xf2\x01\n\x1b\x44\x65leteBackupPlanAssociation\x12<.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xf0\x01\n\rTriggerBackup\x12..google.cloud.backupdr.v1.TriggerBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x0cname,rule_id\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup:\x01*\x12\xc9\x01\n\x16GetDataSourceReference\x12\x37.google.cloud.backupdr.v1.GetDataSourceReferenceRequest\x1a-.google.cloud.backupdr.v1.DataSourceReference\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/dataSourceReferences/*}\x12\xdc\x01\n\x18ListDataSourceReferences\x12\x39.google.cloud.backupdr.v1.ListDataSourceReferencesRequest\x1a:.google.cloud.backupdr.v1.ListDataSourceReferencesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/dataSourceReferences\x12\xaf\x02\n(FetchDataSourceReferencesForResourceType\x12I.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest\x1aJ.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse\"l\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02O\x12M/v1/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType\x12\xde\x01\n\x11InitializeService\x12\x32.google.cloud.backupdr.v1.InitializeServiceRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41.\n\x19InitializeServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/serviceConfig}:initialize:\x01*\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.backupdr.v1B\rBackupDRProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.BoolValue", "google/protobuf/wrappers.proto"], + ["google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig").msgclass + NetworkConfig::PeeringMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig.PeeringMode").enummodule + ManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementURI").msgclass + WorkforceIdentityBasedManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI").msgclass + WorkforceIdentityBasedOAuth2ClientID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID").msgclass + ManagementServer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer").msgclass + ManagementServer::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceType").enummodule + ManagementServer::InstanceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceState").enummodule + ListManagementServersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersRequest").msgclass + ListManagementServersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersResponse").msgclass + GetManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetManagementServerRequest").msgclass + CreateManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateManagementServerRequest").msgclass + DeleteManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteManagementServerRequest").msgclass + InitializeServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceRequest").msgclass + InitializeServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceResponse").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb new file mode 100644 index 000000000000..91bbec9bb35d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb @@ -0,0 +1,119 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/backupdr/v1/backupdr.proto for package 'Google.Cloud.BackupDR.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/backupdr/v1/backupdr_pb' + +module Google + module Cloud + module BackupDR + module V1 + module BackupDR + # The BackupDR Service + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.backupdr.v1.BackupDR' + + # Lists ManagementServers in a given project and location. + rpc :ListManagementServers, ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Google::Cloud::BackupDR::V1::ListManagementServersResponse + # Gets details of a single ManagementServer. + rpc :GetManagementServer, ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Google::Cloud::BackupDR::V1::ManagementServer + # Creates a new ManagementServer in a given project and location. + rpc :CreateManagementServer, ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Google::Longrunning::Operation + # Deletes a single ManagementServer. + rpc :DeleteManagementServer, ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Google::Longrunning::Operation + # Creates a new BackupVault in a given project and location. + rpc :CreateBackupVault, ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Google::Longrunning::Operation + # Lists BackupVaults in a given project and location. + rpc :ListBackupVaults, ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse + # FetchUsableBackupVaults lists usable BackupVaults in a given project and + # location. Usable BackupVault are the ones that user has + # backupdr.backupVaults.get permission. + rpc :FetchUsableBackupVaults, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse + # Gets details of a BackupVault. + rpc :GetBackupVault, ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Google::Cloud::BackupDR::V1::BackupVault + # Updates the settings of a BackupVault. + rpc :UpdateBackupVault, ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Google::Longrunning::Operation + # Deletes a BackupVault. + rpc :DeleteBackupVault, ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Google::Longrunning::Operation + # Lists DataSources in a given project and location. + rpc :ListDataSources, ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse + # Gets details of a DataSource. + rpc :GetDataSource, ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Google::Cloud::BackupDR::V1::DataSource + # Updates the settings of a DataSource. + rpc :UpdateDataSource, ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Google::Longrunning::Operation + # Lists Backups in a given project and location. + rpc :ListBackups, ::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Google::Cloud::BackupDR::V1::ListBackupsResponse + # Fetch Backups for a given resource type. + rpc :FetchBackupsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse + # Gets details of a Backup. + rpc :GetBackup, ::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Google::Cloud::BackupDR::V1::Backup + # Updates the settings of a Backup. + rpc :UpdateBackup, ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Google::Longrunning::Operation + # Deletes a Backup. + rpc :DeleteBackup, ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Google::Longrunning::Operation + # Restore from a Backup + rpc :RestoreBackup, ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Google::Longrunning::Operation + # Create a BackupPlan + rpc :CreateBackupPlan, ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation + # Update a BackupPlan. + rpc :UpdateBackupPlan, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlan. + rpc :GetBackupPlan, ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Google::Cloud::BackupDR::V1::BackupPlan + # Lists BackupPlans in a given project and location. + rpc :ListBackupPlans, ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse + # Deletes a single BackupPlan. + rpc :DeleteBackupPlan, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlanRevision. + rpc :GetBackupPlanRevision, ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Google::Cloud::BackupDR::V1::BackupPlanRevision + # Lists BackupPlanRevisions in a given project and location. + rpc :ListBackupPlanRevisions, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse + # Create a BackupPlanAssociation + rpc :CreateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Update a BackupPlanAssociation. + rpc :UpdateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Gets details of a single BackupPlanAssociation. + rpc :GetBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Google::Cloud::BackupDR::V1::BackupPlanAssociation + # Lists BackupPlanAssociations in a given project and location. + rpc :ListBackupPlanAssociations, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse + # List BackupPlanAssociations for a given resource type. + rpc :FetchBackupPlanAssociationsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse + # Deletes a single BackupPlanAssociation. + rpc :DeleteBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Google::Longrunning::Operation + # Triggers a new Backup. + rpc :TriggerBackup, ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Google::Longrunning::Operation + # Gets details of a single DataSourceReference. + rpc :GetDataSourceReference, ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Google::Cloud::BackupDR::V1::DataSourceReference + # Lists DataSourceReferences for a given project and location. + rpc :ListDataSourceReferences, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse + # Fetch DataSourceReferences for a given project, location and resource type. + rpc :FetchDataSourceReferencesForResourceType, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse + # Initializes the service related config for a project. + rpc :InitializeService, ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb new file mode 100644 index 000000000000..4920dc53d378 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupplan.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/dayofweek_pb' +require 'google/type/month_pb' + + +descriptor_data = "\n)google/cloud/backupdr/v1/backupplan.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x17google/type/month.proto\"\xa5\x07\n\nBackupPlan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.BackupPlan.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x0c\x62\x61\x63kup_rules\x18\x06 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupRuleB\x03\xe0\x41\x02\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.backupdr.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62\x61\x63kup_vault\x18\n \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12)\n\x1c\x62\x61\x63kup_vault_service_account\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12log_retention_days\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18supported_resource_types\x18\r \x03(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rrevision_name\x18\x0f \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x84\x01\xea\x41\x80\x01\n\"backupdr.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}*\x0b\x62\x61\x63kupPlans2\nbackupPlan\"\xb0\x01\n\nBackupRule\x12\x17\n\x07rule_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x15\x62\x61\x63kup_retention_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12L\n\x11standard_schedule\x18\x05 \x01(\x0b\x32*.google.cloud.backupdr.v1.StandardScheduleB\x03\xe0\x41\x01H\x00\x42\x17\n\x15\x62\x61\x63kup_schedule_oneof\"\x97\x04\n\x10StandardSchedule\x12W\n\x0frecurrence_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.backupdr.v1.StandardSchedule.RecurrenceTypeB\x03\xe0\x41\x02\x12\x1d\n\x10hourly_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x31\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x1a\n\rdays_of_month\x18\x04 \x03(\x05\x42\x03\xe0\x41\x01\x12H\n\x11week_day_of_month\x18\x05 \x01(\x0b\x32(.google.cloud.backupdr.v1.WeekDayOfMonthB\x03\xe0\x41\x01\x12\'\n\x06months\x18\x06 \x03(\x0e\x32\x12.google.type.MonthB\x03\xe0\x41\x01\x12\x42\n\rbackup_window\x18\x07 \x01(\x0b\x32&.google.cloud.backupdr.v1.BackupWindowB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x08 \x01(\tB\x03\xe0\x41\x02\"m\n\x0eRecurrenceType\x12\x1f\n\x1bRECURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\"L\n\x0c\x42\x61\x63kupWindow\x12\x1e\n\x11start_hour_of_day\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x65nd_hour_of_day\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xfa\x01\n\x0eWeekDayOfMonth\x12P\n\rweek_of_month\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonthB\x03\xe0\x41\x02\x12\x30\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"d\n\x0bWeekOfMonth\x12\x1d\n\x19WEEK_OF_MONTH_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IRST\x10\x01\x12\n\n\x06SECOND\x10\x02\x12\t\n\x05THIRD\x10\x03\x12\n\n\x06\x46OURTH\x10\x04\x12\x08\n\x04LAST\x10\x05\"\xd3\x01\n\x17\x43reateBackupPlanRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x62\x61\x63kup_plan\x18\x03 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb1\x01\n\x16ListBackupPlansRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListBackupPlansResponse\x12:\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\"t\n\x17\x44\x65leteBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n\x17UpdateBackupPlanRequest\x12>\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x90\x04\n\x12\x42\x61\x63kupPlanRevision\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupPlanRevision.StateB\x03\xe0\x41\x03\x12\x42\n\x14\x62\x61\x63kup_plan_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04:\xb1\x01\xea\x41\xad\x01\n*backupdr.googleapis.com/BackupPlanRevision\x12Vprojects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}*\x13\x62\x61\x63kupPlanRevisions2\x12\x62\x61\x63kupPlanRevision\"`\n\x1cGetBackupPlanRevisionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*backupdr.googleapis.com/BackupPlanRevision\"\x95\x01\n\x1eListBackupPlanRevisionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*backupdr.googleapis.com/BackupPlanRevision\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9c\x01\n\x1fListBackupPlanRevisionsResponse\x12K\n\x15\x62\x61\x63kup_plan_revisions\x18\x01 \x03(\x0b\x32,.google.cloud.backupdr.v1.BackupPlanRevision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xbf\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + BackupPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan").msgclass + BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan.State").enummodule + BackupRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupRule").msgclass + StandardSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule").msgclass + StandardSchedule::RecurrenceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule.RecurrenceType").enummodule + BackupWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupWindow").msgclass + WeekDayOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth").msgclass + WeekDayOfMonth::WeekOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth").enummodule + CreateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanRequest").msgclass + ListBackupPlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansRequest").msgclass + ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansResponse").msgclass + GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRequest").msgclass + DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanRequest").msgclass + UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanRequest").msgclass + BackupPlanRevision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision").msgclass + BackupPlanRevision::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision.State").enummodule + GetBackupPlanRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRevisionRequest").msgclass + ListBackupPlanRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest").msgclass + ListBackupPlanRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb new file mode 100644 index 000000000000..62ec916ed7ad --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupplanassociation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n4google/cloud/backupdr/v1/backupplanassociation.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xdc\x07\n\x15\x42\x61\x63kupPlanAssociation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1d\n\rresource_type\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x08resource\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12?\n\x0b\x62\x61\x63kup_plan\x18\x04 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.BackupPlanAssociation.StateB\x03\xe0\x41\x03\x12H\n\x11rules_config_info\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.RuleConfigInfoB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x8f\x01\n5cloud_sql_instance_backup_plan_association_properties\x18\n \x01(\x0b\x32I.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12$\n\x17\x62\x61\x63kup_plan_revision_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x62\x61\x63kup_plan_revision_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xbc\x01\xea\x41\xb8\x01\n-backupdr.googleapis.com/BackupPlanAssociation\x12Xprojects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}*\x16\x62\x61\x63kupPlanAssociations2\x15\x62\x61\x63kupPlanAssociationB\x15\n\x13resource_properties\"\x89\x03\n\x0eRuleConfigInfo\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x11last_backup_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\x8c\x02\n\"CreateBackupPlanAssociationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\'\n\x1a\x62\x61\x63kup_plan_association_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n!ListBackupPlanAssociationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\"ListBackupPlanAssociationsResponse\x12Q\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xf3\x01\n1FetchBackupPlanAssociationsForResourceTypeRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n2FetchBackupPlanAssociationsForResourceTypeResponse\x12V\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"f\n\x1fGetBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\"\x8a\x01\n\"DeleteBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd2\x01\n\"UpdateBackupPlanAssociationRequest\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x01 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x92\x01\n\x14TriggerBackupRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x14\n\x07rule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xca\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x1a\x42\x61\x63kupPlanAssociationProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + BackupPlanAssociation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation").msgclass + BackupPlanAssociation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation.State").enummodule + RuleConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo").msgclass + RuleConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState").enummodule + CreateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest").msgclass + ListBackupPlanAssociationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest").msgclass + ListBackupPlanAssociationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse").msgclass + FetchBackupPlanAssociationsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest").msgclass + FetchBackupPlanAssociationsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse").msgclass + GetBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanAssociationRequest").msgclass + DeleteBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest").msgclass + UpdateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest").msgclass + TriggerBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TriggerBackupRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb new file mode 100644 index 000000000000..681dd9955234 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_ba.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/backupdr/v1/backupvault_ba.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\x02\n\x1f\x42\x61\x63kupApplianceBackupProperties\x12\x1f\n\rgeneration_id\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12;\n\rfinalize_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12G\n\x19recovery_range_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x45\n\x17recovery_range_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x10\n\x0e_generation_idB\x10\n\x0e_finalize_timeB\x1c\n\x1a_recovery_range_start_timeB\x1a\n\x18_recovery_range_end_timeB\xc2\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x12\x42\x61\x63kupvaultBaProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + BackupApplianceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb new file mode 100644 index 000000000000..9cb353f7b459 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_cloudsql.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/backupdr/v1/backupvault_cloudsql.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x01\n$CloudSqlInstanceDataSourceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xc3\x02\n CloudSqlInstanceBackupProperties\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x66inal_backup\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0fsource_instance\x18\x04 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12=\n\x14instance_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_delete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xeb\x01\n-CloudSqlInstanceDataSourceReferenceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n$CloudSqlInstanceInitializationConfig\x12\\\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x46.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.EditionB\x03\xe0\x41\x02\"G\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x02\"p\n/CloudSqlInstanceBackupPlanAssociationProperties\x12=\n\x14instance_create_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x96\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x42\x61\x63kupvaultCloudSqlProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41K\n sqladmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + CloudSqlInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties").msgclass + CloudSqlInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties").msgclass + CloudSqlInstanceDataSourceReferenceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties").msgclass + CloudSqlInstanceInitializationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig").msgclass + CloudSqlInstanceInitializationConfig::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition").enummodule + CloudSqlInstanceBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb new file mode 100644 index 000000000000..2fefb83b4977 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_disk.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_gce_pb' + + +descriptor_data = "\n/google/cloud/backupdr/v1/backupvault_disk.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\"@\n\x15\x44iskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"d\n\x1bRegionDiskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rreplica_zones\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xa5\x0b\n\x15\x44iskRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x19\n\x07size_gb\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x15\n\x08licenses\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12G\n\x10guest_os_feature\x18\x05 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x06 \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12+\n\x19physical_block_size_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10provisioned_iops\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16provisioned_throughput\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12-\n\x1b\x65nable_confidential_compute\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x45\n\x0cstorage_pool\x18\x0b \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"compute.googleapis.com/StoragePoolH\x08\x88\x01\x01\x12Y\n\x0b\x61\x63\x63\x65ss_mode\x18\x0c \x01(\x0e\x32:.google.cloud.backupdr.v1.DiskRestoreProperties.AccessModeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\\\n\x0c\x61rchitecture\x18\x0e \x01(\x0e\x32<.google.cloud.backupdr.v1.DiskRestoreProperties.ArchitectureB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1c\n\x0fresource_policy\x18\x0f \x03(\tB\x03\xe0\x41\x01\x12\x16\n\x04type\x18\x10 \x01(\tB\x03\xe0\x41\x02H\x0b\x88\x01\x01\x12P\n\x06labels\x18\x11 \x03(\x0b\x32;.google.cloud.backupdr.v1.DiskRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12l\n\x15resource_manager_tags\x18\x12 \x03(\x0b\x32H.google.cloud.backupdr.v1.DiskRestoreProperties.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"L\n\nAccessMode\x12\x15\n\x11READ_WRITE_SINGLE\x10\x00\x12\x13\n\x0fREAD_WRITE_MANY\x10\x01\x12\x12\n\x0eREAD_ONLY_MANY\x10\x02\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\n\n\x08_size_gbB\x16\n\x14_disk_encryption_keyB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x1e\n\x1c_enable_confidential_computeB\x0f\n\r_storage_poolB\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x07\n\x05_type\"\xff\x03\n\x14\x44iskBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08licenses\x18\x02 \x03(\t\x12\x42\n\x10guest_os_feature\x18\x03 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeature\x12V\n\x0c\x61rchitecture\x18\x04 \x01(\x0e\x32;.google.cloud.backupdr.v1.DiskBackupProperties.ArchitectureH\x01\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07size_gb\x18\x06 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06region\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x11\n\x04zone\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x15\n\rreplica_zones\x18\t \x03(\t\x12\x18\n\x0bsource_disk\x18\n \x01(\tH\x06\x88\x01\x01\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x0e\n\x0c_descriptionB\x0f\n\r_architectureB\x07\n\x05_typeB\n\n\x08_size_gbB\t\n\x07_regionB\x07\n\x05_zoneB\x0e\n\x0c_source_disk\"\\\n\x18\x44iskDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0f\n\x07size_gb\x18\x04 \x01(\x03\x42\xa8\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x14\x42\x61\x63kupvaultDiskProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\x61\n\"compute.googleapis.com/StoragePool\x12;projects/{project}/zones/{zone}/storagePools/{storage_pool}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.backupdr.v1.GuestOsFeature", "google/cloud/backupdr/v1/backupvault_gce.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + DiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskTargetEnvironment").msgclass + RegionDiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RegionDiskTargetEnvironment").msgclass + DiskRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties").msgclass + DiskRestoreProperties::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode").enummodule + DiskRestoreProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.Architecture").enummodule + DiskBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties").msgclass + DiskBackupProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties.Architecture").enummodule + DiskDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskDataSourceProperties").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb new file mode 100644 index 000000000000..7822118f6ba8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault_gce.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' + + +descriptor_data = "\n.google/cloud/backupdr/v1/backupvault_gce.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xe8\x07\n\x1f\x43omputeInstanceBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x04tags\x18\x02 \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsH\x01\x88\x01\x01\x12\x19\n\x0cmachine_type\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63\x61n_ip_forward\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x45\n\x11network_interface\x18\x05 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterface\x12\x34\n\x04\x64isk\x18\x06 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDisk\x12\x39\n\x08metadata\x18\x07 \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataH\x04\x88\x01\x01\x12\x41\n\x0fservice_account\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccount\x12=\n\nscheduling\x18\t \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingH\x05\x88\x01\x01\x12\x46\n\x11guest_accelerator\x18\n \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfig\x12\x1d\n\x10min_cpu_platform\x18\x0b \x01(\tH\x06\x88\x01\x01\x12Z\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeH\x07\x88\x01\x01\x12\x1c\n\x0fsource_instance\x18\r \x01(\tH\x08\x88\x01\x01\x12U\n\x06labels\x18\x0e \x03(\x0b\x32\x45.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\x07\n\x05_tagsB\x0f\n\r_machine_typeB\x11\n\x0f_can_ip_forwardB\x0b\n\t_metadataB\r\n\x0b_schedulingB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_key_revocation_action_typeB\x12\n\x10_source_instance\"\xc7\x12\n ComputeInstanceRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12^\n\x19\x61\x64vanced_machine_features\x18\x02 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.AdvancedMachineFeaturesB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0e\x63\x61n_ip_forward\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x64\n\x1c\x63onfidential_instance_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12%\n\x13\x64\x65letion_protection\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12:\n\x05\x64isks\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDiskB\x03\xe0\x41\x01\x12I\n\x0e\x64isplay_device\x18\x08 \x01(\x0b\x32\'.google.cloud.backupdr.v1.DisplayDeviceB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12L\n\x12guest_accelerators\x18\t \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1a\n\x08hostname\x18\n \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12Z\n\x17instance_encryption_key\x18\x0b \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12_\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12[\n\x06labels\x18\r \x03(\x0b\x32\x46.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x0cmachine_type\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x08metadata\x18\x0f \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\x10min_cpu_platform\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12K\n\x12network_interfaces\x18\x11 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterfaceB\x03\xe0\x41\x01\x12`\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.NetworkPerformanceConfigB\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x42\n\x06params\x18\x13 \x01(\x0b\x32(.google.cloud.backupdr.v1.InstanceParamsB\x03\xe0\x41\x04H\x0e\x88\x01\x01\x12\x88\x01\n\x1aprivate_ipv6_google_access\x18\x14 \x01(\x0e\x32Z.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccessB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12h\n\x13\x61llocation_affinity\x18\x15 \x01(\x0b\x32,.google.cloud.backupdr.v1.AllocationAffinityB\x03\xe0\x41\x01H\x10R\x13reservationAffinity\x88\x01\x01\x12\x1e\n\x11resource_policies\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\nscheduling\x18\x17 \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingB\x03\xe0\x41\x01H\x11\x88\x01\x01\x12G\n\x10service_accounts\x18\x18 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccountB\x03\xe0\x41\x01\x12\x36\n\x04tags\x18\x1a \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsB\x03\xe0\x41\x01H\x12\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc7\x01\n\x1fInstancePrivateIpv6GoogleAccess\x12\x33\n/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\'\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\x02\x12)\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\x03\x42\x07\n\x05_nameB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0b\n\t_hostnameB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x16\n\x14_allocation_affinityB\r\n\x0b_schedulingB\x07\n\x05_tags\"K\n ComputeInstanceTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n#ComputeInstanceDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cmachine_type\x18\x03 \x01(\t\x12\x18\n\x10total_disk_count\x18\x04 \x01(\x03\x12\x1a\n\x12total_disk_size_gb\x18\x05 \x01(\x03\"\xa5\x02\n\x17\x41\x64vancedMachineFeatures\x12.\n\x1c\x65nable_nested_virtualization\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10threads_per_core\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x12visible_core_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12(\n\x16\x65nable_uefi_networking\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x13\n\x11_threads_per_coreB\x15\n\x13_visible_core_countB\x19\n\x17_enable_uefi_networking\"k\n\x1a\x43onfidentialInstanceConfig\x12-\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1e\n\x1c_enable_confidential_compute\"D\n\rDisplayDevice\x12 \n\x0e\x65nable_display\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x87\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x10\x61\x63\x63\x65lerator_type\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_accelerator_typeB\x14\n\x12_accelerator_count\"\xbc\x01\n\x15\x43ustomerEncryptionKey\x12\x16\n\x07raw_key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12 \n\x11rsa_encrypted_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0ckms_key_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12)\n\x17kms_key_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x05\n\x03keyB\x1a\n\x18_kms_key_service_account\"I\n\x05\x45ntry\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"?\n\x08Metadata\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32\x1f.google.cloud.backupdr.v1.EntryB\x03\xe0\x41\x01\"\x96\t\n\x10NetworkInterface\x12\x19\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12/\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02H\x02R\tnetworkIP\x88\x01\x01\x12&\n\x0cipv6_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x03H\x03\x88\x01\x01\x12-\n\x1binternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63\x65ss_configs\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12H\n\x13ipv6_access_configs\x18\x08 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x61lias_ip_ranges\x18\t \x03(\x0b\x32&.google.cloud.backupdr.v1.AliasIpRangeB\x03\xe0\x41\x01\x12M\n\nstack_type\x18\n \x01(\x0e\x32\x34.google.cloud.backupdr.v1.NetworkInterface.StackTypeH\x06\x88\x01\x01\x12]\n\x10ipv6_access_type\x18\x0b \x01(\x0e\x32\x39.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessTypeB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0bqueue_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12N\n\x08nic_type\x18\r \x01(\x0e\x32\x32.google.cloud.backupdr.v1.NetworkInterface.NicTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12$\n\x12network_attachment\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\"E\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIPV4_ONLY\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIpv6AccessType\x12 \n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\">\n\x07NicType\x12\x18\n\x14NIC_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nVIRTIO_NET\x10\x01\x12\t\n\x05GVNIC\x10\x02\x42\n\n\x08_networkB\r\n\x0b_subnetworkB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x07\n\x05_nameB\r\n\x0b_stack_typeB\x13\n\x11_ipv6_access_typeB\x0e\n\x0c_queue_countB\x0b\n\t_nic_typeB\x15\n\x13_network_attachment\"\xd9\x01\n\x18NetworkPerformanceConfig\x12\x66\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.NetworkPerformanceConfig.TierB\x03\xe0\x41\x01H\x00\x88\x01\x01\"5\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06TIER_1\x10\x02\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\xb2\x05\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AccessConfig.AccessTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x0b\x65xternal_ip\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x05natIP\x88\x01\x01\x12\x1f\n\rexternal_ipv6\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x65xternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12 \n\x0eset_public_ptr\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16public_ptr_domain_name\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12R\n\x0cnetwork_tier\x18\x08 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.AccessConfig.NetworkTierB\x03\xe0\x41\x01H\x07\x88\x01\x01\"N\n\nAccessType\x12\x1b\n\x17\x41\x43\x43\x45SS_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eONE_TO_ONE_NAT\x10\x01\x12\x0f\n\x0b\x44IRECT_IPV6\x10\x02\"F\n\x0bNetworkTier\x12\x1c\n\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREMIUM\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x42\x07\n\x05_typeB\x07\n\x05_nameB\x0e\n\x0c_external_ipB\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x11\n\x0f_set_public_ptrB\x19\n\x17_public_ptr_domain_nameB\x0f\n\r_network_tier\"\x84\x01\n\x0c\x41liasIpRange\x12\x1f\n\rip_cidr_range\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15subnetwork_range_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\xb3\x01\n\x0eInstanceParams\x12\x65\n\x15resource_manager_tags\x18\x01 \x03(\x0b\x32\x41.google.cloud.backupdr.v1.InstanceParams.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x02\n\x12\x41llocationAffinity\x12t\n\x17\x63onsume_allocation_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AllocationAffinity.TypeB\x03\xe0\x41\x01H\x00R\x16\x63onsumeReservationType\x88\x01\x01\x12\x15\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x42\x1a\n\x18_consume_allocation_typeB\x06\n\x04_key\"\xdc\t\n\nScheduling\x12]\n\x13on_host_maintenance\x18\x01 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.OnHostMaintenanceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61utomatic_restart\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bpreemptible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12O\n\x0fnode_affinities\x18\x04 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.Scheduling.NodeAffinityB\x03\xe0\x41\x01\x12\x1f\n\rmin_node_cpus\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x12provisioning_model\x18\x06 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.ProvisioningModelB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12m\n\x1binstance_termination_action\x18\x07 \x01(\x0e\x32>.google.cloud.backupdr.v1.Scheduling.InstanceTerminationActionB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12Z\n\x1alocal_ssd_recovery_timeout\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.SchedulingDurationB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\xe1\x01\n\x0cNodeAffinity\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x08operator\x18\x02 \x01(\x0e\x32:.google.cloud.backupdr.v1.Scheduling.NodeAffinity.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x06\n\x04_keyB\x0b\n\t_operator\"U\n\x11OnHostMaintenance\x12#\n\x1fON_HOST_MAINTENANCE_UNSPECIFIED\x10\x00\x12\r\n\tTERMINATE\x10\x01\x12\x0c\n\x07MIGRATE\x10\xe8\x07\"O\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\"^\n\x19InstanceTerminationAction\x12+\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\x16\n\x14_on_host_maintenanceB\x14\n\x12_automatic_restartB\x0e\n\x0c_preemptibleB\x10\n\x0e_min_node_cpusB\x15\n\x13_provisioning_modelB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeout\"^\n\x12SchedulingDuration\x12\x19\n\x07seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05nanos\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_secondsB\x08\n\x06_nanos\"H\n\x0eServiceAccount\x12\x17\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x08\n\x06_email\"\x1a\n\x04Tags\x12\x12\n\x05items\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x91\x0c\n\x0c\x41ttachedDisk\x12\\\n\x11initialize_params\x18\x01 \x01(\x0b\x32\x37.google.cloud.backupdr.v1.AttachedDisk.InitializeParamsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65vice_name\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\x04kind\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14\x64isk_type_deprecated\x18\x06 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x02\x18\x01H\x03\x88\x01\x01\x12G\n\x04mode\x18\x07 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskModeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x18\n\x06source\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\x05index\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04\x62oot\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0b\x61uto_delete\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x14\n\x07license\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12V\n\x0e\x64isk_interface\x18\r \x01(\x0e\x32\x34.google.cloud.backupdr.v1.AttachedDisk.DiskInterfaceB\x03\xe0\x41\x01H\t\x88\x01\x01\x12G\n\x10guest_os_feature\x18\x0e \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x0f \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0c\x64isk_size_gb\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12W\n\x0bsaved_state\x18\x11 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.AttachedDisk.DiskSavedStateB\x06\xe0\x41\x01\xe0\x41\x03H\x0c\x88\x01\x01\x12\x1e\n\tdisk_type\x18\x12 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\r\x88\x01\x01\x12G\n\x04type\x18\x13 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x1aY\n\x10InitializeParams\x12\x1b\n\tdisk_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\rreplica_zones\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_disk_name\"B\n\x08\x44iskType\x12\x19\n\x15\x44ISK_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCRATCH\x10\x01\x12\x0e\n\nPERSISTENT\x10\x02\"P\n\x08\x44iskMode\x12\x19\n\x15\x44ISK_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\n\n\x06LOCKED\x10\x03\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\"A\n\x0e\x44iskSavedState\x12 \n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\x00\x12\r\n\tPRESERVED\x10\x01\x42\x14\n\x12_initialize_paramsB\x0e\n\x0c_device_nameB\x07\n\x05_kindB\x17\n\x15_disk_type_deprecatedB\x07\n\x05_modeB\t\n\x07_sourceB\x08\n\x06_indexB\x07\n\x05_bootB\x0e\n\x0c_auto_deleteB\x11\n\x0f_disk_interfaceB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0e\n\x0c_saved_stateB\x0c\n\n_disk_typeB\x07\n\x05_type\"\xb5\x03\n\x0eGuestOsFeature\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.GuestOsFeature.FeatureTypeH\x00\x88\x01\x01\"\xd0\x02\n\x0b\x46\x65\x61tureType\x12\x1c\n\x18\x46\x45\x41TURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VIRTIO_SCSI_MULTIQUEUE\x10\x01\x12\x0b\n\x07WINDOWS\x10\x02\x12\x13\n\x0fMULTI_IP_SUBNET\x10\x03\x12\x13\n\x0fUEFI_COMPATIBLE\x10\x04\x12\x0f\n\x0bSECURE_BOOT\x10\x05\x12\t\n\x05GVNIC\x10\x06\x12\x0f\n\x0bSEV_CAPABLE\x10\x07\x12\x1f\n\x1b\x42\x41RE_METAL_LINUX_COMPATIBLE\x10\x08\x12\x1d\n\x19SUSPEND_RESUME_COMPATIBLE\x10\t\x12\x17\n\x13SEV_LIVE_MIGRATABLE\x10\n\x12\x13\n\x0fSEV_SNP_CAPABLE\x10\x0b\x12\x0f\n\x0bTDX_CAPABLE\x10\x0c\x12\x08\n\x04IDPF\x10\r\x12\x1a\n\x16SEV_LIVE_MIGRATABLE_V2\x10\x0e\x42\x07\n\x05_type*Y\n\x17KeyRevocationActionType\x12*\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\xc3\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x13\x42\x61\x63kupvaultGceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + ComputeInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceBackupProperties").msgclass + ComputeInstanceRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties").msgclass + ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess").enummodule + ComputeInstanceTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment").msgclass + ComputeInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties").msgclass + AdvancedMachineFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AdvancedMachineFeatures").msgclass + ConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ConfidentialInstanceConfig").msgclass + DisplayDevice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DisplayDevice").msgclass + AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AcceleratorConfig").msgclass + CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CustomerEncryptionKey").msgclass + Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Entry").msgclass + Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Metadata").msgclass + NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface").msgclass + NetworkInterface::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.StackType").enummodule + NetworkInterface::Ipv6AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType").enummodule + NetworkInterface::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.NicType").enummodule + NetworkPerformanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig").msgclass + NetworkPerformanceConfig::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier").enummodule + AccessConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig").msgclass + AccessConfig::AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.AccessType").enummodule + AccessConfig::NetworkTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.NetworkTier").enummodule + AliasIpRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AliasIpRange").msgclass + InstanceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InstanceParams").msgclass + AllocationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity").msgclass + AllocationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity.Type").enummodule + Scheduling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling").msgclass + Scheduling::NodeAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity").msgclass + Scheduling::NodeAffinity::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator").enummodule + Scheduling::OnHostMaintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.OnHostMaintenance").enummodule + Scheduling::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.ProvisioningModel").enummodule + Scheduling::InstanceTerminationAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction").enummodule + SchedulingDuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.SchedulingDuration").msgclass + ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceAccount").msgclass + Tags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Tags").msgclass + AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk").msgclass + AttachedDisk::InitializeParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.InitializeParams").msgclass + AttachedDisk::DiskType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskType").enummodule + AttachedDisk::DiskMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskMode").enummodule + AttachedDisk::DiskInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskInterface").enummodule + AttachedDisk::DiskSavedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskSavedState").enummodule + GuestOsFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature").msgclass + GuestOsFeature::FeatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature.FeatureType").enummodule + KeyRevocationActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.KeyRevocationActionType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb new file mode 100644 index 000000000000..57dcfc943182 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/backupvault.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_ba_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/cloud/backupdr/v1/backupvault_disk_pb' +require 'google/cloud/backupdr/v1/backupvault_gce_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n*google/cloud/backupdr/v1/backupvault.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/backupdr/v1/backupvault_ba.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a/google/cloud/backupdr/v1/backupvault_disk.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9f\x0f\n\x0b\x42\x61\x63kupVault\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.BackupVault.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12W\n*backup_minimum_enforced_retention_duration\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1b \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\tdeletable\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x16\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupVault.StateB\x03\xe0\x41\x03\x12<\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12total_stored_bytes\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x15 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12P\n\x0b\x61nnotations\x18\x16 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.AnnotationsEntryB\x03\xe0\x41\x01\x12X\n\x12\x61\x63\x63\x65ss_restriction\x18\x18 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.BackupVault.AccessRestrictionB\x03\xe0\x41\x01\x12[\n\x11\x65ncryption_config\x18\x1d \x01(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.EncryptionConfigB\x03\xe0\x41\x01H\x08\x88\x01\x01\x1ai\n\x10\x45ncryptionConfig\x12\x44\n\x0ckms_key_name\x18\x01 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x00\x88\x01\x01\x42\x0f\n\r_kms_key_name\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x1a\x42\x61\x63kupRetentionInheritance\x12,\n(BACKUP_RETENTION_INHERITANCE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_VAULT_RETENTION\x10\x01\x12\x1c\n\x18MATCH_BACKUP_EXPIRE_TIME\x10\x02\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\"\x9e\x01\n\x11\x41\x63\x63\x65ssRestriction\x12\"\n\x1e\x41\x43\x43\x45SS_RESTRICTION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWITHIN_PROJECT\x10\x01\x12\x17\n\x13WITHIN_ORGANIZATION\x10\x02\x12\x10\n\x0cUNRESTRICTED\x10\x03\x12&\n\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\x10\x04:\x88\x01\xea\x41\x84\x01\n#backupdr.googleapis.com/BackupVault\x12\x42projects/{project}/locations/{location}/backupVaults/{backupvault}*\x0c\x62\x61\x63kupVaults2\x0b\x62\x61\x63kupVaultB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB-\n+_backup_minimum_enforced_retention_durationB\x1f\n\x1d_backup_retention_inheritanceB\x0c\n\n_deletableB\x07\n\x05_etagB\x11\n\x0f_effective_timeB\x14\n\x12_encryption_config\"\x8c\t\n\nDataSource\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05state\x18\x15 \x01(\x0e\x32*.google.cloud.backupdr.v1.DataSource.StateB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.DataSource.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x07 \x01(\x03H\x03\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x12total_stored_bytes\x18\x17 \x01(\x03H\x05\x88\x01\x01\x12\x46\n\x0c\x63onfig_state\x18\x18 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12K\n\x12\x62\x61\x63kup_config_info\x18\x19 \x01(\x0b\x32*.google.cloud.backupdr.v1.BackupConfigInfoB\x03\xe0\x41\x03\x12S\n\x18\x64\x61ta_source_gcp_resource\x18\x1a \x01(\x0b\x32/.google.cloud.backupdr.v1.DataSourceGcpResourceH\x00\x12r\n(data_source_backup_appliance_application\x18\x1b \x01(\x0b\x32>.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationH\x00\x12\x37\n*backup_blocked_by_vault_access_restriction\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\x9e\x01\xea\x41\x9a\x01\n\"backupdr.googleapis.com/DataSource\x12[projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x11\n\x0fsource_resourceB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x0f\n\r_backup_countB\x07\n\x05_etagB\x15\n\x13_total_stored_bytes\"\xb1\x04\n\x10\x42\x61\x63kupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x11gcp_backup_config\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.GcpBackupConfigH\x00\x12_\n\x1e\x62\x61\x63kup_appliance_backup_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.BackupApplianceBackupConfigH\x00\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x0f\n\rbackup_config\"\xa4\x02\n\x0fGcpBackupConfig\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\x17\x62\x61\x63kup_plan_description\x18\x02 \x01(\t\x12S\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\tB2\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x19\n\x11\x62\x61\x63kup_plan_rules\x18\x04 \x03(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x05 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x06 \x01(\t\"\xba\x01\n\x1b\x42\x61\x63kupApplianceBackupConfig\x12\x1d\n\x15\x62\x61\x63kup_appliance_name\x18\x01 \x01(\t\x12\x1b\n\x13\x62\x61\x63kup_appliance_id\x18\x02 \x01(\x03\x12\x0e\n\x06sla_id\x18\x03 \x01(\x03\x12\x18\n\x10\x61pplication_name\x18\x04 \x01(\t\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x10\n\x08slt_name\x18\x06 \x01(\t\x12\x10\n\x08slp_name\x18\x07 \x01(\t\"\xb5\x03\n\x15\x44\x61taSourceGcpResource\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12o\n&compute_instance_datasource_properties\x18\x04 \x01(\x0b\x32=.google.cloud.backupdr.v1.ComputeInstanceDataSourcePropertiesH\x00\x12w\n(cloud_sql_instance_datasource_properties\x18\x05 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12X\n\x1a\x64isk_datasource_properties\x18\x07 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.DiskDataSourcePropertiesH\x00\x42\x19\n\x17gcp_resource_properties\"\xb9\x01\n$DataSourceBackupApplianceApplication\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_appliance\x18\x02 \x01(\t\x12\x14\n\x0c\x61ppliance_id\x18\x03 \x01(\x03\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x08 \x01(\x03\x12\x10\n\x08hostname\x18\x06 \x01(\t\x12\x0f\n\x07host_id\x18\x07 \x01(\x03\")\n\x0fServiceLockInfo\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x17\x42\x61\x63kupApplianceLockInfo\x12 \n\x13\x62\x61\x63kup_appliance_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\"\n\x15\x62\x61\x63kup_appliance_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0block_reason\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x08job_name\x18\x06 \x01(\tH\x00\x12\x16\n\x0c\x62\x61\x63kup_image\x18\x07 \x01(\tH\x00\x12\x10\n\x06sla_id\x18\x08 \x01(\x03H\x00\x42\r\n\x0block_source\"\xfe\x01\n\nBackupLock\x12\x38\n\x0flock_until_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12W\n\x1a\x62\x61\x63kup_appliance_lock_info\x18\x03 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.BackupApplianceLockInfoH\x00\x12K\n\x11service_lock_info\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.ServiceLockInfoB\x03\xe0\x41\x03H\x00\x42\x10\n\x0e\x43lientLockInfo\"\x9b\x13\n\x06\x42\x61\x63kup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x41\n\x06labels\x18\x05 \x03(\x0b\x32,.google.cloud.backupdr.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12I\n\x1b\x65nforced_retention_end_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1e \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x39\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12>\n\x10\x63onsistency_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\t\x88\x01\x01\x12\x16\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12:\n\x05state\x18\x0f \x01(\x0e\x32&.google.cloud.backupdr.v1.Backup.StateB\x03\xe0\x41\x03\x12@\n\rservice_locks\x18\x11 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x03\x12I\n\x16\x62\x61\x63kup_appliance_locks\x18\x12 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x01\x12l\n\"compute_instance_backup_properties\x18\x13 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.ComputeInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12o\n$cloud_sql_instance_backup_properties\x18\x1a \x01(\x0b\x32:.google.cloud.backupdr.v1.CloudSqlInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12l\n\"backup_appliance_backup_properties\x18\x15 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.BackupApplianceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12U\n\x16\x64isk_backup_properties\x18\x1c \x01(\x0b\x32..google.cloud.backupdr.v1.DiskBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x45\n\x0b\x62\x61\x63kup_type\x18\x14 \x01(\x0e\x32+.google.cloud.backupdr.v1.Backup.BackupTypeB\x03\xe0\x41\x03\x12W\n\x14gcp_backup_plan_info\x18\x16 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfoB\x03\xe0\x41\x03H\x01\x12 \n\x13resource_size_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x19 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12H\n\x0cgcp_resource\x18\x1f \x01(\x0b\x32+.google.cloud.backupdr.v1.BackupGcpResourceB\x03\xe0\x41\x03H\x02\x12J\n\x10kms_key_versions\x18! \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\xb2\x01\n\x11GCPBackupPlanInfo\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x13\x62\x61\x63kup_plan_rule_id\x18\x02 \x01(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x03 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x04 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\r\n\tUPLOADING\x10\x05\"b\n\nBackupType\x12\x1b\n\x17\x42\x41\x43KUP_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\r\n\tON_DEMAND\x10\x02\x12\x19\n\x15ON_DEMAND_OPERATIONAL\x10\x03:\xa3\x01\xea\x41\x9f\x01\n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12lprojects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupB\x13\n\x11\x62\x61\x63kup_propertiesB\x0b\n\tplan_infoB\x11\n\x0fsource_resourceB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x1e\n\x1c_enforced_retention_end_timeB\x1f\n\x1d_backup_retention_inheritanceB\x0e\n\x0c_expire_timeB\x13\n\x11_consistency_timeB\x07\n\x05_etagB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xf4\x01\n\x18\x43reateBackupVaultRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x1c\n\x0f\x62\x61\x63kup_vault_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x03 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xf1\x01\n\x17ListBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12<\n\x04view\x18\x06 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x86\x01\n\x18ListBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x1e\x46\x65tchUsableBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1f\x46\x65tchUsableBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8e\x02\n\"FetchBackupsForResourceTypeRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x07 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"q\n#FetchBackupsForResourceTypeResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x90\x01\n\x15GetBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12<\n\x04view\x18\x02 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x91\x02\n\x18UpdateBackupVaultRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x02 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x66orce_update_access_restriction\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xfc\x01\n\x18\x44\x65leteBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1dignore_backup_plan_references\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x16ListDataSourcesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/DataSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListDataSourcesResponse\x12:\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetDataSourceRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/DataSource\"\xcc\x01\n\x17UpdateDataSourceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12>\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32$.google.cloud.backupdr.v1.DataSourceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x01\n\x12ListBackupsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x06 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"v\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10GetBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x37\n\x04view\x18\x02 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"\xa3\x01\n\x13UpdateBackupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32 .google.cloud.backupdr.v1.BackupB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"l\n\x13\x44\x65leteBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xe2\x05\n\x14RestoreBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n#compute_instance_target_environment\x18\x03 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironmentH\x00\x12R\n\x17\x64isk_target_environment\x18\x05 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskTargetEnvironmentH\x00\x12_\n\x1eregion_disk_target_environment\x18\x06 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.RegionDiskTargetEnvironmentH\x00\x12i\n#compute_instance_restore_properties\x18\x04 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceRestorePropertiesH\x01\x12R\n\x17\x64isk_restore_properties\x18\x07 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskRestorePropertiesH\x01\x12H\n\x1a\x63lear_overrides_field_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x14\n\x12target_environmentB\x15\n\x13instance_propertiesB\x1d\n\x1b_clear_overrides_field_mask\"Z\n\x15RestoreBackupResponse\x12\x41\n\x0ftarget_resource\x18\x01 \x01(\x0b\x32(.google.cloud.backupdr.v1.TargetResource\"g\n\x0eTargetResource\x12=\n\x0cgcp_resource\x18\x01 \x01(\x0b\x32%.google.cloud.backupdr.v1.GcpResourceH\x00\x42\x16\n\x14target_resource_info\"G\n\x0bGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"M\n\x11\x42\x61\x63kupGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t*Q\n\x11\x42\x61\x63kupConfigState\x12#\n\x1f\x42\x41\x43KUP_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PASSIVE\x10\x02*V\n\nBackupView\x12\x1b\n\x17\x42\x41\x43KUP_VIEW_UNSPECIFIED\x10\x00\x12\x15\n\x11\x42\x41\x43KUP_VIEW_BASIC\x10\x01\x12\x14\n\x10\x42\x41\x43KUP_VIEW_FULL\x10\x02*m\n\x0f\x42\x61\x63kupVaultView\x12!\n\x1d\x42\x41\x43KUP_VAULT_VIEW_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42\x41\x43KUP_VAULT_VIEW_BASIC\x10\x01\x12\x1a\n\x16\x42\x41\x43KUP_VAULT_VIEW_FULL\x10\x02\x42\xda\x03\n\x1c\x63om.google.cloud.backupdr.v1B\x10\x42\x61\x63kupVaultProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41m\n!cloudkms.googleapis.com/CryptoKey\x12Hprojects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ["google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties", "google/cloud/backupdr/v1/backupvault_gce.proto"], + ["google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], + ["google.cloud.backupdr.v1.DiskDataSourceProperties", "google/cloud/backupdr/v1/backupvault_disk.proto"], + ["google.cloud.backupdr.v1.BackupApplianceBackupProperties", "google/cloud/backupdr/v1/backupvault_ba.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + BackupVault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault").msgclass + BackupVault::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.EncryptionConfig").msgclass + BackupVault::BackupRetentionInheritance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance").enummodule + BackupVault::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.State").enummodule + BackupVault::AccessRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.AccessRestriction").enummodule + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource").msgclass + DataSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource.State").enummodule + BackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo").msgclass + BackupConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState").enummodule + GcpBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpBackupConfig").msgclass + BackupApplianceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupConfig").msgclass + DataSourceGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResource").msgclass + DataSourceBackupApplianceApplication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupApplianceApplication").msgclass + ServiceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceLockInfo").msgclass + BackupApplianceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceLockInfo").msgclass + BackupLock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLock").msgclass + Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup").msgclass + Backup::GCPBackupPlanInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo").msgclass + Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.State").enummodule + Backup::BackupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.BackupType").enummodule + CreateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupVaultRequest").msgclass + ListBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsRequest").msgclass + ListBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsResponse").msgclass + FetchUsableBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest").msgclass + FetchUsableBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse").msgclass + FetchBackupsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest").msgclass + FetchBackupsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse").msgclass + GetBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupVaultRequest").msgclass + UpdateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupVaultRequest").msgclass + DeleteBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupVaultRequest").msgclass + ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesRequest").msgclass + ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesResponse").msgclass + GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceRequest").msgclass + UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateDataSourceRequest").msgclass + ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsRequest").msgclass + ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsResponse").msgclass + GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupRequest").msgclass + UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupRequest").msgclass + DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupRequest").msgclass + RestoreBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupRequest").msgclass + RestoreBackupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupResponse").msgclass + TargetResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TargetResource").msgclass + GcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpResource").msgclass + BackupGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupGcpResource").msgclass + BackupConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigState").enummodule + BackupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupView").enummodule + BackupVaultView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVaultView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb new file mode 100644 index 000000000000..ecfc1771ff13 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module BackupDR + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/backupdr/v1/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BackupDR"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb new file mode 100644 index 000000000000..f6541ad81bf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/datasourcereference.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/backupdr/v1/backupvault_pb' +require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/backupdr/v1/datasourcereference.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd7\x05\n\x13\x44\x61taSourceReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12?\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"backupdr.googleapis.com/DataSource\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x1f\x64\x61ta_source_backup_config_state\x18\x04 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12%\n\x18\x64\x61ta_source_backup_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x61\n\x1e\x64\x61ta_source_backup_config_info\x18\x06 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.DataSourceBackupConfigInfoB\x03\xe0\x41\x03\x12_\n\x1d\x64\x61ta_source_gcp_resource_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.backupdr.v1.DataSourceGcpResourceInfoB\x03\xe0\x41\x03\x12$\n\x12total_stored_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01:\xb2\x01\xea\x41\xae\x01\n+backupdr.googleapis.com/DataSourceReference\x12Tprojects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}*\x14\x64\x61taSourceReferences2\x13\x64\x61taSourceReferenceB\x15\n\x13_total_stored_bytes\"\xca\x01\n\x1a\x44\x61taSourceBackupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xf2\x01\n\x19\x44\x61taSourceGcpResourceInfo\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12u\n\x1d\x63loud_sql_instance_properties\x18\x04 \x01(\x0b\x32G.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferencePropertiesB\x03\xe0\x41\x03H\x00\x42\x15\n\x13resource_properties\"b\n\x1dGetDataSourceReferenceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+backupdr.googleapis.com/DataSourceReference\"\xc3\x01\n\x1fListDataSourceReferencesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9f\x01\n ListDataSourceReferencesResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xef\x01\n/FetchDataSourceReferencesForResourceTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n0FetchDataSourceReferencesForResourceTypeResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xc8\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x44\x61taSourceReferenceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceReference").msgclass + DataSourceBackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupConfigInfo").msgclass + DataSourceGcpResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResourceInfo").msgclass + GetDataSourceReferenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceReferenceRequest").msgclass + ListDataSourceReferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesRequest").msgclass + ListDataSourceReferencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesResponse").msgclass + FetchDataSourceReferencesForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest").msgclass + FetchDataSourceReferencesForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb new file mode 100644 index 000000000000..545a41d844c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/backupdr/v1/protection_summary.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/cloud/backupdr/v1/protection_summary.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n ListResourceBackupConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n!ListResourceBackupConfigsResponse\x12O\n\x17resource_backup_configs\x18\x01 \x03(\x0b\x32..google.cloud.backupdr.v1.ResourceBackupConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xec\x06\n\x14ResourceBackupConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x14target_resource_type\x18\x05 \x01(\x0e\x32;.google.cloud.backupdr.v1.ResourceBackupConfig.ResourceTypeB\x03\xe0\x41\x03\x12h\n\x16target_resource_labels\x18\x06 \x03(\x0b\x32H.google.cloud.backupdr.v1.ResourceBackupConfig.TargetResourceLabelsEntry\x12M\n\x16\x62\x61\x63kup_configs_details\x18\x07 \x03(\x0b\x32-.google.cloud.backupdr.v1.BackupConfigDetails\x12\x1e\n\x11\x62\x61\x63kup_configured\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x07vaulted\x18\t \x01(\x08\x42\x03\xe0\x41\x03\x1a;\n\x19TargetResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x97\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x01\x12\x15\n\x11\x43OMPUTE_ENGINE_VM\x10\x02\x12\x17\n\x13\x43OMPUTE_ENGINE_DISK\x10\x03\x12 \n\x1c\x43OMPUTE_ENGINE_REGIONAL_DISK\x10\x04:\xb7\x01\xea\x41\xb3\x01\n,backupdr.googleapis.com/ResourceBackupConfig\x12Vprojects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}*\x15resourceBackupConfigs2\x14resourceBackupConfig\"\xa2\x07\n\x13\x42\x61\x63kupConfigDetails\x12!\n\x14\x62\x61\x63kup_config_source\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12.\n!backup_config_source_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupConfigDetails.TypeB\x03\xe0\x41\x03\x12G\n\x05state\x18\x04 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.BackupConfigDetails.StateB\x03\xe0\x41\x03\x12\x42\n\rpitr_settings\x18\x05 \x01(\x0b\x32&.google.cloud.backupdr.v1.PitrSettingsB\x03\xe0\x41\x03\x12\x46\n\x1dlatest_successful_backup_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12 \n\x13\x61pplicable_resource\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61\x63kup_vault\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x10\x62\x61\x63kup_locations\x18\x0c \x03(\x0b\x32(.google.cloud.backupdr.v1.BackupLocation\x12M\n\x15\x62\x61\x63kup_dr_plan_config\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.BackupDrPlanConfigH\x00\x12U\n\x19\x62\x61\x63kup_dr_template_config\x18\x0b \x01(\x0b\x32\x30.google.cloud.backupdr.v1.BackupDrTemplateConfigH\x00\"\x97\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12$\n CLOUD_SQL_INSTANCE_BACKUP_CONFIG\x10\x01\x12\"\n\x1e\x43OMPUTE_ENGINE_RESOURCE_POLICY\x10\x02\x12\x18\n\x14\x42\x41\x43KUPDR_BACKUP_PLAN\x10\x03\x12\x15\n\x11\x42\x41\x43KUPDR_TEMPLATE\x10\x04\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\x16\n\x14plan_specific_config\"+\n\x0cPitrSettings\x12\x1b\n\x0eretention_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\"j\n\x16\x42\x61\x63kupDrTemplateConfig\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x12\x42\x61\x63kupDrPlanConfig\x12H\n\x14\x62\x61\x63kup_dr_plan_rules\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.BackupDrPlanRule\"n\n\x10\x42\x61\x63kupDrPlanRule\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x1blast_successful_backup_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xb7\x01\n\x0e\x42\x61\x63kupLocation\x12@\n\x04type\x18\x01 \x01(\x0e\x32-.google.cloud.backupdr.v1.BackupLocation.TypeB\x03\xe0\x41\x03\x12\x18\n\x0blocation_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"I\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05ZONAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\x12\x12\n\x0eMULTI_REGIONAL\x10\x03\x32\xcb\x02\n\x19\x42\x61\x63kupDrProtectionSummary\x12\xe0\x01\n\x19ListResourceBackupConfigs\x12:.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest\x1a;.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/resourceBackupConfigs\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x16ProtectionSummaryProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module BackupDR + module V1 + ListResourceBackupConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsRequest").msgclass + ListResourceBackupConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListResourceBackupConfigsResponse").msgclass + ResourceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig").msgclass + ResourceBackupConfig::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ResourceBackupConfig.ResourceType").enummodule + BackupConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails").msgclass + BackupConfigDetails::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.Type").enummodule + BackupConfigDetails::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigDetails.State").enummodule + PitrSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.PitrSettings").msgclass + BackupDrTemplateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrTemplateConfig").msgclass + BackupDrPlanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanConfig").msgclass + BackupDrPlanRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupDrPlanRule").msgclass + BackupLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation").msgclass + BackupLocation::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLocation.Type").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb new file mode 100644 index 000000000000..6bad6df6a175 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/backupdr/v1/protection_summary.proto for package 'Google.Cloud.BackupDR.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/backupdr/v1/protection_summary_pb' + +module Google + module Cloud + module BackupDR + module V1 + module BackupDrProtectionSummary + # The Protection Summary service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.backupdr.v1.BackupDrProtectionSummary' + + # Lists ResourceBackupConfigs. + rpc :ListResourceBackupConfigs, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb new file mode 100644 index 000000000000..9cc488ca2ae8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/backupdr/v1/backupdr/rest" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" +require "google/cloud/backupdr/v1/bindings_override" +require "google/cloud/backupdr/v1/version" + +module Google + module Cloud + module BackupDR + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/backupdr/v1/rest" + # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb new file mode 100644 index 000000000000..e74b73cd9c04 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md new file mode 100644 index 000000000000..c891244acc73 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Backup and DR Service V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb new file mode 100644 index 000000000000..de97c93454cf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb @@ -0,0 +1,415 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Network configuration for ManagementServer instance. + # @!attribute [rw] network + # @return [::String] + # Optional. The resource name of the Google Compute Engine VPC network to + # which the ManagementServer instance is connected. + # @!attribute [rw] peering_mode + # @return [::Google::Cloud::BackupDR::V1::NetworkConfig::PeeringMode] + # Optional. The network connect mode of the ManagementServer instance. For + # this version, only PRIVATE_SERVICE_ACCESS is supported. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VPC peering modes supported by Cloud BackupDR. + module PeeringMode + # Peering mode not set. + PEERING_MODE_UNSPECIFIED = 0 + + # Connect using Private Service Access to the Management Server. Private + # services access provides an IP address range for multiple Google Cloud + # services, including Cloud BackupDR. + PRIVATE_SERVICE_ACCESS = 1 + end + end + + # ManagementURI for the Management Server resource. + # @!attribute [r] web_ui + # @return [::String] + # Output only. The ManagementServer AGM/RD WebUI URL. + # @!attribute [r] api + # @return [::String] + # Output only. The ManagementServer AGM/RD API URL. + class ManagementURI + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. + # @!attribute [r] first_party_management_uri + # @return [::String] + # Output only. First party Management URI for Google Identities. + # @!attribute [r] third_party_management_uri + # @return [::String] + # Output only. Third party Management URI for External Identity Providers. + class WorkforceIdentityBasedManagementURI + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, + # @!attribute [r] first_party_oauth2_client_id + # @return [::String] + # Output only. First party OAuth Client ID for Google Identities. + # @!attribute [r] third_party_oauth2_client_id + # @return [::String] + # Output only. Third party OAuth Client ID for External Identity Providers. + class WorkforceIdentityBasedOAuth2ClientID + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ManagementServer describes a single BackupDR ManagementServer instance. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the ManagementServer instance (2048 characters + # or less). + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # Labels currently defined: + # 1. migrate_from_go= + # If set to true, the MS is created in migration ready mode. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceType] + # Optional. The type of the ManagementServer resource. + # @!attribute [r] management_uri + # @return [::Google::Cloud::BackupDR::V1::ManagementURI] + # Output only. The hostname or ip address of the exposed AGM endpoints, used + # by clients to connect to AGM/RD graphical user interface and APIs. + # @!attribute [r] workforce_identity_based_management_uri + # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedManagementURI] + # Output only. The hostnames of the exposed AGM endpoints for both types of + # user i.e. 1p and 3p, used to connect AGM/RM UI. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceState] + # Output only. The ManagementServer state. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkConfig>] + # Optional. VPC networks to which the ManagementServer instance is connected. + # For this version, only a single network is supported. This field is + # optional if MS is created without PSA + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag for the ManagementServer resource to + # prevent simultaneous updates from overwiting each other. + # @!attribute [r] oauth2_client_id + # @return [::String] + # 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 + # specification + # https://openid.net/specs/openid-connect-core-1_0.html#IDToken). + # @!attribute [r] workforce_identity_based_oauth2_client_id + # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedOAuth2ClientID] + # Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. + # @!attribute [r] ba_proxy_uri + # @return [::Array<::String>] + # Output only. The hostname or ip address of the exposed AGM endpoints, used + # by BAs to connect to BA proxy. + # @!attribute [r] satisfies_pzs + # @return [::Google::Protobuf::BoolValue] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + class ManagementServer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of backup service resource. + module InstanceType + # Instance type is not mentioned. + INSTANCE_TYPE_UNSPECIFIED = 0 + + # Instance for backup and restore management (i.e., AGM). + BACKUP_RESTORE = 1 + end + + # State of Management server instance. + module InstanceState + # State not set. + INSTANCE_STATE_UNSPECIFIED = 0 + + # The instance is being created. + CREATING = 1 + + # The instance has been created and is fully usable. + READY = 2 + + # The instance configuration is being updated. Certain kinds of updates + # may cause the instance to become unusable while the update is in + # progress. + UPDATING = 3 + + # The instance is being deleted. + DELETING = 4 + + # The instance is being repaired and may be unstable. + REPAIRING = 5 + + # Maintenance is being performed on this instance. + MAINTENANCE = 6 + + # The instance is experiencing an issue and might be unusable. You can get + # further details from the statusMessage field of Instance resource. + ERROR = 7 + end + end + + # Request message for listing management servers. + # @!attribute [rw] parent + # @return [::String] + # 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 Google Cloud regions, for example + # **us-central1**. To retrieve management servers for all locations, use "-" + # for the + # '\\{location}' value. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListManagementServersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing management servers. + # @!attribute [rw] management_servers + # @return [::Array<::Google::Cloud::BackupDR::V1::ManagementServer>] + # The list of ManagementServer instances in the project for the specified + # location. + # + # If the '\\{location}' value in the request is "-", the response contains a + # list of instances from all locations. In case any location is unreachable, + # the response will only return management servers in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListManagementServersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a management server instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the management server resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' + class GetManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a management server instance. + # @!attribute [rw] parent + # @return [::String] + # Required. The management server project and location in the format + # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR + # locations map to Google Cloud regions, for example **us-central1**. + # @!attribute [rw] management_server_id + # @return [::String] + # Required. The name of the management server to create. The name must be + # unique for the specified project and location. + # @!attribute [rw] management_server + # @return [::Google::Cloud::BackupDR::V1::ManagementServer] + # Required. A [management server + # resource][google.cloud.backupdr.v1.ManagementServer] + # @!attribute [rw] request_id + # @return [::String] + # 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). + class CreateManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a management server instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # 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). + class DeleteManagementServerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for initializing the service. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the serviceConfig used to initialize the + # service. Format: + # `projects/{project_id}/locations/{location}/serviceConfig`. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The resource type to which the default service config will be + # applied. Examples include, "compute.googleapis.com/Instance" and + # "storage.googleapis.com/Bucket". + # @!attribute [rw] request_id + # @return [::String] + # 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). + # @!attribute [rw] cloud_sql_instance_initialization_config + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig] + # Optional. The configuration for initializing a Cloud SQL instance. + class InitializeServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for initializing the service. + # @!attribute [rw] backup_vault_name + # @return [::String] + # The resource name of the default `BackupVault` created. + # Format: + # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + # @!attribute [rw] backup_plan_name + # @return [::String] + # The resource name of the default `BackupPlan` created. + # Format: + # `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`. + class InitializeServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to 'Code.CANCELLED'. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + # @!attribute [r] additional_info + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. AdditionalInfo contains additional Info related to backup plan + # association resource. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AdditionalInfoEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb new file mode 100644 index 000000000000..3fe7afac110e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb @@ -0,0 +1,588 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # A `BackupPlan` specifies some common fields, such as `description` as well + # as one or more `BackupRule` messages. Each `BackupRule` has a retention + # policy and defines a schedule by which the system is to perform backup + # workloads. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the `BackupPlan`. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @!attribute [rw] description + # @return [::String] + # 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. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. This collection of key/value pairs allows for custom labels to be + # supplied by the user. Example, \\{"tag": "Weekly"}. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the `BackupPlan` was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the `BackupPlan` was last updated. + # @!attribute [rw] backup_rules + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupRule>] + # Required. The backup rules for this `BackupPlan`. There must be at least + # one `BackupRule` message. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlan::State] + # Output only. The `State` for the `BackupPlan`. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The resource type to which the `BackupPlan` will be applied. + # Examples include, "compute.googleapis.com/Instance", + # "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", + # "compute.googleapis.com/Disk". + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] backup_vault + # @return [::String] + # Required. Resource name of backup vault which will be used as storage + # location for backups. Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault} + # @!attribute [r] backup_vault_service_account + # @return [::String] + # 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. + # @!attribute [rw] log_retention_days + # @return [::Integer] + # Optional. Applicable only for CloudSQL resource_type. + # + # Configures how long logs will be stored. It is defined in “days”. This + # value should be greater than or equal to minimum enforced log retention + # duration of the backup vault. + # @!attribute [r] supported_resource_types + # @return [::Array<::String>] + # Output only. All resource types to which backupPlan can be applied. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] revision_name + # @return [::String] + # Output only. The resource id of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + class BackupPlan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `State` enumerates the possible states for a `BackupPlan`. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + + # The resource is being updated. + UPDATING = 5 + end + end + + # `BackupRule` binds the backup schedule to a retention policy. + # @!attribute [rw] rule_id + # @return [::String] + # 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}/. + # @!attribute [rw] backup_retention_days + # @return [::Integer] + # Required. Configures the duration for which backup data will be kept. It is + # defined in “days”. The value should be greater than or equal to minimum + # enforced retention of the backup vault. + # + # Minimum value is 1 and maximum value is 36159 for custom retention + # on-demand backup. + # Minimum and maximum values are workload specific for all other rules. + # @!attribute [rw] standard_schedule + # @return [::Google::Cloud::BackupDR::V1::StandardSchedule] + # Optional. Defines a schedule that runs within the confines of a defined + # window of time. + class BackupRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StandardSchedule` defines a schedule that run within the confines of a + # defined window of days. We can define recurrence type for schedule as + # HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. + # @!attribute [rw] recurrence_type + # @return [::Google::Cloud::BackupDR::V1::StandardSchedule::RecurrenceType] + # Required. Specifies the `RecurrenceType` for the schedule. + # @!attribute [rw] hourly_frequency + # @return [::Integer] + # 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 4 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). + # @!attribute [rw] days_of_week + # @return [::Array<::Google::Type::DayOfWeek>] + # 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`. + # @!attribute [rw] days_of_month + # @return [::Array<::Integer>] + # 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. + # @!attribute [rw] week_day_of_month + # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth] + # Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST + # MONDAY, on which jobs will run. This will be specified by two fields in + # `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, + # e.g. `LAST`. + # + # This field is only applicable for `recurrence_type`, `MONTHLY` and + # `YEARLY`. A validation error will occur if other values are supplied. + # @!attribute [rw] months + # @return [::Array<::Google::Type::Month>] + # 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. + # @!attribute [rw] backup_window + # @return [::Google::Cloud::BackupDR::V1::BackupWindow] + # Required. A BackupWindow defines the window of day during which backup jobs + # will run. Jobs are queued at the beginning of the window and will be marked + # as `NOT_RUN` if they do not start by the end of the window. + # + # Note: running jobs will not be cancelled at the end of the window. + # @!attribute [rw] time_zone + # @return [::String] + # 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. + class StandardSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `RecurrenceTypes` enumerates the applicable periodicity for the schedule. + module RecurrenceType + # recurrence type not set + RECURRENCE_TYPE_UNSPECIFIED = 0 + + # The `BackupRule` is to be applied hourly. + HOURLY = 1 + + # The `BackupRule` is to be applied daily. + DAILY = 2 + + # The `BackupRule` is to be applied weekly. + WEEKLY = 3 + + # The `BackupRule` is to be applied monthly. + MONTHLY = 4 + + # The `BackupRule` is to be applied yearly. + YEARLY = 5 + end + end + + # `BackupWindow` defines a window of the day during which backup jobs will run. + # @!attribute [rw] start_hour_of_day + # @return [::Integer] + # 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. + # @!attribute [rw] end_hour_of_day + # @return [::Integer] + # 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. + class BackupWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `WeekDayOfMonth` defines the week day of the month on which the backups will + # run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values + # like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. + # @!attribute [rw] week_of_month + # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth::WeekOfMonth] + # Required. Specifies the week of the month. + # @!attribute [rw] day_of_week + # @return [::Google::Type::DayOfWeek] + # Required. Specifies the day of the week. + class WeekDayOfMonth + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, + # third, or last week of the month. + module WeekOfMonth + # The zero value. Do not use. + WEEK_OF_MONTH_UNSPECIFIED = 0 + + # The first week of the month. + FIRST = 1 + + # The second week of the month. + SECOND = 2 + + # The third week of the month. + THIRD = 3 + + # The fourth week of the month. + FOURTH = 4 + + # The last week of the month. + LAST = 5 + end + end + + # The request message for creating a `BackupPlan`. + # @!attribute [rw] parent + # @return [::String] + # 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**. + # @!attribute [rw] backup_plan_id + # @return [::String] + # 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}/. + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # Required. The `BackupPlan` resource object to create. + # @!attribute [rw] request_id + # @return [::String] + # 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). + class CreateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a list `BackupPlan`. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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 + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListBackupPlansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for getting a list of `BackupPlan`. + # @!attribute [rw] backup_plans + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlan>] + # 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 + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest#page_token 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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlansResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a `BackupPlan`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlan` to retrieve. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + class GetBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for deleting a `BackupPlan`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlan` to delete. + # + # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # @!attribute [rw] request_id + # @return [::String] + # 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). + class DeleteBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a backup plan. + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # Required. The resource being updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlan resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently, these fields are supported in update: description, schedules, + # retention period, adding and removing Backup Rules. + # @!attribute [rw] request_id + # @return [::String] + # 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). + class UpdateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in + # time. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + # @!attribute [r] revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision::State] + # Output only. Resource State + # @!attribute [rw] backup_plan_snapshot + # @return [::Google::Cloud::BackupDR::V1::BackupPlan] + # The Backup Plan being encompassed by this revision. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp that the revision was created. + class BackupPlanRevision + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the `BackupPlanRevision`. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + end + end + + # The request message for getting a `BackupPlanRevision`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the `BackupPlanRevision` to retrieve. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + class GetBackupPlanRevisionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for getting a list of `BackupPlanRevision`. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve + # `BackupPlanRevisions` information. Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. + # @!attribute [rw] page_size + # @return [::Integer] + # 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 + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. + class ListBackupPlanRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for getting a list of `BackupPlanRevision`. + # @!attribute [rw] backup_plan_revisions + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] + # The list of `BackupPlanRevisions` in the project for the specified + # location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of resources from all locations. In case any location is unreachable, + # the response will only return backup plans in reachable locations and + # the 'unreachable' field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest#page_token page_token} + # in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlanRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb new file mode 100644 index 000000000000..3b29f911fbf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb @@ -0,0 +1,381 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # A BackupPlanAssociation represents a single BackupPlanAssociation which + # contains details like workload, backup plan etc + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of BackupPlanAssociation in + # below format Format : + # projects/\\{project}/locations/\\{location}/backupPlanAssociations/\\{backupPlanAssociationId} + # @!attribute [rw] resource_type + # @return [::String] + # Required. Immutable. Resource type of workload on which backupplan is + # applied + # @!attribute [rw] resource + # @return [::String] + # Required. Immutable. Resource name of workload on which the backup plan is + # applied. + # + # The format can either be the resource name (e.g., + # "projects/my-project/zones/us-central1-a/instances/my-instance") or the + # full resource URI (e.g., + # "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). + # @!attribute [rw] backup_plan + # @return [::String] + # Required. Resource name of backup plan which needs to be applied on + # workload. Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation::State] + # Output only. The BackupPlanAssociation resource state. + # @!attribute [r] rules_config_info + # @return [::Array<::Google::Cloud::BackupDR::V1::RuleConfigInfo>] + # Output only. The config info related to backup rules. + # @!attribute [r] data_source + # @return [::String] + # 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} + # @!attribute [r] cloud_sql_instance_backup_plan_association_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupPlanAssociationProperties] + # Output only. Cloud SQL instance's backup plan association properties. + # @!attribute [r] backup_plan_revision_id + # @return [::String] + # Output only. The user friendly revision ID of the `BackupPlanRevision`. + # + # Example: v0, v1, v2, etc. + # @!attribute [r] backup_plan_revision_name + # @return [::String] + # Output only. The resource id of the `BackupPlanRevision`. + # + # Format: + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + class BackupPlanAssociation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for State of BackupPlan Association + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The resource is being created. + CREATING = 1 + + # The resource has been created and is fully usable. + ACTIVE = 2 + + # The resource is being deleted. + DELETING = 3 + + # The resource has been created but is not usable. + INACTIVE = 4 + + # The resource is being updated. + UPDATING = 5 + end + end + + # Message for rules config info. + # @!attribute [r] rule_id + # @return [::String] + # Output only. Backup Rule id fetched from backup plan. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::RuleConfigInfo::LastBackupState] + # Output only. The last backup state for rule. + # @!attribute [r] last_backup_error + # @return [::Google::Rpc::Status] + # Output only. google.rpc.Status object to store the last backup error. + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The point in time when the last successful backup was captured + # from the source. + class RuleConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for LastBackupState + module LastBackupState + # State not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0 + + # The first backup is pending. + FIRST_BACKUP_PENDING = 1 + + # The most recent backup could not be run/failed because of the lack of + # permissions. + PERMISSION_DENIED = 2 + + # The last backup operation succeeded. + SUCCEEDED = 3 + + # The last backup operation failed. + FAILED = 4 + end + end + + # Request message for creating a backup plan. + # @!attribute [rw] parent + # @return [::String] + # 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**. + # @!attribute [rw] backup_plan_association_id + # @return [::String] + # Required. The name of the backup plan association to create. The name must + # be unique for the specified project and location. + # @!attribute [rw] backup_plan_association + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # 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). + class CreateBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for List BackupPlanAssociation + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + class ListBackupPlanAssociationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for List BackupPlanAssociation + # @!attribute [rw] backup_plan_associations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # 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. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlanAssociationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchBackupPlanAssociationsForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of BackupPlanAssociations to return. The + # service may return fewer than this value. If unspecified, at most 50 + # BackupPlanAssociations will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupPlanAssociationsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupPlanAssociationsForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * resource + # * backup_plan + # * state + # * data_source + # * cloud_sql_instance_backup_plan_association_properties.instance_create_time + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + class FetchBackupPlanAssociationsForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchBackupPlanAssociationsForResourceType method. + # @!attribute [r] backup_plan_associations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] + # Output only. The BackupPlanAssociations from the specified parent. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. A token, which can be sent as `page_token` to retrieve the + # next page. If this field is omitted, there are no subsequent pages. + class FetchBackupPlanAssociationsForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a BackupPlanAssociation resource. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + class GetBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a backup plan association. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @!attribute [rw] request_id + # @return [::String] + # 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). + class DeleteBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a backup plan association. + # @!attribute [rw] backup_plan_association + # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] + # Required. The resource being updated + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # Field mask is used to specify the fields to be overwritten in the + # BackupPlanAssociation resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then the request will fail. + # Currently backup_plan_association.backup_plan is the only supported field. + # @!attribute [rw] request_id + # @return [::String] + # 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). + class UpdateBackupPlanAssociationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for triggering a backup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup plan association resource, in the format + # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + # @!attribute [rw] rule_id + # @return [::String] + # Required. backup rule_id for which a backup needs to be triggered. + # @!attribute [rw] request_id + # @return [::String] + # 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). + class TriggerBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb new file mode 100644 index 000000000000..829dd30b930f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb @@ -0,0 +1,1355 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Message describing a BackupVault object. + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the BackupVault instance (2048 characters or + # less). + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined: + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] backup_minimum_enforced_retention_duration + # @return [::Google::Protobuf::Duration] + # Required. The default and minimum enforced retention for each backup within + # the backup vault. The enforced retention for each backup can be extended. + # @!attribute [rw] backup_retention_inheritance + # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] + # Optional. Setting for how a backup's enforced retention end time is + # inherited. + # @!attribute [r] deletable + # @return [::Boolean] + # Output only. Set to true when there are no backups nested under this + # resource. + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag for the backup vault resource to + # prevent simultaneous updates from overwiting each other. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupVault::State] + # Output only. The BackupVault resource instance state. + # @!attribute [rw] effective_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Time after which the BackupVault resource is locked. + # @!attribute [r] backup_count + # @return [::Integer] + # Output only. The number of backups in this backup vault. + # @!attribute [r] service_account + # @return [::String] + # 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. + # @!attribute [r] total_stored_bytes + # @return [::Integer] + # Output only. Total size of the storage used by all backup resources. + # @!attribute [r] uid + # @return [::String] + # Output only. Immutable after resource creation until resource deletion. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User annotations. See https://google.aip.dev/128#annotations + # Stores small amounts of arbitrary data. + # @!attribute [rw] access_restriction + # @return [::Google::Cloud::BackupDR::V1::BackupVault::AccessRestriction] + # Optional. Note: This field is added for future use case and will not be + # supported in the current release. + # + # Access restriction for the backup vault. + # Default value is WITHIN_ORGANIZATION if not provided during creation. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::BackupDR::V1::BackupVault::EncryptionConfig] + # Optional. The encryption config of the backup vault. + class BackupVault + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message describing the EncryptionConfig of backup vault. + # This determines how data within the vault is encrypted at rest. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The Cloud KMS key name to encrypt backups in this backup vault. + # Must be in the same region as the vault. Some workload backups like + # compute disk backups may use their inherited source key instead. Format: + # projects/\\{project}/locations/\\{location}/keyRings/\\{ring}/cryptoKeys/\\{key} + class EncryptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How a backup's enforced retention end time is inherited. + module BackupRetentionInheritance + # Inheritance behavior not set. This will default to + # `INHERIT_VAULT_RETENTION`. + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0 + + # The enforced retention end time of a backup will be inherited from the + # backup vault's `backup_minimum_enforced_retention_duration` field. + # + # This is the default behavior. + INHERIT_VAULT_RETENTION = 1 + + # The enforced retention end time of a backup will always match the expire + # time of the backup. + # + # If this is set, the backup's enforced retention end time will be set to + # match the expire time during creation of the backup. When updating, the + # ERET and expire time must be updated together and have the same value. + # Invalid update requests will be rejected by the server. + MATCH_BACKUP_EXPIRE_TIME = 2 + end + + # Holds the state of the backup vault resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The backup vault is being created. + CREATING = 1 + + # The backup vault has been created and is fully usable. + ACTIVE = 2 + + # The backup vault is being deleted. + DELETING = 3 + + # The backup vault is experiencing an issue and might be unusable. + ERROR = 4 + + # The backup vault is being updated. + UPDATING = 5 + end + + # Holds the access restriction for the backup vault. + module AccessRestriction + # Access restriction not set. If user does not provide any value or pass + # this value, it will be changed to WITHIN_ORGANIZATION. + ACCESS_RESTRICTION_UNSPECIFIED = 0 + + # Access to or from resources outside your current project will be denied. + WITHIN_PROJECT = 1 + + # Access to or from resources outside your current organization will be + # denied. + WITHIN_ORGANIZATION = 2 + + # No access restriction. + UNRESTRICTED = 3 + + # Access to or from resources outside your current organization will be + # denied except for backup appliance. + WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4 + end + end + + # Message describing a DataSource object. + # Datasource object used to represent Datasource details for both admin and + # basic view. + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::DataSource::State] + # Output only. The DataSource resource instance state. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined: + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] backup_count + # @return [::Integer] + # Number of backups in the data source. + # @!attribute [rw] etag + # @return [::String] + # Server specified ETag for the ManagementServer resource to prevent + # simultaneous updates from overwiting each other. + # @!attribute [rw] total_stored_bytes + # @return [::Integer] + # The number of bytes (metadata and data) stored in this datasource. + # @!attribute [r] config_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] + # Output only. The backup configuration state. + # @!attribute [r] backup_config_info + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo] + # Output only. Details of how the resource is configured for backup. + # @!attribute [rw] data_source_gcp_resource + # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResource] + # 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. + # + # Note: The following fields are mutually exclusive: `data_source_gcp_resource`, `data_source_backup_appliance_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_source_backup_appliance_application + # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupApplianceApplication] + # The backed up resource is a backup appliance application. + # + # Note: The following fields are mutually exclusive: `data_source_backup_appliance_application`, `data_source_gcp_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_blocked_by_vault_access_restriction + # @return [::Boolean] + # Output only. This field is set to true if the backup is blocked by vault + # access restriction. + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds the state of the data source resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The data source is being created. + CREATING = 1 + + # The data source has been created and is fully usable. + ACTIVE = 2 + + # The data source is being deleted. + DELETING = 3 + + # The data source is experiencing an issue and might be unusable. + ERROR = 4 + end + end + + # BackupConfigInfo has information about how the resource is configured + # for Backup and about the most recent backup to this vault. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] + # Output only. The status of the last backup to this BackupVault + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. If the last backup were successful, this field has the + # consistency date. + # @!attribute [r] last_backup_error + # @return [::Google::Rpc::Status] + # Output only. If the last backup failed, this field has the error message. + # @!attribute [rw] gcp_backup_config + # @return [::Google::Cloud::BackupDR::V1::GcpBackupConfig] + # Configuration for a Google Cloud resource. + # + # Note: The following fields are mutually exclusive: `gcp_backup_config`, `backup_appliance_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_appliance_backup_config + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupConfig] + # Configuration for an application backed up by a Backup Appliance. + # + # Note: The following fields are mutually exclusive: `backup_appliance_backup_config`, `gcp_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # LastBackupstate tracks whether the last backup was not yet started, + # successful, failed, or could not be run because of the lack of permissions. + module LastBackupState + # Status not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0 + + # The first backup has not yet completed + FIRST_BACKUP_PENDING = 1 + + # The most recent backup was successful + SUCCEEDED = 2 + + # The most recent backup failed + FAILED = 3 + + # The most recent backup could not be run/failed because of the lack of + # permissions + PERMISSION_DENIED = 4 + end + end + + # GcpBackupConfig captures the Backup configuration details for Google Cloud + # resources. All Google Cloud resources regardless of type are protected with + # backup plan associations. + # @!attribute [rw] backup_plan + # @return [::String] + # The name of the backup plan. + # @!attribute [rw] backup_plan_description + # @return [::String] + # The description of the backup plan. + # @!attribute [rw] backup_plan_association + # @return [::String] + # The name of the backup plan association. + # @!attribute [rw] backup_plan_rules + # @return [::Array<::String>] + # The names of the backup plan rules which point to this backupvault + # @!attribute [rw] backup_plan_revision_name + # @return [::String] + # The name of the backup plan revision. + # @!attribute [rw] backup_plan_revision_id + # @return [::String] + # The user friendly id of the backup plan revision. + # E.g. v0, v1 etc. + class GcpBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceBackupConfig captures the backup configuration for + # applications that are protected by Backup Appliances. + # @!attribute [rw] backup_appliance_name + # @return [::String] + # The name of the backup appliance. + # @!attribute [rw] backup_appliance_id + # @return [::Integer] + # The ID of the backup appliance. + # @!attribute [rw] sla_id + # @return [::Integer] + # The ID of the SLA of this application. + # @!attribute [rw] application_name + # @return [::String] + # The name of the application. + # @!attribute [rw] host_name + # @return [::String] + # The name of the host where the application is running. + # @!attribute [rw] slt_name + # @return [::String] + # The name of the SLT associated with the application. + # @!attribute [rw] slp_name + # @return [::String] + # The name of the SLP associated with the application. + class BackupApplianceBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataSourceGcpResource is used for protected resources that are Google Cloud + # Resources. This name is easeier to understand than GcpResourceDataSource or + # GcpDataSourceResource + # @!attribute [r] gcp_resourcename + # @return [::String] + # Output only. Full resource pathname URL of the source Google Cloud + # resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # The type of the Google Cloud resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + # @!attribute [rw] compute_instance_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceDataSourceProperties] + # ComputeInstanceDataSourceProperties has a subset of Compute Instance + # properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cloud_sql_instance_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceProperties] + # Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud + # SQL Instance properties that are useful at the Datasource level. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_datasource_properties`, `compute_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_datasource_properties + # @return [::Google::Cloud::BackupDR::V1::DiskDataSourceProperties] + # DiskDataSourceProperties has a subset of Disk properties that are useful + # at the Datasource level. + # + # Note: The following fields are mutually exclusive: `disk_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataSourceGcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceApplication describes a Source Resource when it is an + # application backed up by a BackupAppliance. + # @!attribute [rw] application_name + # @return [::String] + # The name of the Application as known to the Backup Appliance. + # @!attribute [rw] backup_appliance + # @return [::String] + # Appliance name. + # @!attribute [rw] appliance_id + # @return [::Integer] + # Appliance Id of the Backup Appliance. + # @!attribute [rw] type + # @return [::String] + # The type of the application. e.g. VMBackup + # @!attribute [rw] application_id + # @return [::Integer] + # The appid field of the application within the Backup Appliance. + # @!attribute [rw] hostname + # @return [::String] + # Hostname of the host where the application is running. + # @!attribute [rw] host_id + # @return [::Integer] + # Hostid of the application host. + class DataSourceBackupApplianceApplication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ServiceLockInfo represents the details of a lock taken by the service on a + # Backup resource. + # @!attribute [r] operation + # @return [::String] + # Output only. The name of the operation that created this lock. + # The lock will automatically be released when the operation completes. + class ServiceLockInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupApplianceLockInfo contains metadata about the backupappliance that + # created the lock. + # @!attribute [rw] backup_appliance_id + # @return [::Integer] + # Required. The ID of the backup/recovery appliance that created this lock. + # @!attribute [rw] backup_appliance_name + # @return [::String] + # Required. The name of the backup/recovery appliance that created this lock. + # @!attribute [rw] lock_reason + # @return [::String] + # 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. + # @!attribute [rw] job_name + # @return [::String] + # The job name on the backup/recovery appliance that created this lock. + # + # Note: The following fields are mutually exclusive: `job_name`, `backup_image`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_image + # @return [::String] + # The image name that depends on this Backup. + # + # Note: The following fields are mutually exclusive: `backup_image`, `job_name`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sla_id + # @return [::Integer] + # The SLA on the backup/recovery appliance that owns the lock. + # + # Note: The following fields are mutually exclusive: `sla_id`, `job_name`, `backup_image`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupApplianceLockInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupLock represents a single lock on a Backup resource. An unexpired + # lock on a Backup prevents the Backup from being deleted. + # @!attribute [rw] lock_until_time + # @return [::Google::Protobuf::Timestamp] + # Required. The time after which this lock is not considered valid and will + # no longer protect the Backup from deletion. + # @!attribute [rw] backup_appliance_lock_info + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo] + # If the client is a backup and recovery appliance, this + # contains metadata about why the lock exists. + # + # Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] service_lock_info + # @return [::Google::Cloud::BackupDR::V1::ServiceLockInfo] + # Output only. Contains metadata about the lock exist for Google Cloud + # native backups. + # + # Note: The following fields are mutually exclusive: `service_lock_info`, `backup_appliance_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupLock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message describing a Backup object. + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the Backup instance (2048 characters or + # less). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user provided metadata. + # No labels currently defined. + # @!attribute [rw] enforced_retention_end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The backup can not be deleted before this time. + # @!attribute [r] backup_retention_inheritance + # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] + # Output only. Setting for how the enforced retention end time is inherited. + # This value is copied from this backup's BackupVault. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Optional. When this backup is automatically expired. + # @!attribute [r] consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The point in time when this backup was captured from the + # source. + # @!attribute [rw] etag + # @return [::String] + # Optional. Server specified ETag to prevent updates from overwriting each + # other. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::Backup::State] + # Output only. The Backup resource instance state. + # @!attribute [r] service_locks + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] + # Output only. The list of BackupLocks taken by the service to prevent the + # deletion of the backup. + # @!attribute [rw] backup_appliance_locks + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] + # Optional. The list of BackupLocks taken by the accessor Backup Appliance. + # @!attribute [r] compute_instance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties] + # Output only. Compute Engine specific backup properties. + # + # Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cloud_sql_instance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties] + # Output only. Cloud SQL specific backup properties. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_appliance_backup_properties + # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties] + # Output only. Backup Appliance specific backup properties. + # + # Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] disk_backup_properties + # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties] + # Output only. Disk specific backup properties. + # + # Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] backup_type + # @return [::Google::Cloud::BackupDR::V1::Backup::BackupType] + # Output only. Type of the backup, unspecified, scheduled or ondemand. + # @!attribute [r] gcp_backup_plan_info + # @return [::Google::Cloud::BackupDR::V1::Backup::GCPBackupPlanInfo] + # Output only. Configuration for a Google Cloud resource. + # @!attribute [r] resource_size_bytes + # @return [::Integer] + # Output only. source resource size in bytes at the time of the backup. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [r] gcp_resource + # @return [::Google::Cloud::BackupDR::V1::BackupGcpResource] + # Output only. Unique identifier of the GCP resource that is being backed + # up. + # @!attribute [r] kms_key_versions + # @return [::Array<::String>] + # Optional. Output only. The list of KMS key versions used to encrypt the + # backup. + class Backup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # GCPBackupPlanInfo captures the plan configuration details of Google Cloud + # resources at the time of backup. + # @!attribute [rw] backup_plan + # @return [::String] + # Resource name of backup plan by which workload is protected at the time + # of the backup. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} + # @!attribute [rw] backup_plan_rule_id + # @return [::String] + # The rule id of the backup plan which triggered this backup in case of + # scheduled backup or used for + # @!attribute [rw] backup_plan_revision_name + # @return [::String] + # Resource name of the backup plan revision which triggered this backup in + # case of scheduled backup or used for on demand backup. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId}/revisions/\\{revisionId} + # @!attribute [rw] backup_plan_revision_id + # @return [::String] + # The user friendly id of the backup plan revision which triggered this + # backup in case of scheduled backup or used for on demand backup. + class GCPBackupPlanInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds the state of the backup resource. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The backup is being created. + CREATING = 1 + + # The backup has been created and is fully usable. + ACTIVE = 2 + + # The backup is being deleted. + DELETING = 3 + + # The backup is experiencing an issue and might be unusable. + ERROR = 4 + + # The backup is being uploaded. + UPLOADING = 5 + end + + # Type of the backup, scheduled or ondemand. + module BackupType + # Backup type is unspecified. + BACKUP_TYPE_UNSPECIFIED = 0 + + # Scheduled backup. + SCHEDULED = 1 + + # On demand backup. + ON_DEMAND = 2 + + # Operational backup. + ON_DEMAND_OPERATIONAL = 3 + end + end + + # Message for creating a BackupVault. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] backup_vault_id + # @return [::String] + # 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 + # @!attribute [rw] backup_vault + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + class CreateBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing backupvault stores. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault. + class ListBackupVaultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing BackupVaults. + # @!attribute [rw] backup_vaults + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] + # 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. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupVaultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for fetching usable BackupVaults. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class FetchUsableBackupVaultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for fetching usable BackupVaults. + # @!attribute [rw] backup_vaults + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] + # 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. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class FetchUsableBackupVaultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchBackupsForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. Datasources are the parent resource for the backups. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sqladmin.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of Backups to return. The service may + # return fewer than this value. If unspecified, at most 50 + # Backups will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchBackupsForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchBackupsForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. This parameter is used to specify the view of the backup. + # If not specified, the default view is BASIC. + class FetchBackupsForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchBackupsForResourceType method. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] + # The Backups from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class FetchBackupsForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a BackupVault. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backupvault store resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # Vault + class GetBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a BackupVault. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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. + # @!attribute [rw] backup_vault + # @return [::Google::Cloud::BackupDR::V1::BackupVault] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # 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). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, will not check plan duration against backup vault + # enforcement duration. + # @!attribute [rw] force_update_access_restriction + # @return [::Boolean] + # Optional. If set to true, we will force update access restriction even if + # some non compliant data sources are present. The default is 'false'. + class UpdateBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a BackupVault. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # @!attribute [rw] request_id + # @return [::String] + # 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). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any data source from this backup vault will also + # be deleted. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is 'false'. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If true and the BackupVault is not found, the request will + # succeed but no action will be taken. + # @!attribute [rw] ignore_backup_plan_references + # @return [::Boolean] + # Optional. If set to true, backupvault deletion will proceed even if there + # are backup plans referencing the backupvault. The default is 'false'. + class DeleteBackupVaultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing DataSources. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing DataSources. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSource>] + # 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. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a DataSource instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' + class GetDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a data source instance. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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. + # @!attribute [rw] data_source + # @return [::Google::Cloud::BackupDR::V1::DataSource] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # 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). + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. Enable upsert. + class UpdateDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing Backups. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + class ListBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing Backups. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] + # 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. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a Backup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the data source resource name, in the format + # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' + # @!attribute [rw] view + # @return [::Google::Cloud::BackupDR::V1::BackupView] + # Optional. Reserved for future use to provide a BASIC & FULL view of Backup + # resource. + class GetBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a Backup. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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. + # @!attribute [rw] backup + # @return [::Google::Cloud::BackupDR::V1::Backup] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # 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). + class UpdateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a Backup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # @!attribute [rw] request_id + # @return [::String] + # 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). + class DeleteBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for restoring from a Backup. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Backup instance, in the format + # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + # @!attribute [rw] request_id + # @return [::String] + # 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). + # @!attribute [rw] compute_instance_target_environment + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment] + # Compute Engine target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_target_environment + # @return [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment] + # Disk target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] region_disk_target_environment + # @return [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment] + # Region disk target environment to be used during restore. + # + # Note: The following fields are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] compute_instance_restore_properties + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties] + # Compute Engine instance properties to be overridden during restore. + # + # Note: The following fields are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disk_restore_properties + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties] + # Disk properties to be overridden during restore. + # + # Note: The following fields are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] clear_overrides_field_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. A field mask used to clear server-side default values + # for fields within the `instance_properties` oneof. + # + # When a field in this mask is cleared, the server will not apply its + # default logic (like inheriting a value from the source) for that field. + # + # The most common current use case is clearing default encryption keys. + # + # Examples of field mask paths: + # - Compute Instance Disks: + # `compute_instance_restore_properties.disks.*.disk_encryption_key` + # - Single Disk: `disk_restore_properties.disk_encryption_key` + class RestoreBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for restoring from a Backup. + # @!attribute [rw] target_resource + # @return [::Google::Cloud::BackupDR::V1::TargetResource] + # Details of the target resource created/modified as part of restore. + class RestoreBackupResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of the target resource created/modified as part of restore. + # @!attribute [rw] gcp_resource + # @return [::Google::Cloud::BackupDR::V1::GcpResource] + # Details of the native Google Cloud resource created as part of restore. + class TargetResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Minimum details to identify a Google Cloud resource + # @!attribute [rw] gcp_resourcename + # @return [::String] + # Name of the Google Cloud resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # Type of the resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + class GcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Minimum details to identify a Google Cloud resource for a backup. + # @!attribute [rw] gcp_resourcename + # @return [::String] + # Name of the Google Cloud resource. + # @!attribute [rw] location + # @return [::String] + # Location of the resource: //"global"/"unspecified". + # @!attribute [rw] type + # @return [::String] + # Type of the resource. Use the Unified Resource Type, + # eg. compute.googleapis.com/Instance. + class BackupGcpResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Backup configuration state. Is the resource configured for backup? + module BackupConfigState + # The possible states of backup configuration. + # Status not set. + BACKUP_CONFIG_STATE_UNSPECIFIED = 0 + + # The data source is actively protected (i.e. there is a + # BackupPlanAssociation or Appliance SLA pointing to it) + ACTIVE = 1 + + # The data source is no longer protected (but may have backups under it) + PASSIVE = 2 + end + + # BackupView contains enum options for Partial and Full view. + module BackupView + # If the value is not set, the default 'FULL' view is used. + BACKUP_VIEW_UNSPECIFIED = 0 + + # Includes basic data about the Backup, but not the full contents. + BACKUP_VIEW_BASIC = 1 + + # Includes all data about the Backup. + # This is the default value (for both ListBackups and GetBackup). + BACKUP_VIEW_FULL = 2 + end + + # BackupVaultView contains enum options for Partial and Full view. + module BackupVaultView + # If the value is not set, the default 'FULL' view is used. + BACKUP_VAULT_VIEW_UNSPECIFIED = 0 + + # Includes basic data about the Backup Vault, but not the full contents. + BACKUP_VAULT_VIEW_BASIC = 1 + + # Includes all data about the Backup Vault. + # This is the default value (for both ListBackupVaults and GetBackupVault). + BACKUP_VAULT_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb new file mode 100644 index 000000000000..787b36f74c08 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # BackupApplianceBackupProperties represents BackupDR backup appliance's + # properties. + # @!attribute [r] generation_id + # @return [::Integer] + # Output only. The numeric generation ID of the backup (monotonically + # increasing). + # @!attribute [r] finalize_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when this backup object was finalized (if none, + # backup is not finalized). + # @!attribute [rw] recovery_range_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The earliest timestamp of data available in this Backup. + # @!attribute [rw] recovery_range_end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The latest timestamp of data available in this Backup. + class BackupApplianceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb new file mode 100644 index 000000000000..c11daec87a93 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # CloudSqlInstanceDataSourceProperties represents the properties of a + # Cloud SQL resource that are stored in the DataSource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the Cloud SQL instance backed up by the datasource. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceBackupProperties represents Cloud SQL Instance + # Backup properties. + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance + # when the backup was taken. + # @!attribute [r] final_backup + # @return [::Boolean] + # Output only. Whether the backup is a final backup. + # @!attribute [r] source_instance + # @return [::String] + # Output only. The source instance of the backup. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + # @!attribute [r] instance_delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance delete timestamp. + class CloudSqlInstanceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceDataSourceReferenceProperties represents the properties of a + # Cloud SQL resource that are stored in the DataSourceReference. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the Cloud SQL instance backed up by the datasource. + # Format: + # projects/\\{project}/instances/\\{instance} + # @!attribute [r] database_installed_version + # @return [::String] + # Output only. The installed database version of the Cloud SQL instance. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The instance creation timestamp. + # @!attribute [r] instance_tier + # @return [::String] + # Output only. The tier (or machine type) for this instance. Example: + # `db-custom-1-3840` + class CloudSqlInstanceDataSourceReferenceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CloudSqlInstanceInitializationConfig contains the configuration for + # initializing a Cloud SQL instance. + # @!attribute [rw] edition + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig::Edition] + # Required. The edition of the Cloud SQL instance. + class CloudSqlInstanceInitializationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The edition of the Cloud SQL instance. For details, see + # https://cloud.google.com/sql/docs/editions-intro. + module Edition + # Unspecified edition. + EDITION_UNSPECIFIED = 0 + + # Enterprise edition. + ENTERPRISE = 1 + + # Enterprise Plus edition. + ENTERPRISE_PLUS = 2 + end + end + + # Cloud SQL instance's BPA properties. + # @!attribute [r] instance_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + class CloudSqlInstanceBackupPlanAssociationProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb new file mode 100644 index 000000000000..d5590a9a587f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb @@ -0,0 +1,241 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # DiskTargetEnvironment represents the target environment for the disk. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the disk. + # @!attribute [rw] zone + # @return [::String] + # Required. Target zone for the disk. + class DiskTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RegionDiskTargetEnvironment represents the target environment for the disk. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the disk. + # @!attribute [rw] region + # @return [::String] + # Required. Target region for the disk. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Required. Target URLs of the replica zones for the disk. + class RegionDiskTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DiskRestoreProperties represents the properties of a Disk restore. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the disk. + # @!attribute [rw] description + # @return [::String] + # Optional. An optional description of this resource. Provide this property + # when you create the resource. + # @!attribute [rw] size_gb + # @return [::Integer] + # Required. The size of the disk in GB. + # @!attribute [rw] licenses + # @return [::Array<::String>] + # Optional. A list of publicly available licenses that are applicable to this + # backup. This is applicable if the original image had licenses attached, + # e.g. Windows image + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # Optional. A list of features to enable in the guest operating system. This + # is applicable only for bootable images. + # @!attribute [rw] disk_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts the disk using a + # customer-supplied encryption key or a customer-managed encryption key. + # @!attribute [rw] physical_block_size_bytes + # @return [::Integer] + # Optional. Physical block size of the persistent disk, in bytes. + # If not present in a request, a default value is used. + # Currently, the supported size is 4096. + # @!attribute [rw] provisioned_iops + # @return [::Integer] + # Optional. Indicates how many IOPS to provision for the disk. This sets the + # number of I/O operations per second that the disk can handle. + # @!attribute [rw] provisioned_throughput + # @return [::Integer] + # Optional. Indicates how much throughput to provision for the disk. This + # sets the number of throughput MB per second that the disk can handle. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Indicates whether this disk is using confidential compute mode. + # Encryption with a Cloud KMS key is required to enable this option. + # @!attribute [rw] storage_pool + # @return [::String] + # Optional. The storage pool in which the new disk is created. You can + # provide this as a partial or full URL to the resource. + # @!attribute [rw] access_mode + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::AccessMode] + # Optional. The access mode of the disk. + # @!attribute [rw] architecture + # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::Architecture] + # Optional. The architecture of the source disk. Valid values are + # ARM64 or X86_64. + # @!attribute [rw] resource_policy + # @return [::Array<::String>] + # Optional. Resource policies applied to this disk. + # @!attribute [rw] type + # @return [::String] + # Required. URL of the disk type resource describing which disk type to use + # to create the disk. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to apply to this disk. These can be modified later using + # setLabels method. Label values can be empty. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to the disk. + class DiskRestoreProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The supported access modes of the disk. + module AccessMode + # The default AccessMode, means the disk can be attached to single instance + # in RW mode. + READ_WRITE_SINGLE = 0 + + # The AccessMode means the disk can be attached to multiple instances in RW + # mode. + READ_WRITE_MANY = 1 + + # The AccessMode means the disk can be attached to multiple instances in RO + # mode. + READ_ONLY_MANY = 2 + end + + # Architecture of the source disk. + module Architecture + # Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0 + + # Disks with architecture X86_64 + X86_64 = 1 + + # Disks with architecture ARM64 + ARM64 = 2 + end + end + + # DiskBackupProperties represents the properties of a Disk backup. + # @!attribute [rw] description + # @return [::String] + # A description of the source disk. + # @!attribute [rw] licenses + # @return [::Array<::String>] + # A list of publicly available licenses that are applicable to this backup. + # This is applicable if the original image had licenses attached, e.g. + # Windows image. + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # A list of guest OS features that are applicable to this backup. + # @!attribute [rw] architecture + # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties::Architecture] + # The architecture of the source disk. Valid values are + # ARM64 or X86_64. + # @!attribute [rw] type + # @return [::String] + # The URL of the type of the disk. + # @!attribute [rw] size_gb + # @return [::Integer] + # Size(in GB) of the source disk. + # @!attribute [rw] region + # @return [::String] + # Region and zone are mutually exclusive fields. + # The URL of the region of the source disk. + # @!attribute [rw] zone + # @return [::String] + # The URL of the Zone where the source disk. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # The URL of the Zones where the source disk should be replicated. + # @!attribute [rw] source_disk + # @return [::String] + # The source disk used to create this backup. + class DiskBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Architecture of the source disk. + module Architecture + # Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0 + + # Disks with architecture X86_64 + X86_64 = 1 + + # Disks with architecture ARM64 + ARM64 = 2 + end + end + + # DiskDataSourceProperties represents the properties of a + # Disk resource that are stored in the DataSource. + # . + # @!attribute [rw] name + # @return [::String] + # Name of the disk backed up by the datasource. + # @!attribute [rw] description + # @return [::String] + # The description of the disk. + # @!attribute [rw] type + # @return [::String] + # The type of the disk. + # @!attribute [rw] size_gb + # @return [::Integer] + # The size of the disk in GB. + class DiskDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb new file mode 100644 index 000000000000..bc9fe21300c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb @@ -0,0 +1,1001 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # ComputeInstanceBackupProperties represents Compute Engine instance backup + # properties. + # @!attribute [rw] description + # @return [::String] + # An optional text description for the instances that are created from these + # properties. + # @!attribute [rw] tags + # @return [::Google::Cloud::BackupDR::V1::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). + # @!attribute [rw] machine_type + # @return [::String] + # The machine type to use for instances that are created from these + # properties. + # @!attribute [rw] can_ip_forward + # @return [::Boolean] + # 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. + # @!attribute [rw] network_interface + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] + # An array of network access configurations for this interface. + # @!attribute [rw] disk + # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] + # An array of disks that are associated with the instances that are created + # from these properties. + # @!attribute [rw] metadata + # @return [::Google::Cloud::BackupDR::V1::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. + # @!attribute [rw] service_account + # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] + # A list of service accounts with specified scopes. Access tokens for these + # service accounts are available to the instances that are created from + # these properties. Use metadata queries to obtain the access tokens for + # these instances. + # @!attribute [rw] scheduling + # @return [::Google::Cloud::BackupDR::V1::Scheduling] + # Specifies the scheduling options for the instances that are created from + # these properties. + # @!attribute [rw] guest_accelerator + # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] + # A list of guest accelerator cards' type and count to use for instances + # created from these properties. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # 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. + # @!attribute [rw] key_revocation_action_type + # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] + # KeyRevocationActionType of the instance. Supported options are "STOP" and + # "NONE". The default value is "NONE" if it is not specified. + # @!attribute [rw] source_instance + # @return [::String] + # 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 + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels to apply to instances that are created from these properties. + class ComputeInstanceBackupProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # ComputeInstanceRestoreProperties represents Compute Engine instance + # properties to be overridden during restore. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the compute instance. + # @!attribute [rw] advanced_machine_features + # @return [::Google::Cloud::BackupDR::V1::AdvancedMachineFeatures] + # Optional. Controls for advanced machine-related behavior features. + # @!attribute [rw] can_ip_forward + # @return [::Boolean] + # Optional. Allows this instance to send and receive packets with + # non-matching destination or source IPs. + # @!attribute [rw] confidential_instance_config + # @return [::Google::Cloud::BackupDR::V1::ConfidentialInstanceConfig] + # Optional. Controls Confidential compute options on the instance + # @!attribute [rw] deletion_protection + # @return [::Boolean] + # Optional. Whether the resource should be protected against deletion. + # @!attribute [rw] description + # @return [::String] + # Optional. An optional description of this resource. Provide this property + # when you create the resource. + # @!attribute [rw] disks + # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] + # Optional. Array of disks associated with this instance. Persistent disks + # must be created before you can assign them. Source regional persistent + # disks will be restored with default replica zones if not specified. + # @!attribute [rw] display_device + # @return [::Google::Cloud::BackupDR::V1::DisplayDevice] + # Optional. Enables display device for the instance. + # @!attribute [rw] guest_accelerators + # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] + # Optional. A list of the type and count of accelerator cards attached to the + # instance. + # @!attribute [rw] hostname + # @return [::String] + # 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. + # @!attribute [rw] instance_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts suspended data for an instance with a + # customer-managed encryption key. + # @!attribute [rw] key_revocation_action_type + # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] + # Optional. KeyRevocationActionType of the instance. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to apply to this instance. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. Full or partial URL of the machine type resource to use for this + # instance. + # @!attribute [rw] metadata + # @return [::Google::Cloud::BackupDR::V1::Metadata] + # Optional. This includes custom metadata and predefined keys. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # Optional. Minimum CPU platform to use for this instance. + # @!attribute [rw] network_interfaces + # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] + # Optional. An array of network configurations for this instance. These + # specify how interfaces are configured to interact with other network + # services, such as connecting to the internet. Multiple interfaces are + # supported per instance. Required to restore in different project or region. + # @!attribute [rw] network_performance_config + # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig] + # Optional. Configure network performance such as egress bandwidth tier. + # @!attribute [rw] params + # @return [::Google::Cloud::BackupDR::V1::InstanceParams] + # Input only. Additional params passed with the request, but not persisted + # as part of resource payload. + # @!attribute [rw] private_ipv6_google_access + # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess] + # Optional. The private IPv6 google access type for the VM. + # If not specified, use INHERIT_FROM_SUBNETWORK as default. + # @!attribute [rw] allocation_affinity + # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity] + # Optional. Specifies the reservations that this instance can consume from. + # @!attribute [rw] resource_policies + # @return [::Array<::String>] + # Optional. Resource policies applied to this instance. + # By default, no resource policies will be applied. + # @!attribute [rw] scheduling + # @return [::Google::Cloud::BackupDR::V1::Scheduling] + # Optional. Sets the scheduling options for this instance. + # @!attribute [rw] service_accounts + # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] + # Optional. A list of service accounts, with their specified scopes, + # authorized for this instance. Only one service account per VM instance is + # supported. + # @!attribute [rw] tags + # @return [::Google::Cloud::BackupDR::V1::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. + class ComputeInstanceRestoreProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The private IPv6 google access type for the VMs. + module InstancePrivateIpv6GoogleAccess + # Default value. This value is unused. + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0 + + # Each network interface inherits PrivateIpv6GoogleAccess from its + # subnetwork. + INHERIT_FROM_SUBNETWORK = 1 + + # Outbound private IPv6 access from VMs in this subnet to Google services. + # If specified, the subnetwork who is attached to the instance's default + # network interface will be assigned an internal IPv6 prefix if it doesn't + # have before. + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2 + + # Bidirectional private IPv6 access to/from Google services. If + # specified, the subnetwork who is attached to the instance's default + # network interface will be assigned an internal IPv6 prefix if it doesn't + # have before. + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + end + end + + # ComputeInstanceTargetEnvironment represents Compute Engine target + # environment to be used during restore. + # @!attribute [rw] project + # @return [::String] + # Required. Target project for the Compute Engine instance. + # @!attribute [rw] zone + # @return [::String] + # Required. The zone of the Compute Engine instance. + class ComputeInstanceTargetEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ComputeInstanceDataSourceProperties represents the properties of a + # ComputeEngine resource that are stored in the DataSource. + # @!attribute [rw] name + # @return [::String] + # Name of the compute instance backed up by the datasource. + # @!attribute [rw] description + # @return [::String] + # The description of the Compute Engine instance. + # @!attribute [rw] machine_type + # @return [::String] + # The machine type of the instance. + # @!attribute [rw] total_disk_count + # @return [::Integer] + # The total number of disks attached to the Instance. + # @!attribute [rw] total_disk_size_gb + # @return [::Integer] + # The sum of all the disk sizes. + class ComputeInstanceDataSourceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies options for controlling advanced machine features. + # @!attribute [rw] enable_nested_virtualization + # @return [::Boolean] + # Optional. Whether to enable nested virtualization or not (default is + # false). + # @!attribute [rw] threads_per_core + # @return [::Integer] + # 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. + # @!attribute [rw] visible_core_count + # @return [::Integer] + # 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. + # @!attribute [rw] enable_uefi_networking + # @return [::Boolean] + # Optional. Whether to enable UEFI networking for instance creation. + class AdvancedMachineFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of Confidential Instance options. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Defines whether the instance should have confidential compute + # enabled. + class ConfidentialInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of Display Device options + # @!attribute [rw] enable_display + # @return [::Boolean] + # Optional. Enables display for the Compute Engine VM + class DisplayDevice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A specification of the type and number of accelerator cards attached to the + # instance. + # @!attribute [rw] accelerator_type + # @return [::String] + # Optional. Full or partial URL of the accelerator type resource to attach to + # this instance. + # @!attribute [rw] accelerator_count + # @return [::Integer] + # Optional. The number of the guest accelerator cards exposed to this + # instance. + class AcceleratorConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A customer-supplied encryption key. + # @!attribute [rw] raw_key + # @return [::String] + # Optional. Specifies a 256-bit customer-supplied + # encryption key. + # + # Note: The following fields are mutually exclusive: `raw_key`, `rsa_encrypted_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] rsa_encrypted_key + # @return [::String] + # Optional. RSA-wrapped 2048-bit + # customer-supplied encryption key to either encrypt or decrypt this + # resource. + # + # Note: The following fields are mutually exclusive: `rsa_encrypted_key`, `raw_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The name of the encryption key that is stored in Google Cloud + # KMS. + # + # Note: The following fields are mutually exclusive: `kms_key_name`, `raw_key`, `rsa_encrypted_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kms_key_service_account + # @return [::String] + # 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. + class CustomerEncryptionKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A key/value pair to be used for storing metadata. + # @!attribute [rw] key + # @return [::String] + # Optional. Key for the metadata entry. + # @!attribute [rw] value + # @return [::String] + # 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). + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A metadata key/value entry. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::BackupDR::V1::Entry>] + # Optional. Array of key/value pairs. The total size of all keys and values + # must be less than 512 KB. + class Metadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A network interface resource attached to an instance. + # s + # @!attribute [rw] network + # @return [::String] + # Optional. URL of the VPC network resource for this instance. + # @!attribute [rw] subnetwork + # @return [::String] + # Optional. The URL of the Subnetwork resource for this instance. + # @!attribute [rw] ip_address + # @return [::String] + # 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. + # @!attribute [rw] ipv6_address + # @return [::String] + # 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. + # @!attribute [rw] internal_ipv6_prefix_length + # @return [::Integer] + # Optional. The prefix length of the primary internal IPv6 range. + # @!attribute [r] name + # @return [::String] + # Output only. [Output Only] The name of the network interface, which is + # generated by the server. + # @!attribute [rw] access_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] + # 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. + # @!attribute [rw] ipv6_access_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] + # 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. + # @!attribute [rw] alias_ip_ranges + # @return [::Array<::Google::Cloud::BackupDR::V1::AliasIpRange>] + # Optional. An array of alias IP ranges for this network interface. + # You can only specify this field for network interfaces in VPC networks. + # @!attribute [rw] stack_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::StackType] + # The stack type for this network interface. + # @!attribute [rw] ipv6_access_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::Ipv6AccessType] + # Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the + # IP can be accessed from the Internet. This field is always inherited from + # its subnetwork. + # @!attribute [rw] queue_count + # @return [::Integer] + # 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. + # @!attribute [rw] nic_type + # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::NicType] + # Optional. The type of vNIC to be used on this interface. This may be gVNIC + # or VirtioNet. + # @!attribute [rw] network_attachment + # @return [::String] + # 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}. + class NetworkInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stack type for this network interface. + module StackType + # Default should be STACK_TYPE_UNSPECIFIED. + STACK_TYPE_UNSPECIFIED = 0 + + # The network interface will be assigned IPv4 address. + IPV4_ONLY = 1 + + # The network interface can have both IPv4 and IPv6 addresses. + IPV4_IPV6 = 2 + end + + # IPv6 access type for this network interface. + module Ipv6AccessType + # IPv6 access type not set. Means this network interface hasn't been + # turned on IPv6 yet. + UNSPECIFIED_IPV6_ACCESS_TYPE = 0 + + # This network interface can have internal IPv6. + INTERNAL = 1 + + # This network interface can have external IPv6. + EXTERNAL = 2 + end + + # Nic type for this network interface. + module NicType + # Default should be NIC_TYPE_UNSPECIFIED. + NIC_TYPE_UNSPECIFIED = 0 + + # VIRTIO + VIRTIO_NET = 1 + + # GVNIC + GVNIC = 2 + end + end + + # Network performance configuration. + # @!attribute [rw] total_egress_bandwidth_tier + # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig::Tier] + # Optional. The tier of the total egress bandwidth. + class NetworkPerformanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Network performance tier. + module Tier + # This value is unused. + TIER_UNSPECIFIED = 0 + + # Default network performance config. + DEFAULT = 1 + + # Tier 1 network performance config. + TIER_1 = 2 + end + end + + # An access configuration attached to an instance's network interface. + # Only one access config per instance is supported. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::AccessConfig::AccessType] + # Optional. In accessConfigs (IPv4), the + # default and only option is ONE_TO_ONE_NAT. In + # ipv6AccessConfigs, the default and only option is + # DIRECT_IPV6. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of this access configuration. + # @!attribute [rw] external_ip + # @return [::String] + # Optional. The external IP address of this access configuration. + # @!attribute [rw] external_ipv6 + # @return [::String] + # Optional. The external IPv6 address of this access configuration. + # @!attribute [rw] external_ipv6_prefix_length + # @return [::Integer] + # Optional. The prefix length of the external IPv6 range. + # @!attribute [rw] set_public_ptr + # @return [::Boolean] + # 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. + # @!attribute [rw] public_ptr_domain_name + # @return [::String] + # Optional. The DNS domain name for the public PTR record. + # @!attribute [rw] network_tier + # @return [::Google::Cloud::BackupDR::V1::AccessConfig::NetworkTier] + # Optional. This signifies the networking tier used for configuring this + # access + class AccessConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of configuration. + module AccessType + # Default value. This value is unused. + ACCESS_TYPE_UNSPECIFIED = 0 + + # ONE_TO_ONE_NAT + ONE_TO_ONE_NAT = 1 + + # Direct IPv6 access. + DIRECT_IPV6 = 2 + end + + # Network tier property used by addresses, instances and forwarding rules. + module NetworkTier + # Default value. This value is unused. + NETWORK_TIER_UNSPECIFIED = 0 + + # High quality, Google-grade network tier, support for all networking + # products. + PREMIUM = 1 + + # Public internet quality, only limited support for other networking + # products. + STANDARD = 2 + end + end + + # An alias IP range attached to an instance's network interface. + # @!attribute [rw] ip_cidr_range + # @return [::String] + # Optional. The IP alias ranges to allocate for this interface. + # @!attribute [rw] subnetwork_range_name + # @return [::String] + # 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. + class AliasIpRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional instance params. + # @!attribute [rw] resource_manager_tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource manager tags to be bound to the instance. + class InstanceParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceManagerTagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Specifies the reservations that this instance can consume from. + # @!attribute [rw] consume_allocation_type + # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity::Type] + # Optional. Specifies the type of reservation from which this instance can + # consume + # @!attribute [rw] key + # @return [::String] + # Optional. Corresponds to the label key of a reservation resource. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Corresponds to the label values of a reservation resource. + class AllocationAffinity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates whether to consume from a reservation or not. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # Do not consume from any allocated capacity. + NO_RESERVATION = 1 + + # Consume any allocation available. + ANY_RESERVATION = 2 + + # Must consume from a specific reservation. Must specify key value fields + # for specifying the reservations. + SPECIFIC_RESERVATION = 3 + end + end + + # Sets the scheduling options for an Instance. + # @!attribute [rw] on_host_maintenance + # @return [::Google::Cloud::BackupDR::V1::Scheduling::OnHostMaintenance] + # Optional. Defines the maintenance behavior for this instance. + # @!attribute [rw] automatic_restart + # @return [::Boolean] + # Optional. Specifies whether the instance should be automatically restarted + # if it is terminated by Compute Engine (not terminated by a user). + # @!attribute [rw] preemptible + # @return [::Boolean] + # Optional. Defines whether the instance is preemptible. + # @!attribute [rw] node_affinities + # @return [::Array<::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity>] + # Optional. A set of node affinity and anti-affinity configurations. + # Overrides reservationAffinity. + # @!attribute [rw] min_node_cpus + # @return [::Integer] + # Optional. The minimum number of virtual CPUs this instance will consume + # when running on a sole-tenant node. + # @!attribute [rw] provisioning_model + # @return [::Google::Cloud::BackupDR::V1::Scheduling::ProvisioningModel] + # Optional. Specifies the provisioning model of the instance. + # @!attribute [rw] instance_termination_action + # @return [::Google::Cloud::BackupDR::V1::Scheduling::InstanceTerminationAction] + # Optional. Specifies the termination action for the instance. + # @!attribute [rw] local_ssd_recovery_timeout + # @return [::Google::Cloud::BackupDR::V1::SchedulingDuration] + # 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. + class Scheduling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Node Affinity: the configuration of desired nodes onto which this Instance + # could be scheduled. + # @!attribute [rw] key + # @return [::String] + # Optional. Corresponds to the label key of Node resource. + # @!attribute [rw] operator + # @return [::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity::Operator] + # Optional. Defines the operation of node selection. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Corresponds to the label values of Node resource. + class NodeAffinity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the type of node selections. + module Operator + # Default value. This value is unused. + OPERATOR_UNSPECIFIED = 0 + + # Requires Compute Engine to seek for matched nodes. + IN = 1 + + # Requires Compute Engine to avoid certain nodes. + NOT_IN = 2 + end + end + + # Defines the maintenance behavior for this instance= + module OnHostMaintenance + # Default value. This value is unused. + ON_HOST_MAINTENANCE_UNSPECIFIED = 0 + + # Tells Compute Engine to terminate and (optionally) restart the instance + # away from the maintenance activity. + TERMINATE = 1 + + # Default, Allows Compute Engine to automatically migrate instances + # out of the way of maintenance events. + MIGRATE = 1000 + end + + # Defines the provisioning model for an instance. + module ProvisioningModel + # Default value. This value is not used. + PROVISIONING_MODEL_UNSPECIFIED = 0 + + # Standard provisioning with user controlled runtime, no discounts. + STANDARD = 1 + + # Heavily discounted, no guaranteed runtime. + SPOT = 2 + end + + # Defines the supported termination actions for an instance. + module InstanceTerminationAction + # Default value. This value is unused. + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0 + + # Delete the VM. + DELETE = 1 + + # Stop the VM without storing in-memory content. default action. + STOP = 2 + end + end + + # A SchedulingDuration represents a fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". Range is approximately 10,000 years. + # @!attribute [rw] seconds + # @return [::Integer] + # Optional. Span of time at a resolution of a second. + # @!attribute [rw] nanos + # @return [::Integer] + # Optional. Span of time that's a fraction of a second at nanosecond + # resolution. + class SchedulingDuration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A service account. + # @!attribute [rw] email + # @return [::String] + # Optional. Email address of the service account. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Optional. The list of scopes to be made available for this service account. + class ServiceAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of instance tags. + # @!attribute [rw] items + # @return [::Array<::String>] + # Optional. An array of tags. Each tag must be 1-63 characters long, and + # comply with RFC1035. + class Tags + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An instance-attached disk resource. + # @!attribute [rw] initialize_params + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::InitializeParams] + # Optional. Specifies the parameters to initialize this disk. + # @!attribute [rw] device_name + # @return [::String] + # 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) + # @!attribute [rw] kind + # @return [::String] + # Optional. Type of the resource. + # @!attribute [rw] disk_type_deprecated + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] + # Specifies the type of the disk. + # @!attribute [rw] mode + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskMode] + # Optional. The mode in which to attach this disk. + # @!attribute [rw] source + # @return [::String] + # Optional. Specifies a valid partial or full URL to an existing Persistent + # Disk resource. + # @!attribute [rw] index + # @return [::Integer] + # Optional. A zero-based index to this disk, where 0 is reserved for the + # boot disk. + # @!attribute [rw] boot + # @return [::Boolean] + # Optional. Indicates that this is a boot disk. The virtual machine will use + # the first partition of the disk for its root filesystem. + # @!attribute [rw] auto_delete + # @return [::Boolean] + # Optional. Specifies whether the disk will be auto-deleted when the instance + # is deleted (but not when the disk is detached from the instance). + # @!attribute [rw] license + # @return [::Array<::String>] + # Optional. Any valid publicly visible licenses. + # @!attribute [rw] disk_interface + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskInterface] + # Optional. Specifies the disk interface to use for attaching this disk. + # @!attribute [rw] guest_os_feature + # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] + # Optional. A list of features to enable on the guest operating system. + # Applicable only for bootable images. + # @!attribute [rw] disk_encryption_key + # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] + # Optional. Encrypts or decrypts a disk using a customer-supplied + # encryption key. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Optional. The size of the disk in GB. + # @!attribute [r] saved_state + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskSavedState] + # Optional. Output only. The state of the disk. + # @!attribute [r] disk_type + # @return [::String] + # Optional. Output only. The URI of the disk type resource. For example: + # projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] + # Optional. Specifies the type of the disk. + class AttachedDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the parameters to initialize this disk. + # @!attribute [rw] disk_name + # @return [::String] + # Optional. Specifies the disk name. If not specified, the default is to + # use the name of the instance. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Optional. URL of the zone where the disk should be created. + # Required for each regional disk associated with the instance. + class InitializeParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of the Disk Types. + module DiskType + # Default value, which is unused. + DISK_TYPE_UNSPECIFIED = 0 + + # A scratch disk type. + SCRATCH = 1 + + # A persistent disk type. + PERSISTENT = 2 + end + + # List of the Disk Modes. + module DiskMode + # Default value, which is unused. + DISK_MODE_UNSPECIFIED = 0 + + # Attaches this disk in read-write mode. Only one + # virtual machine at a time can be attached to a disk in read-write mode. + READ_WRITE = 1 + + # Attaches this disk in read-only mode. Multiple virtual machines can use + # a disk in read-only mode at a time. + READ_ONLY = 2 + + # The disk is locked for administrative reasons. Nobody else + # can use the disk. This mode is used (for example) when taking + # a snapshot of a disk to prevent mounting the disk while it is + # being snapshotted. + LOCKED = 3 + end + + # List of the Disk Interfaces. + module DiskInterface + # Default value, which is unused. + DISK_INTERFACE_UNSPECIFIED = 0 + + # SCSI Disk Interface. + SCSI = 1 + + # NVME Disk Interface. + NVME = 2 + + # NVDIMM Disk Interface. + NVDIMM = 3 + + # ISCSI Disk Interface. + ISCSI = 4 + end + + # List of the states of the Disk. + module DiskSavedState + # Default Disk state has not been preserved. + DISK_SAVED_STATE_UNSPECIFIED = 0 + + # Disk state has been preserved. + PRESERVED = 1 + end + end + + # Feature type of the Guest OS. + # @!attribute [rw] type + # @return [::Google::Cloud::BackupDR::V1::GuestOsFeature::FeatureType] + # The ID of a supported feature. + class GuestOsFeature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # List of the Feature Types. + module FeatureType + # Default value, which is unused. + FEATURE_TYPE_UNSPECIFIED = 0 + + # VIRTIO_SCSI_MULTIQUEUE feature type. + VIRTIO_SCSI_MULTIQUEUE = 1 + + # WINDOWS feature type. + WINDOWS = 2 + + # MULTI_IP_SUBNET feature type. + MULTI_IP_SUBNET = 3 + + # UEFI_COMPATIBLE feature type. + UEFI_COMPATIBLE = 4 + + # SECURE_BOOT feature type. + SECURE_BOOT = 5 + + # GVNIC feature type. + GVNIC = 6 + + # SEV_CAPABLE feature type. + SEV_CAPABLE = 7 + + # BARE_METAL_LINUX_COMPATIBLE feature type. + BARE_METAL_LINUX_COMPATIBLE = 8 + + # SUSPEND_RESUME_COMPATIBLE feature type. + SUSPEND_RESUME_COMPATIBLE = 9 + + # SEV_LIVE_MIGRATABLE feature type. + SEV_LIVE_MIGRATABLE = 10 + + # SEV_SNP_CAPABLE feature type. + SEV_SNP_CAPABLE = 11 + + # TDX_CAPABLE feature type. + TDX_CAPABLE = 12 + + # IDPF feature type. + IDPF = 13 + + # SEV_LIVE_MIGRATABLE_V2 feature type. + SEV_LIVE_MIGRATABLE_V2 = 14 + end + end + + # Specifies whether the virtual machine instance will be shut down on key + # revocation. It is currently used in instance, instance properties and GMI + # protos + module KeyRevocationActionType + # Default value. This value is unused. + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0 + + # Indicates user chose no operation. + NONE = 1 + + # Indicates user chose to opt for VM shutdown on key revocation. + STOP = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb new file mode 100644 index 000000000000..d6e8a8da44c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb @@ -0,0 +1,228 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # DataSourceReference is a reference to a DataSource resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the DataSourceReference. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + # @!attribute [r] data_source + # @return [::String] + # Output only. The resource name of the DataSource. + # Format: + # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{dataSource} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataSourceReference was created. + # @!attribute [r] data_source_backup_config_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] + # Output only. The backup configuration state of the DataSource. + # @!attribute [r] data_source_backup_count + # @return [::Integer] + # Output only. Number of backups in the DataSource. + # @!attribute [r] data_source_backup_config_info + # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupConfigInfo] + # Output only. Information of backup configuration on the DataSource. + # @!attribute [r] data_source_gcp_resource_info + # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResourceInfo] + # Output only. The GCP resource that the DataSource is associated with. + # @!attribute [r] total_stored_bytes + # @return [::Integer] + # Output only. Total size of the storage used by all backup resources for the + # referenced datasource. + class DataSourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information of backup configuration on the DataSource. + # @!attribute [r] last_backup_state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] + # Output only. The status of the last backup in this DataSource + # @!attribute [r] last_successful_backup_consistency_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the last successful backup to this DataSource. + class DataSourceBackupConfigInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The GCP resource that the DataSource is associated with. + # @!attribute [r] gcp_resourcename + # @return [::String] + # Output only. The resource name of the GCP resource. + # Ex: projects/\\{project}/zones/\\{zone}/instances/\\{instance} + # @!attribute [r] type + # @return [::String] + # Output only. The type of the GCP resource. + # Ex: compute.googleapis.com/Instance + # @!attribute [r] location + # @return [::String] + # Output only. The location of the GCP resource. + # Ex: //"global"/"unspecified" + # @!attribute [r] cloud_sql_instance_properties + # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceReferenceProperties] + # Output only. The properties of the Cloud SQL instance. + class DataSourceGcpResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the GetDataSourceReference method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the DataSourceReference to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} + class GetDataSourceReferenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the ListDataSourceReferences method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataSourceReferences` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDataSourceReferences` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results listed in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. + # + # The following field and operator combinations are supported: + # + # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + # * data_source_gcp_resource_info.type with `=`, `!=` + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + class ListDataSourceReferencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the ListDataSourceReferences method. + # @!attribute [rw] data_source_references + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # The DataSourceReferences from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataSourceReferencesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the FetchDataSourceReferencesForResourceType method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the GCP resource. + # Ex: sql.googleapis.com/Instance + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of DataSourceReferences to return. The service + # may return fewer than this value. If unspecified, at most 50 + # DataSourceReferences will be returned. The maximum value is 100; values + # above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call of + # `FetchDataSourceReferencesForResourceType`. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `FetchDataSourceReferencesForResourceType` must match + # the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters the results fetched in the + # response. The expression must specify the field name, a comparison + # operator, and the value that you want to use for filtering. Supported + # fields: + # * data_source + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_backup_config_state + # * data_source_backup_count + # * data_source_backup_config_info.last_backup_state + # * data_source_gcp_resource_info.gcp_resourcename + # * data_source_gcp_resource_info.type + # * data_source_gcp_resource_info.location + # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + # @!attribute [rw] order_by + # @return [::String] + # Optional. A comma-separated list of fields to order by, sorted in ascending + # order. Use "desc" after a field name for descending. + # + # Supported fields: + # * name + class FetchDataSourceReferencesForResourceTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the FetchDataSourceReferencesForResourceType method. + # @!attribute [rw] data_source_references + # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] + # The DataSourceReferences from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class FetchDataSourceReferencesForResourceTypeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb new file mode 100644 index 000000000000..79acc54ee206 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb @@ -0,0 +1,309 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BackupDR + module V1 + # Request for ListResourceBackupConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve resource backup + # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google + # Cloud Backup and DR, locations map to Google Cloud regions, for example + # **us-central1**. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will use 100 as default. Maximum value is + # 500 and values above 500 will be coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListResourceBackupConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListResourceBackupConfigs. + # @!attribute [rw] resource_backup_configs + # @return [::Array<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>] + # The list of ResourceBackupConfigs for the specified scope. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListResourceBackupConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ResourceBackupConfig represents a resource along with its backup + # configurations. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the ResourceBackupConfig. + # Format: + # projects/\\{project}/locations/\\{location}/resourceBackupConfigs/\\{uid} + # @!attribute [r] uid + # @return [::String] + # Output only. The unique identifier of the resource backup config. + # @!attribute [r] target_resource + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the cloud resource that this configuration applies to. Supported + # resource types are + # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType ResourceBackupConfig.ResourceType}. + # @!attribute [r] target_resource_display_name + # @return [::String] + # Output only. The human friendly name of the target resource. + # @!attribute [r] target_resource_type + # @return [::Google::Cloud::BackupDR::V1::ResourceBackupConfig::ResourceType] + # Output only. The type of the target resource. + # @!attribute [rw] target_resource_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with the target resource. + # @!attribute [rw] backup_configs_details + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupConfigDetails>] + # Backup configurations applying to the target resource, including those + # targeting its related/child resources. For example, backup configuration + # applicable to Compute Engine disks will be populated in this field for a + # Compute Engine VM which has the disk associated. + # @!attribute [r] backup_configured + # @return [::Boolean] + # Output only. Whether the target resource is configured for backup. This is + # true if the backup_configs_details is not empty. + # @!attribute [r] vaulted + # @return [::Boolean] + # Output only. Whether the target resource is protected by a backup vault. + # This is true if the backup_configs_details is not empty and any of the + # {::Google::Cloud::BackupDR::V1::ResourceBackupConfig#backup_configs_details ResourceBackupConfig.backup_configs_details} + # has a backup configuration with + # {::Google::Cloud::BackupDR::V1::BackupConfigDetails#backup_vault BackupConfigDetails.backup_vault} + # set. set. + class ResourceBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TargetResourceLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the cloud resource. + module ResourceType + # Resource type not set. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # Cloud SQL instance. + CLOUD_SQL_INSTANCE = 1 + + # Compute Engine VM. + COMPUTE_ENGINE_VM = 2 + + # Compute Engine Disk. + COMPUTE_ENGINE_DISK = 3 + + # Compute Engine Regional Disk. + COMPUTE_ENGINE_REGIONAL_DISK = 4 + end + end + + # BackupConfigDetails has information about how the resource is configured + # for backups and about the most recent backup taken for this configuration. + # @!attribute [r] backup_config_source + # @return [::String] + # Output only. The full resource name of the backup config source resource. + # For example, + # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupPlans/\\{backupplanId}" + # or + # "//compute.googleapis.com/projects/\\{project}/locations/\\{region}/resourcePolicies/\\{resourcePolicyId}". + # @!attribute [r] backup_config_source_display_name + # @return [::String] + # Output only. The display name of the backup config source resource. + # @!attribute [r] type + # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::Type] + # Output only. The type of the backup config resource. + # @!attribute [r] state + # @return [::Google::Cloud::BackupDR::V1::BackupConfigDetails::State] + # Output only. The state of the backup config resource. + # @!attribute [r] pitr_settings + # @return [::Google::Cloud::BackupDR::V1::PitrSettings] + # Output only. Point in time recovery settings of the backup configuration + # resource. + # @!attribute [r] latest_successful_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the latest successful backup created via this + # backup configuration. + # @!attribute [r] applicable_resource + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the resource that is applicable for the backup configuration. Example: + # "//compute.googleapis.com/projects/\\{project}/zones/\\{zone}/instances/\\{instance}" + # @!attribute [r] backup_vault + # @return [::String] + # Output only. The [full resource + # name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # of the backup vault that will store the backups generated through this + # backup configuration. Example: + # "//backupdr.googleapis.com/v1/projects/\\{project}/locations/\\{region}/backupVaults/\\{backupvaultId}" + # @!attribute [rw] backup_locations + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLocation>] + # The locations where the backups are to be stored. + # @!attribute [rw] backup_dr_plan_config + # @return [::Google::Cloud::BackupDR::V1::BackupDrPlanConfig] + # Google Cloud Backup and DR's Backup Plan specific data. + # + # Note: The following fields are mutually exclusive: `backup_dr_plan_config`, `backup_dr_template_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] backup_dr_template_config + # @return [::Google::Cloud::BackupDR::V1::BackupDrTemplateConfig] + # Google Cloud Backup and DR's Template specific data. + # + # Note: The following fields are mutually exclusive: `backup_dr_template_config`, `backup_dr_plan_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of the backup configuration. + # This enum may receive new values in the future. + module Type + # Backup config type is unspecified. + TYPE_UNSPECIFIED = 0 + + # Backup config is Cloud SQL instance's automated backup config. + CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1 + + # Backup config is Compute Engine Resource Policy. + COMPUTE_ENGINE_RESOURCE_POLICY = 2 + + # Backup config is Google Cloud Backup and DR's Backup Plan. + BACKUPDR_BACKUP_PLAN = 3 + + # Backup config is Google Cloud Backup and DR's Template. + BACKUPDR_TEMPLATE = 4 + end + + # The state tells whether the backup config is active or not. + module State + # Backup config state not set. + STATE_UNSPECIFIED = 0 + + # The config is in an active state protecting the resource + ACTIVE = 1 + + # The config is currently not protecting the resource. Either because it is + # disabled or the owning project has been deleted without cleanup of the + # actual resource. + INACTIVE = 2 + + # The config still exists but because of some error state it is not + # protecting the resource. Like the source project is deleted. For eg. + # PlanAssociation, BackupPlan is deleted. + ERROR = 3 + end + end + + # Point in time recovery settings of the backup configuration resource. + # @!attribute [r] retention_days + # @return [::Integer] + # Output only. Number of days to retain the backup. + class PitrSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides additional information about Google Cloud Backup + # and DR's Template backup configuration. + # @!attribute [r] first_party_management_uri + # @return [::String] + # Output only. The URI of the BackupDr template resource for the first party + # identity users. + # @!attribute [r] third_party_management_uri + # @return [::String] + # Output only. The URI of the BackupDr template resource for the third party + # identity users. + class BackupDrTemplateConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupDrPlanConfig has additional information about Google Cloud Backup and + # DR's Plan backup configuration. + # @!attribute [rw] backup_dr_plan_rules + # @return [::Array<::Google::Cloud::BackupDR::V1::BackupDrPlanRule>] + # Backup rules of the backup plan resource. + class BackupDrPlanConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupDrPlanRule has rule specific information of the backup plan resource. + # @!attribute [r] rule_id + # @return [::String] + # Output only. Unique Id of the backup rule. + # @!attribute [r] last_successful_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the latest successful backup created via this + # backup rule. + class BackupDrPlanRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupLocation represents a cloud location where a backup can be stored. + # @!attribute [r] type + # @return [::Google::Cloud::BackupDR::V1::BackupLocation::Type] + # Output only. The type of the location. + # @!attribute [r] location_id + # @return [::String] + # Output only. The id of the cloud location. Example: "us-central1" + class BackupLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the location. + module Type + # Location type is unspecified. + TYPE_UNSPECIFIED = 0 + + # Location type is zonal. + ZONAL = 1 + + # Location type is regional. + REGIONAL = 2 + + # Location type is multi regional. + MULTI_REGIONAL = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..1b485b0c3456 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb new file mode 100644 index 000000000000..3e27c902551d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a month in the Gregorian calendar. + module Month + # The unspecified month. + MONTH_UNSPECIFIED = 0 + + # The month of January. + JANUARY = 1 + + # The month of February. + FEBRUARY = 2 + + # The month of March. + MARCH = 3 + + # The month of April. + APRIL = 4 + + # The month of May. + MAY = 5 + + # The month of June. + JUNE = 6 + + # The month of July. + JULY = 7 + + # The month of August. + AUGUST = 8 + + # The month of September. + SEPTEMBER = 9 + + # The month of October. + OCTOBER = 10 + + # The month of November. + NOVEMBER = 11 + + # The month of December. + DECEMBER = 12 + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile new file mode 100644 index 000000000000..4febd3ff4e67 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-backupdr-v1", path: "../" +else + gem "google-cloud-backupdr-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb new file mode 100644 index 000000000000..2b79d9a8674f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs. +# +def list_resource_backup_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new + + # Call the list_resource_backup_configs method. + result = client.list_resource_backup_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig. + p item + end +end +# [END backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb new file mode 100644 index 000000000000..e5b889a4dfa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan. +# +def create_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new + + # Call the create_backup_plan method. + result = client.create_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb new file mode 100644 index 000000000000..628c925da9e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association. +# +def create_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new + + # Call the create_backup_plan_association method. + result = client.create_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb new file mode 100644 index 000000000000..30f7bcaa3098 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_CreateBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault. +# +def create_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new + + # Call the create_backup_vault method. + result = client.create_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb new file mode 100644 index 000000000000..8eb6c732f376 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_CreateManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the create_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server. +# +def create_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new + + # Call the create_management_server method. + result = client.create_management_server request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_CreateManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb new file mode 100644 index 000000000000..d920bccbb83b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup. +# +def delete_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new + + # Call the delete_backup method. + result = client.delete_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb new file mode 100644 index 000000000000..a1585e7a803b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan. +# +def delete_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new + + # Call the delete_backup_plan method. + result = client.delete_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb new file mode 100644 index 000000000000..68037dc3c1c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association. +# +def delete_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new + + # Call the delete_backup_plan_association method. + result = client.delete_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb new file mode 100644 index 000000000000..bfc3d415812f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault. +# +def delete_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new + + # Call the delete_backup_vault method. + result = client.delete_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb new file mode 100644 index 000000000000..6e0a6c8cea65 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the delete_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server. +# +def delete_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new + + # Call the delete_management_server method. + result = client.delete_management_server request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb new file mode 100644 index 000000000000..0caa4cac2125 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type. +# +def fetch_backup_plan_associations_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new + + # Call the fetch_backup_plan_associations_for_resource_type method. + result = client.fetch_backup_plan_associations_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb new file mode 100644 index 000000000000..8cd5de148567 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_backups_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type. +# +def fetch_backups_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new + + # Call the fetch_backups_for_resource_type method. + result = client.fetch_backups_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb new file mode 100644 index 000000000000..dfcab2575125 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type. +# +def fetch_data_source_references_for_resource_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new + + # Call the fetch_data_source_references_for_resource_type method. + result = client.fetch_data_source_references_for_resource_type request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb new file mode 100644 index 000000000000..a69bc309bc34 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the fetch_usable_backup_vaults call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults. +# +def fetch_usable_backup_vaults + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new + + # Call the fetch_usable_backup_vaults method. + result = client.fetch_usable_backup_vaults request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + p item + end +end +# [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb new file mode 100644 index 000000000000..657958fff3c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup. +# +def get_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupRequest.new + + # Call the get_backup method. + result = client.get_backup request + + # The returned object is of type Google::Cloud::BackupDR::V1::Backup. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb new file mode 100644 index 000000000000..7f12d19c6466 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan. +# +def get_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new + + # Call the get_backup_plan method. + result = client.get_backup_plan request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb new file mode 100644 index 000000000000..95a3715c6d53 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association. +# +def get_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new + + # Call the get_backup_plan_association method. + result = client.get_backup_plan_association request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb new file mode 100644 index 000000000000..d9bdfc3ff576 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_plan_revision call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision. +# +def get_backup_plan_revision + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new + + # Call the get_backup_plan_revision method. + result = client.get_backup_plan_revision request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb new file mode 100644 index 000000000000..b42028f7c351 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault. +# +def get_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new + + # Call the get_backup_vault method. + result = client.get_backup_vault request + + # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. + p result +end +# [END backupdr_v1_generated_BackupDR_GetBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb new file mode 100644 index 000000000000..d86a885d8a7f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetDataSource_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_data_source call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source. +# +def get_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new + + # Call the get_data_source method. + result = client.get_data_source request + + # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. + p result +end +# [END backupdr_v1_generated_BackupDR_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb new file mode 100644 index 000000000000..789a665be9b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_data_source_reference call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference. +# +def get_data_source_reference + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new + + # Call the get_data_source_reference method. + result = client.get_data_source_reference request + + # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. + p result +end +# [END backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb new file mode 100644 index 000000000000..0ab70b155c06 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_GetManagementServer_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the get_management_server call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server. +# +def get_management_server + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new + + # Call the get_management_server method. + result = client.get_management_server request + + # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. + p result +end +# [END backupdr_v1_generated_BackupDR_GetManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb new file mode 100644 index 000000000000..1a6248e10433 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_InitializeService_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the initialize_service call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service. +# +def initialize_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new + + # Call the initialize_service method. + result = client.initialize_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_InitializeService_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb new file mode 100644 index 000000000000..1be14c9502b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plan_associations call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations. +# +def list_backup_plan_associations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new + + # Call the list_backup_plan_associations method. + result = client.list_backup_plan_associations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb new file mode 100644 index 000000000000..523bdada0405 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plan_revisions call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions. +# +def list_backup_plan_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new + + # Call the list_backup_plan_revisions method. + result = client.list_backup_plan_revisions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb new file mode 100644 index 000000000000..68a2931714bf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupPlans_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_plans call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans. +# +def list_backup_plans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new + + # Call the list_backup_plans method. + result = client.list_backup_plans request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupPlans_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb new file mode 100644 index 000000000000..bd68d0f95f72 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackupVaults_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backup_vaults call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults. +# +def list_backup_vaults + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new + + # Call the list_backup_vaults method. + result = client.list_backup_vaults request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb new file mode 100644 index 000000000000..865ebe38ae19 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListBackups_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_backups call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups. +# +def list_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new + + # Call the list_backups method. + result = client.list_backups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb new file mode 100644 index 000000000000..c0cbb790e2d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_data_source_references call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references. +# +def list_data_source_references + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new + + # Call the list_data_source_references method. + result = client.list_data_source_references request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb new file mode 100644 index 000000000000..5607c9beb443 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListDataSources_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_data_sources call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources. +# +def list_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new + + # Call the list_data_sources method. + result = client.list_data_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb new file mode 100644 index 000000000000..c026e846fb03 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_ListManagementServers_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the list_management_servers call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers. +# +def list_management_servers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new + + # Call the list_management_servers method. + result = client.list_management_servers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. + p item + end +end +# [END backupdr_v1_generated_BackupDR_ListManagementServers_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb new file mode 100644 index 000000000000..0f57a119d916 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_RestoreBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the restore_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup. +# +def restore_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new + + # Call the restore_backup method. + result = client.restore_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_RestoreBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb new file mode 100644 index 000000000000..d5b2a0664bef --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_TriggerBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the trigger_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup. +# +def trigger_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new + + # Call the trigger_backup method. + result = client.trigger_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_TriggerBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb new file mode 100644 index 000000000000..90ba04ae397e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateBackup_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup. +# +def update_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new + + # Call the update_backup method. + result = client.update_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb new file mode 100644 index 000000000000..f2bdd1d70e64 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_plan call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan. +# +def update_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new + + # Call the update_backup_plan method. + result = client.update_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb new file mode 100644 index 000000000000..eaf3f010e273 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_plan_association call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association. +# +def update_backup_plan_association + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new + + # Call the update_backup_plan_association method. + result = client.update_backup_plan_association request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb new file mode 100644 index 000000000000..5b0d5a057c05 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_backup_vault call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault. +# +def update_backup_vault + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new + + # Call the update_backup_vault method. + result = client.update_backup_vault request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb new file mode 100644 index 000000000000..1167757bc2d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START backupdr_v1_generated_BackupDR_UpdateDataSource_sync] +require "google/cloud/backupdr/v1" + +## +# Snippet for the update_data_source call in the BackupDR service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source. +# +def update_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BackupDR::V1::BackupDR::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new + + # Call the update_data_source method. + result = client.update_data_source request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END backupdr_v1_generated_BackupDR_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json new file mode 100644 index 000000000000..fa4385c64a8c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json @@ -0,0 +1,1535 @@ +{ + "client_library": { + "name": "google-cloud-backupdr-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.backupdr.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "backupdr_v1_generated_BackupDR_ListManagementServers_sync", + "title": "Snippet for the list_management_servers call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers.", + "file": "backupdr/list_management_servers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_management_servers", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListManagementServersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListManagementServersResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListManagementServers", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetManagementServer_sync", + "title": "Snippet for the get_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server.", + "file": "backupdr/get_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ManagementServer", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateManagementServer_sync", + "title": "Snippet for the create_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server.", + "file": "backupdr/create_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_sync", + "title": "Snippet for the delete_management_server call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server.", + "file": "backupdr/delete_management_server.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_management_server", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteManagementServer", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupVault_sync", + "title": "Snippet for the create_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault.", + "file": "backupdr/create_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupVaults_sync", + "title": "Snippet for the list_backup_vaults call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults.", + "file": "backupdr/list_backup_vaults.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_vaults", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupVaults", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync", + "title": "Snippet for the fetch_usable_backup_vaults call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults.", + "file": "backupdr/fetch_usable_backup_vaults.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_usable_backup_vaults", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchUsableBackupVaults", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupVault_sync", + "title": "Snippet for the get_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault.", + "file": "backupdr/get_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupVault", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_sync", + "title": "Snippet for the update_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault.", + "file": "backupdr/update_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_sync", + "title": "Snippet for the delete_backup_vault call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault.", + "file": "backupdr/delete_backup_vault.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_vault", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupVault", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListDataSources_sync", + "title": "Snippet for the list_data_sources call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources.", + "file": "backupdr/list_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_sources", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourcesResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListDataSources", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetDataSource_sync", + "title": "Snippet for the get_data_source call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source.", + "file": "backupdr/get_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::DataSource", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetDataSource", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateDataSource_sync", + "title": "Snippet for the update_data_source call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source.", + "file": "backupdr/update_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_source", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateDataSource", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackups_sync", + "title": "Snippet for the list_backups call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups.", + "file": "backupdr/list_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backups", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackups", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync", + "title": "Snippet for the fetch_backups_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type.", + "file": "backupdr/fetch_backups_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_backups_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchBackupsForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackup_sync", + "title": "Snippet for the get_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup.", + "file": "backupdr/get_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::Backup", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackup_sync", + "title": "Snippet for the update_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup.", + "file": "backupdr/update_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackup_sync", + "title": "Snippet for the delete_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup.", + "file": "backupdr/delete_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_RestoreBackup_sync", + "title": "Snippet for the restore_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup.", + "file": "backupdr/restore_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::RestoreBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "RestoreBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_sync", + "title": "Snippet for the create_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan.", + "file": "backupdr/create_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync", + "title": "Snippet for the update_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan.", + "file": "backupdr/update_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlan_sync", + "title": "Snippet for the get_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan.", + "file": "backupdr/get_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlan", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlans_sync", + "title": "Snippet for the list_backup_plans call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans.", + "file": "backupdr/list_backup_plans.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plans", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlansRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlansResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlans", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync", + "title": "Snippet for the delete_backup_plan call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan.", + "file": "backupdr/delete_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_plan", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupPlan", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync", + "title": "Snippet for the get_backup_plan_revision call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision.", + "file": "backupdr/get_backup_plan_revision.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan_revision", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanRevision", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlanRevision", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanRevision", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync", + "title": "Snippet for the list_backup_plan_revisions call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions.", + "file": "backupdr/list_backup_plan_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plan_revisions", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlanRevisions", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanRevisions", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync", + "title": "Snippet for the create_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association.", + "file": "backupdr/create_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "CreateBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync", + "title": "Snippet for the update_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association.", + "file": "backupdr/update_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "UpdateBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync", + "title": "Snippet for the get_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association.", + "file": "backupdr/get_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanAssociation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync", + "title": "Snippet for the list_backup_plan_associations call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations.", + "file": "backupdr/list_backup_plan_associations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plan_associations", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListBackupPlanAssociations", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync", + "title": "Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type.", + "file": "backupdr/fetch_backup_plan_associations_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_backup_plan_associations_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchBackupPlanAssociationsForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupPlanAssociationsForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync", + "title": "Snippet for the delete_backup_plan_association call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association.", + "file": "backupdr/delete_backup_plan_association.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_plan_association", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "DeleteBackupPlanAssociation", + "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_TriggerBackup_sync", + "title": "Snippet for the trigger_backup call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup.", + "file": "backupdr/trigger_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "trigger_backup", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::TriggerBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "TriggerBackup", + "full_name": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_GetDataSourceReference_sync", + "title": "Snippet for the get_data_source_reference call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference.", + "file": "backupdr/get_data_source_reference.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source_reference", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::DataSourceReference", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "GetDataSourceReference", + "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSourceReference", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync", + "title": "Snippet for the list_data_source_references call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references.", + "file": "backupdr/list_data_source_references.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_source_references", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "ListDataSourceReferences", + "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSourceReferences", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync", + "title": "Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type.", + "file": "backupdr/fetch_data_source_references_for_resource_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_data_source_references_for_resource_type", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "FetchDataSourceReferencesForResourceType", + "full_name": "google.cloud.backupdr.v1.BackupDR.FetchDataSourceReferencesForResourceType", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDR_InitializeService_sync", + "title": "Snippet for the initialize_service call in the BackupDR service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service.", + "file": "backupdr/initialize_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "initialize_service", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::InitializeServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupDR::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" + }, + "method": { + "short_name": "InitializeService", + "full_name": "google.cloud.backupdr.v1.BackupDR.InitializeService", + "service": { + "short_name": "BackupDR", + "full_name": "google.cloud.backupdr.v1.BackupDR" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync", + "title": "Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs.", + "file": "backup_dr_protection_summary/list_resource_backup_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_backup_configs", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse", + "client": { + "short_name": "BackupDrProtectionSummary::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client" + }, + "method": { + "short_name": "ListResourceBackupConfigs", + "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary.ListResourceBackupConfigs", + "service": { + "short_name": "BackupDrProtectionSummary", + "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb new file mode 100644 index 000000000000..9d979a3cfce6 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/backup_dr_protection_summary" + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb new file mode 100644 index 000000000000..1d7d6c2b8954 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" + + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_resource_backup_configs + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_backup_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::ServiceStub.stub :transcode_list_resource_backup_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_backup_configs_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_resource_backup_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_backup_configs_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb new file mode 100644 index 000000000000..721fe7b5b877 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/protection_summary_pb" +require "google/cloud/backupdr/v1/backup_dr_protection_summary" + +class ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_resource_backup_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_resource_backup_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_backup_configs, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_backup_configs_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_resource_backup_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_resource_backup_configs ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_resource_backup_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_resource_backup_configs(::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_resource_backup_configs_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb new file mode 100644 index 000000000000..93faecb1e332 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr_services_pb" +require "google/cloud/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb new file mode 100644 index 000000000000..889ee8ed12b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb @@ -0,0 +1,199 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_backup_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3", backup: "value4" + assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3/backups/value4", path + end + end + + def test_backup_plan_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_path project: "value0", location: "value1", backup_plan: "value2" + assert_equal "projects/value0/locations/value1/backupPlans/value2", path + end + end + + def test_backup_plan_association_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_association_path project: "value0", location: "value1", backup_plan_association: "value2" + assert_equal "projects/value0/locations/value1/backupPlanAssociations/value2", path + end + end + + def test_backup_plan_revision_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_revision_path project: "value0", location: "value1", backup_plan: "value2", revision: "value3" + assert_equal "projects/value0/locations/value1/backupPlans/value2/revisions/value3", path + end + end + + def test_backup_vault_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_vault_path project: "value0", location: "value1", backupvault: "value2" + assert_equal "projects/value0/locations/value1/backupVaults/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", ring: "value2", key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_crypto_key_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + + def test_data_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3" + assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3", path + end + end + + def test_data_source_reference_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_reference_path project: "value0", location: "value1", data_source_reference: "value2" + assert_equal "projects/value0/locations/value1/dataSourceReferences/value2", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", instance: "value1" + assert_equal "projects/value0/instances/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_management_server_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.management_server_path project: "value0", location: "value1", managementserver: "value2" + assert_equal "projects/value0/locations/value1/managementServers/value2", path + end + end + + def test_storage_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.storage_pool_path project: "value0", zone: "value1", storage_pool: "value2" + assert_equal "projects/value0/zones/value1/storagePools/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb new file mode 100644 index 000000000000..4e67aa6b660d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb @@ -0,0 +1,2196 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr/rest" + + +class ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_management_servers + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_management_servers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_management_servers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_management_servers_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_management_servers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_management_servers_client_stub.call_count + end + end + end + + def test_get_management_server + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ManagementServer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_management_server({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_management_server name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_management_server({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_management_server_client_stub.call_count + end + end + end + + def test_create_management_server + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + management_server_id = "hello world" + management_server = {} + request_id = "hello world" + + create_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_management_server_client_stub.call_count + end + end + end + + def test_delete_management_server + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_management_server_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_management_server({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_management_server name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_management_server({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_management_server_client_stub.call_count + end + end + end + + def test_create_backup_vault + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_vault_id = "hello world" + backup_vault = {} + request_id = "hello world" + validate_only = true + + create_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_vault_client_stub.call_count + end + end + end + + def test_list_backup_vaults + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + list_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_vaults_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_vaults_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_vaults_client_stub.call_count + end + end + end + + def test_fetch_usable_backup_vaults + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_usable_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_usable_backup_vaults_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_usable_backup_vaults_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_usable_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_usable_backup_vaults_client_stub.call_count + end + end + end + + def test_get_backup_vault + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupVault.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + get_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_vault({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_vault name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_vault({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_vault_client_stub.call_count + end + end + end + + def test_update_backup_vault + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + backup_vault = {} + request_id = "hello world" + validate_only = true + force = true + force_update_access_restriction = true + + update_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_vault_client_stub.call_count + end + end + end + + def test_delete_backup_vault + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + etag = "hello world" + validate_only = true + allow_missing = true + ignore_backup_plan_references = true + + delete_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_vault_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_vault_client_stub.call_count + end + end + end + + def test_list_data_sources + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_sources parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_sources_client_stub.call_count + end + end + end + + def test_get_data_source + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_count + end + end + end + + def test_update_data_source + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_source = {} + request_id = "hello world" + allow_missing = true + + update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_count + end + end + end + + def test_list_backups + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_count + end + end + end + + def test_fetch_backups_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + fetch_backups_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backups_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_backups_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_backups_for_resource_type_client_stub.call_count + end + end + end + + def test_get_backup + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_count + end + end + end + + def test_update_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + backup = {} + request_id = "hello world" + + update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_client_stub.call_count + end + end + end + + def test_delete_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_count + end + end + end + + def test_restore_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + compute_instance_target_environment = {} + compute_instance_restore_properties = {} + clear_overrides_field_mask = {} + + restore_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_restore_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_backup_client_stub.call_count + end + end + end + + def test_create_backup_plan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan_id = "hello world" + backup_plan = {} + request_id = "hello world" + + create_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_plan_client_stub.call_count + end + end + end + + def test_update_backup_plan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_plan = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_plan_client_stub.call_count + end + end + end + + def test_get_backup_plan + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlan.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_client_stub.call_count + end + end + end + + def test_list_backup_plans + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_backup_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plans_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_plans_client_stub.call_count + end + end + end + + def test_delete_backup_plan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_plan({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_plan name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_plan({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_plan_client_stub.call_count + end + end + end + + def test_get_backup_plan_revision + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_revision_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_revision_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan_revision({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan_revision name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan_revision({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_revision_client_stub.call_count + end + end + end + + def test_list_backup_plan_revisions + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_plan_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plan_revisions_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_plan_revisions_client_stub.call_count + end + end + end + + def test_create_backup_plan_association + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan_association_id = "hello world" + backup_plan_association = {} + request_id = "hello world" + + create_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_plan_association_client_stub.call_count + end + end + end + + def test_update_backup_plan_association + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_plan_association = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_plan_association_client_stub.call_count + end + end + end + + def test_get_backup_plan_association + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan_association({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan_association name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan_association({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_association_client_stub.call_count + end + end + end + + def test_list_backup_plan_associations + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_backup_plan_associations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_associations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plan_associations_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_plan_associations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_plan_associations_client_stub.call_count + end + end + end + + def test_fetch_backup_plan_associations_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backup_plan_associations_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_count + end + end + end + + def test_delete_backup_plan_association + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_association_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_plan_association({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_plan_association name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_plan_association({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_plan_association_client_stub.call_count + end + end + end + + def test_trigger_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + rule_id = "hello world" + request_id = "hello world" + + trigger_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_trigger_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, trigger_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, trigger_backup_client_stub.call_count + end + end + end + + def test_get_data_source_reference + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::DataSourceReference.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_reference_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_reference_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_reference_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source_reference({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source_reference name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source_reference({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_reference_client_stub.call_count + end + end + end + + def test_list_data_source_references + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_source_references_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_source_references_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_source_references_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_source_references parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_source_references_client_stub.call_count + end + end + end + + def test_fetch_data_source_references_for_resource_type + # Create test objects. + client_result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_data_source_references_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_data_source_references_for_resource_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_count + end + end + end + + def test_initialize_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + resource_type = "hello world" + request_id = "hello world" + cloud_sql_instance_initialization_config = {} + + initialize_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_initialize_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, initialize_service_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, initialize_service_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb new file mode 100644 index 000000000000..0e7a35ab8959 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb @@ -0,0 +1,2613 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/backupdr/v1/backupdr_pb" +require "google/cloud/backupdr/v1/backupdr" + +class ::Google::Cloud::BackupDR::V1::BackupDR::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_management_servers + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_management_servers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_management_servers, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert request.has_filter? + assert_equal "hello world", request["order_by"] + assert request.has_order_by? + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_management_servers_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_management_servers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_management_servers_client_stub.call_rpc_count + end + end + + def test_get_management_server + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ManagementServer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_management_server({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_management_server name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_management_server({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_management_server_client_stub.call_rpc_count + end + end + + def test_create_management_server + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + management_server_id = "hello world" + management_server = {} + request_id = "hello world" + + create_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["management_server_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ManagementServer), request["management_server"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_management_server_client_stub.call_rpc_count + end + end + + def test_delete_management_server + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_management_server, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_management_server_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_management_server({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_management_server name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_management_server({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_management_server_client_stub.call_rpc_count + end + end + + def test_create_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_vault_id = "hello world" + backup_vault = {} + request_id = "hello world" + validate_only = true + + create_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_vault_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_vault_client_stub.call_rpc_count + end + end + + def test_list_backup_vaults + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + list_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_vaults, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_vaults_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_vaults_client_stub.call_rpc_count + end + end + + def test_fetch_usable_backup_vaults + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_usable_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_usable_backup_vaults, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_usable_backup_vaults_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_usable_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_usable_backup_vaults_client_stub.call_rpc_count + end + end + + def test_get_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupVault.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VAULT_VIEW_UNSPECIFIED + + get_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, request + assert_equal "hello world", request["name"] + assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_vault({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_vault name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_vault({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_vault_client_stub.call_rpc_count + end + end + + def test_update_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + backup_vault = {} + request_id = "hello world" + validate_only = true + force = true + force_update_access_restriction = true + + update_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal true, request["force"] + assert_equal true, request["force_update_access_restriction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_vault_client_stub.call_rpc_count + end + end + + def test_delete_backup_vault + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + etag = "hello world" + validate_only = true + allow_missing = true + ignore_backup_plan_references = true + + delete_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_vault, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + assert_equal true, request["ignore_backup_plan_references"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_vault_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_vault_client_stub.call_rpc_count + end + end + + def test_list_data_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_sources, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_sources parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_sources_client_stub.call_rpc_count + end + end + + def test_get_data_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::DataSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_rpc_count + end + end + + def test_update_data_source + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_source = {} + request_id = "hello world" + allow_missing = true + + update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_source, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::DataSource), request["data_source"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_source_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_source_client_stub.call_rpc_count + end + end + + def test_list_backups + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backups, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_rpc_count + end + end + + def test_fetch_backups_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + fetch_backups_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_backups_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_backups_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_backups_for_resource_type_client_stub.call_rpc_count + end + end + + def test_get_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::Backup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BACKUP_VIEW_UNSPECIFIED + + get_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_rpc_count + end + end + + def test_update_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + backup = {} + request_id = "hello world" + + update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::Backup), request["backup"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_client_stub.call_rpc_count + end + end + + def test_delete_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_rpc_count + end + end + + def test_restore_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + compute_instance_target_environment = {} + compute_instance_restore_properties = {} + clear_overrides_field_mask = {} + + restore_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment), request["compute_instance_target_environment"] + assert_equal :compute_instance_target_environment, request.target_environment + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties), request["compute_instance_restore_properties"] + assert_equal :compute_instance_restore_properties, request.instance_properties + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["clear_overrides_field_mask"] + assert request.has_clear_overrides_field_mask? + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restore_backup_client_stub.call_rpc_count + end + end + + def test_create_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan_id = "hello world" + backup_plan = {} + request_id = "hello world" + + create_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_plan_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_plan_client_stub.call_rpc_count + end + end + + def test_update_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup_plan = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_plan_client_stub.call_rpc_count + end + end + + def test_get_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlan.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_plan_client_stub.call_rpc_count + end + end + + def test_list_backup_plans + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_backup_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plans, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_plans_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_plans_client_stub.call_rpc_count + end + end + + def test_delete_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_plan, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_plan({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup_plan name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup_plan({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_plan_client_stub.call_rpc_count + end + end + + def test_get_backup_plan_revision + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan_revision, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_revision_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan_revision({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan_revision name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan_revision({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_plan_revision_client_stub.call_rpc_count + end + end + + def test_list_backup_plan_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_plan_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plan_revisions, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_plan_revisions_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_plan_revisions_client_stub.call_rpc_count + end + end + + def test_create_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan_association_id = "hello world" + backup_plan_association = {} + request_id = "hello world" + + create_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_plan_association_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_update_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup_plan_association = {} + update_mask = {} + request_id = "hello world" + + update_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_get_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan_association({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan_association name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan_association({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_list_backup_plan_associations + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_backup_plan_associations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plan_associations, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_plan_associations_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_plan_associations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_plan_associations_client_stub.call_rpc_count + end + end + + def test_fetch_backup_plan_associations_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_backup_plan_associations_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_rpc_count + end + end + + def test_delete_backup_plan_association + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_plan_association, name + assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_plan_association_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_plan_association({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup_plan_association name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup_plan_association({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_plan_association_client_stub.call_rpc_count + end + end + + def test_trigger_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + rule_id = "hello world" + request_id = "hello world" + + trigger_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :trigger_backup, name + assert_kind_of ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["rule_id"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, trigger_backup_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, trigger_backup_client_stub.call_rpc_count + end + end + + def test_get_data_source_reference + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::DataSourceReference.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_reference_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source_reference, name + assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_reference_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source_reference({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source_reference name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source_reference({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_source_reference_client_stub.call_rpc_count + end + end + + def test_list_data_source_references + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_source_references_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_source_references, name + assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_source_references_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_source_references parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_source_references_client_stub.call_rpc_count + end + end + + def test_fetch_data_source_references_for_resource_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource_type = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + fetch_data_source_references_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_data_source_references_for_resource_type, name + assert_kind_of ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_rpc_count + end + end + + def test_initialize_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + resource_type = "hello world" + request_id = "hello world" + cloud_sql_instance_initialization_config = {} + + initialize_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :initialize_service, name + assert_kind_of ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["resource_type"] + assert_equal "hello world", request["request_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig), request["cloud_sql_instance_initialization_config"] + assert_equal :cloud_sql_instance_initialization_config, request.initialization_config + refute_nil options + end + + Gapic::ServiceStub.stub :new, initialize_service_client_stub do + # Create client + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, initialize_service_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From c238a69257d9203355ed3421635ad2ce5993d987 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 10 Jan 2026 01:49:46 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 14 + google-cloud-backupdr-v1/gapic_metadata.json | 14 + .../lib/google/cloud/backupdr/v1.rb | 1 + .../v1/backup_dr_protection_summary.rb | 0 .../v1/backup_dr_protection_summary/client.rb | 0 .../credentials.rb | 0 .../v1/backup_dr_protection_summary/paths.rb | 0 .../v1/backup_dr_protection_summary/rest.rb | 0 .../rest/client.rb | 0 .../rest/service_stub.rb | 0 .../backupdr/v1/protection_summary_pb.rb | 0 .../v1/protection_summary_services_pb.rb | 0 .../lib/google/cloud/backupdr/v1/rest.rb | 1 + .../cloud/backupdr/v1/protection_summary.rb | 0 .../list_resource_backup_configs.rb | 0 ...pet_metadata_google.cloud.backupdr.v1.json | 40 + ...backup_dr_protection_summary_paths_test.rb | 0 .../backup_dr_protection_summary_rest_test.rb | 0 .../v1/backup_dr_protection_summary_test.rb | 0 .../google-cloud-backupdr-v1/.gitignore | 22 - .../.repo-metadata.json | 19 - .../google-cloud-backupdr-v1/.rubocop.yml | 33 - .../google-cloud-backupdr-v1/.toys.rb | 28 - .../google-cloud-backupdr-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-backupdr-v1/CHANGELOG.md | 2 - .../google-cloud-backupdr-v1/Gemfile | 11 - .../google-cloud-backupdr-v1/LICENSE.md | 201 - .../google-cloud-backupdr-v1/README.md | 154 - .../google-cloud-backupdr-v1/Rakefile | 169 - .../gapic_metadata.json | 217 - .../google-cloud-backupdr-v1.gemspec | 30 - .../lib/google-cloud-backupdr-v1.rb | 21 - .../lib/google/cloud/backupdr/v1.rb | 46 - .../lib/google/cloud/backupdr/v1/backupdr.rb | 56 - .../cloud/backupdr/v1/backupdr/client.rb | 4786 ----------------- .../cloud/backupdr/v1/backupdr/credentials.rb | 47 - .../cloud/backupdr/v1/backupdr/operations.rb | 841 --- .../cloud/backupdr/v1/backupdr/paths.rb | 290 - .../google/cloud/backupdr/v1/backupdr/rest.rb | 54 - .../cloud/backupdr/v1/backupdr/rest/client.rb | 4493 ---------------- .../backupdr/v1/backupdr/rest/operations.rb | 925 ---- .../backupdr/v1/backupdr/rest/service_stub.rb | 2350 -------- .../google/cloud/backupdr/v1/backupdr_pb.rb | 75 - .../cloud/backupdr/v1/backupdr_services_pb.rb | 119 - .../google/cloud/backupdr/v1/backupplan_pb.rb | 70 - .../backupdr/v1/backupplanassociation_pb.rb | 66 - .../cloud/backupdr/v1/backupvault_ba_pb.rb | 46 - .../backupdr/v1/backupvault_cloudsql_pb.rb | 52 - .../cloud/backupdr/v1/backupvault_disk_pb.rb | 54 - .../cloud/backupdr/v1/backupvault_gce_pb.rb | 87 - .../cloud/backupdr/v1/backupvault_pb.rb | 108 - .../cloud/backupdr/v1/bindings_override.rb | 108 - .../backupdr/v1/datasourcereference_pb.rb | 57 - .../lib/google/cloud/backupdr/v1/rest.rb | 39 - .../lib/google/cloud/backupdr/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/backupdr/v1/backupdr.rb | 415 -- .../google/cloud/backupdr/v1/backupplan.rb | 588 -- .../backupdr/v1/backupplanassociation.rb | 381 -- .../google/cloud/backupdr/v1/backupvault.rb | 1355 ----- .../cloud/backupdr/v1/backupvault_ba.rb | 47 - .../cloud/backupdr/v1/backupvault_cloudsql.rb | 131 - .../cloud/backupdr/v1/backupvault_disk.rb | 241 - .../cloud/backupdr/v1/backupvault_gce.rb | 1001 ---- .../cloud/backupdr/v1/datasourcereference.rb | 228 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 121 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/dayofweek.rb | 49 - .../proto_docs/google/type/expr.rb | 75 - .../proto_docs/google/type/month.rb | 64 - .../google-cloud-backupdr-v1/snippets/Gemfile | 32 - .../snippets/backupdr/create_backup_plan.rb | 54 - .../create_backup_plan_association.rb | 54 - .../snippets/backupdr/create_backup_vault.rb | 54 - .../backupdr/create_management_server.rb | 54 - .../snippets/backupdr/delete_backup.rb | 54 - .../snippets/backupdr/delete_backup_plan.rb | 54 - .../delete_backup_plan_association.rb | 54 - .../snippets/backupdr/delete_backup_vault.rb | 54 - .../backupdr/delete_management_server.rb | 54 - ...kup_plan_associations_for_resource_type.rb | 51 - .../fetch_backups_for_resource_type.rb | 51 - ...ata_source_references_for_resource_type.rb | 51 - .../backupdr/fetch_usable_backup_vaults.rb | 51 - .../snippets/backupdr/get_backup.rb | 47 - .../snippets/backupdr/get_backup_plan.rb | 47 - .../backupdr/get_backup_plan_association.rb | 47 - .../backupdr/get_backup_plan_revision.rb | 47 - .../snippets/backupdr/get_backup_vault.rb | 47 - .../snippets/backupdr/get_data_source.rb | 47 - .../backupdr/get_data_source_reference.rb | 47 - .../backupdr/get_management_server.rb | 47 - .../snippets/backupdr/initialize_service.rb | 54 - .../backupdr/list_backup_plan_associations.rb | 51 - .../backupdr/list_backup_plan_revisions.rb | 51 - .../snippets/backupdr/list_backup_plans.rb | 51 - .../snippets/backupdr/list_backup_vaults.rb | 51 - .../snippets/backupdr/list_backups.rb | 51 - .../backupdr/list_data_source_references.rb | 51 - .../snippets/backupdr/list_data_sources.rb | 51 - .../backupdr/list_management_servers.rb | 51 - .../snippets/backupdr/restore_backup.rb | 54 - .../snippets/backupdr/trigger_backup.rb | 54 - .../snippets/backupdr/update_backup.rb | 54 - .../snippets/backupdr/update_backup_plan.rb | 54 - .../update_backup_plan_association.rb | 54 - .../snippets/backupdr/update_backup_vault.rb | 54 - .../snippets/backupdr/update_data_source.rb | 54 - ...pet_metadata_google.cloud.backupdr.v1.json | 1535 ------ .../backupdr/v1/backupdr_operations_test.rb | 400 -- .../cloud/backupdr/v1/backupdr_paths_test.rb | 199 - .../cloud/backupdr/v1/backupdr_rest_test.rb | 2196 -------- .../google/cloud/backupdr/v1/backupdr_test.rb | 2613 --------- .../google-cloud-backupdr-v1/test/helper.rb | 25 - 126 files changed, 70 insertions(+), 31260 deletions(-) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/protection_summary_pb.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/proto_docs/google/cloud/backupdr/v1/protection_summary.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb (100%) rename {owl-bot-staging/google-cloud-backupdr-v1 => google-cloud-backupdr-v1}/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb delete mode 100644 owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb diff --git a/google-cloud-backupdr-v1/.owlbot-manifest.json b/google-cloud-backupdr-v1/.owlbot-manifest.json index 65d67c349918..7c341f383ce3 100644 --- a/google-cloud-backupdr-v1/.owlbot-manifest.json +++ b/google-cloud-backupdr-v1/.owlbot-manifest.json @@ -15,6 +15,13 @@ "google-cloud-backupdr-v1.gemspec", "lib/google-cloud-backupdr-v1.rb", "lib/google/cloud/backupdr/v1.rb", + "lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb", + "lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb", + "lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb", + "lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb", + "lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb", + "lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb", + "lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb", "lib/google/cloud/backupdr/v1/backupdr.rb", "lib/google/cloud/backupdr/v1/backupdr/client.rb", "lib/google/cloud/backupdr/v1/backupdr/credentials.rb", @@ -35,6 +42,8 @@ "lib/google/cloud/backupdr/v1/backupvault_pb.rb", "lib/google/cloud/backupdr/v1/bindings_override.rb", "lib/google/cloud/backupdr/v1/datasourcereference_pb.rb", + "lib/google/cloud/backupdr/v1/protection_summary_pb.rb", + "lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb", "lib/google/cloud/backupdr/v1/rest.rb", "lib/google/cloud/backupdr/v1/version.rb", "proto_docs/README.md", @@ -52,6 +61,7 @@ "proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb", "proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb", "proto_docs/google/cloud/backupdr/v1/datasourcereference.rb", + "proto_docs/google/cloud/backupdr/v1/protection_summary.rb", "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", "proto_docs/google/protobuf/duration.rb", @@ -64,6 +74,7 @@ "proto_docs/google/type/expr.rb", "proto_docs/google/type/month.rb", "snippets/Gemfile", + "snippets/backup_dr_protection_summary/list_resource_backup_configs.rb", "snippets/backupdr/create_backup_plan.rb", "snippets/backupdr/create_backup_plan_association.rb", "snippets/backupdr/create_backup_vault.rb", @@ -102,6 +113,9 @@ "snippets/backupdr/update_backup_vault.rb", "snippets/backupdr/update_data_source.rb", "snippets/snippet_metadata_google.cloud.backupdr.v1.json", + "test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb", + "test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb", + "test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb", "test/google/cloud/backupdr/v1/backupdr_operations_test.rb", "test/google/cloud/backupdr/v1/backupdr_paths_test.rb", "test/google/cloud/backupdr/v1/backupdr_rest_test.rb", diff --git a/google-cloud-backupdr-v1/gapic_metadata.json b/google-cloud-backupdr-v1/gapic_metadata.json index 8c1867fc2fc8..590f02f148a1 100644 --- a/google-cloud-backupdr-v1/gapic_metadata.json +++ b/google-cloud-backupdr-v1/gapic_metadata.json @@ -198,6 +198,20 @@ } } } + }, + "BackupDrProtectionSummary": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client", + "rpcs": { + "ListResourceBackupConfigs": { + "methods": [ + "list_resource_backup_configs" + ] + } + } + } + } } } } diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb index 35c0b953bf9f..76959762c891 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb @@ -17,6 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/backupdr/v1/backupdr" +require "google/cloud/backupdr/v1/backup_dr_protection_summary" require "google/cloud/backupdr/v1/version" module Google diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/client.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/credentials.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/paths.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/client.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backup_dr_protection_summary/rest/service_stub.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_pb.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb rename to google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/protection_summary_services_pb.rb diff --git a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb index 8d52866d5129..84f3712fd28f 100644 --- a/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb +++ b/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb @@ -17,6 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/backupdr/v1/backupdr/rest" +require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" require "google/cloud/backupdr/v1/bindings_override" require "google/cloud/backupdr/v1/version" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb b/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb rename to google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/protection_summary.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb b/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb rename to google-cloud-backupdr-v1/snippets/backup_dr_protection_summary/list_resource_backup_configs.rb diff --git a/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json index ad8beb1f189e..7ab8acaba73c 100644 --- a/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json +++ b/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json @@ -1490,6 +1490,46 @@ "type": "FULL" } ] + }, + { + "region_tag": "backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync", + "title": "Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs.", + "file": "backup_dr_protection_summary/list_resource_backup_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_backup_configs", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse", + "client": { + "short_name": "BackupDrProtectionSummary::Client", + "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client" + }, + "method": { + "short_name": "ListResourceBackupConfigs", + "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary.ListResourceBackupConfigs", + "service": { + "short_name": "BackupDrProtectionSummary", + "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb rename to google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_paths_test.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb rename to google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_rest_test.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb b/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb rename to google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backup_dr_protection_summary_test.rb diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.gitignore b/owl-bot-staging/google-cloud-backupdr-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json deleted file mode 100644 index 11a24894cf9d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.repo-metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "api_id": "backupdr.googleapis.com", - "api_shortname": "backupdr", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest", - "distribution_name": "google-cloud-backupdr-v1", - "is_cloud": true, - "language": "ruby", - "name": "backupdr", - "name_pretty": "Backup and DR Service V1 API", - "product_documentation": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc", - "ruby-cloud-path-override": "backup_dr=backupdr", - "ruby-cloud-namespace-override": "Backupdr=BackupDR", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml b/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml deleted file mode 100644 index cbd65e44ff07..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-backupdr-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-backupdr-v1.rb" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb b/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/.yardopts b/owl-bot-staging/google-cloud-backupdr-v1/.yardopts deleted file mode 100644 index 17df553d8c78..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Backup and DR Service V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md deleted file mode 100644 index d053ec6f167e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-backupdr-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-backupdr-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/backupdr/v1" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/backupdr/v1" - -::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-backupdr-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/backupdr/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md b/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/README.md b/owl-bot-staging/google-cloud-backupdr-v1/README.md deleted file mode 100644 index 39e91f6e239b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Backup and DR Service V1 API - -API Client library for the Backup and DR Service V1 API - -google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Backup and DR Service V1 API. Most users should consider using -the main client gem, -[google-cloud-backupdr](https://rubygems.org/gems/google-cloud-backupdr). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-backupdr-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/backupdr.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/backupdr/v1" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new -request = ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new # (request fields as keyword arguments...) -response = client.list_management_servers request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/backup-disaster-recovery/docs/reference/rpc) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/backupdr/v1" -require "logger" - -client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-backupdr`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-backupdr-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-backupdr`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-backupdr-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/Rakefile b/owl-bot-staging/google-cloud-backupdr-v1/Rakefile deleted file mode 100644 index 7990877ac4bf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-backupdr-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/backupdr/v1/backupdr/credentials" - ::Google::Cloud::BackupDR::V1::BackupDR::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-backupdr-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-backupdr-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-backupdr-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-backupdr-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-backupdr-v1" - header "google-cloud-backupdr-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-backupdr-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-backupdr-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-backupdr-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-backupdr-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json deleted file mode 100644 index 590f02f148a1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/gapic_metadata.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.backupdr.v1", - "libraryPackage": "::Google::Cloud::BackupDR::V1", - "services": { - "BackupDR": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDR::Client", - "rpcs": { - "ListManagementServers": { - "methods": [ - "list_management_servers" - ] - }, - "GetManagementServer": { - "methods": [ - "get_management_server" - ] - }, - "CreateManagementServer": { - "methods": [ - "create_management_server" - ] - }, - "DeleteManagementServer": { - "methods": [ - "delete_management_server" - ] - }, - "CreateBackupVault": { - "methods": [ - "create_backup_vault" - ] - }, - "ListBackupVaults": { - "methods": [ - "list_backup_vaults" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetch_usable_backup_vaults" - ] - }, - "GetBackupVault": { - "methods": [ - "get_backup_vault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "update_backup_vault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "delete_backup_vault" - ] - }, - "ListDataSources": { - "methods": [ - "list_data_sources" - ] - }, - "GetDataSource": { - "methods": [ - "get_data_source" - ] - }, - "UpdateDataSource": { - "methods": [ - "update_data_source" - ] - }, - "ListBackups": { - "methods": [ - "list_backups" - ] - }, - "FetchBackupsForResourceType": { - "methods": [ - "fetch_backups_for_resource_type" - ] - }, - "GetBackup": { - "methods": [ - "get_backup" - ] - }, - "UpdateBackup": { - "methods": [ - "update_backup" - ] - }, - "DeleteBackup": { - "methods": [ - "delete_backup" - ] - }, - "RestoreBackup": { - "methods": [ - "restore_backup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "create_backup_plan" - ] - }, - "UpdateBackupPlan": { - "methods": [ - "update_backup_plan" - ] - }, - "GetBackupPlan": { - "methods": [ - "get_backup_plan" - ] - }, - "ListBackupPlans": { - "methods": [ - "list_backup_plans" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "delete_backup_plan" - ] - }, - "GetBackupPlanRevision": { - "methods": [ - "get_backup_plan_revision" - ] - }, - "ListBackupPlanRevisions": { - "methods": [ - "list_backup_plan_revisions" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "create_backup_plan_association" - ] - }, - "UpdateBackupPlanAssociation": { - "methods": [ - "update_backup_plan_association" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "get_backup_plan_association" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "list_backup_plan_associations" - ] - }, - "FetchBackupPlanAssociationsForResourceType": { - "methods": [ - "fetch_backup_plan_associations_for_resource_type" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "delete_backup_plan_association" - ] - }, - "TriggerBackup": { - "methods": [ - "trigger_backup" - ] - }, - "GetDataSourceReference": { - "methods": [ - "get_data_source_reference" - ] - }, - "ListDataSourceReferences": { - "methods": [ - "list_data_source_references" - ] - }, - "FetchDataSourceReferencesForResourceType": { - "methods": [ - "fetch_data_source_references_for_resource_type" - ] - }, - "InitializeService": { - "methods": [ - "initialize_service" - ] - } - } - } - } - }, - "BackupDrProtectionSummary": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client", - "rpcs": { - "ListResourceBackupConfigs": { - "methods": [ - "list_resource_backup_configs" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec b/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec deleted file mode 100644 index 7f269ee27d8c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/google-cloud-backupdr-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/backupdr/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-backupdr-v1" - gem.version = Google::Cloud::BackupDR::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-backupdr-v1 is the official client library for the Backup and DR Service V1 API. Note that google-cloud-backupdr-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-backupdr instead. See the readme for more details." - gem.summary = "API Client library for the Backup and DR Service V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb deleted file mode 100644 index 7bea88dbd327..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google-cloud-backupdr-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/backupdr/v1" diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb deleted file mode 100644 index 978a9a0cc88f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/backupdr" -require "google/cloud/backupdr/v1/backup_dr_protection_summary" -require "google/cloud/backupdr/v1/version" - -module Google - module Cloud - module BackupDR - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/backupdr/v1" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/backupdr/v1" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/backupdr/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb deleted file mode 100644 index 9807b8cc2845..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/backupdr/v1/version" - -require "google/cloud/backupdr/v1/backupdr/credentials" -require "google/cloud/backupdr/v1/backupdr/paths" -require "google/cloud/backupdr/v1/backupdr/operations" -require "google/cloud/backupdr/v1/backupdr/client" -require "google/cloud/backupdr/v1/backupdr/rest" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The BackupDR Service - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/backupdr/v1/backupdr" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/backupdr/v1/backupdr/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module BackupDR - end - end - end - end -end - -helper_path = ::File.join __dir__, "backupdr", "helpers.rb" -require "google/cloud/backupdr/v1/backupdr/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb deleted file mode 100644 index 869e163a5b2c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/client.rb +++ /dev/null @@ -1,4786 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - ## - # Client for the BackupDR service. - # - # The BackupDR Service - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_stub - - ## - # Configure the BackupDR Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDR clients - # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_management_servers.timeout = 60.0 - default_config.rpcs.list_management_servers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_management_server.timeout = 60.0 - default_config.rpcs.get_management_server.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_management_server.timeout = 60.0 - - default_config.rpcs.delete_management_server.timeout = 60.0 - - default_config.rpcs.create_backup_vault.timeout = 60.0 - default_config.rpcs.create_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_backup_vaults.timeout = 60.0 - default_config.rpcs.list_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 - default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_vault.timeout = 60.0 - default_config.rpcs.get_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_vault.timeout = 60.0 - - default_config.rpcs.delete_backup_vault.timeout = 60.0 - default_config.rpcs.delete_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_sources.timeout = 60.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_source.timeout = 60.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_source.timeout = 60.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup.timeout = 60.0 - - default_config.rpcs.restore_backup.timeout = 60.0 - - default_config.rpcs.initialize_service.timeout = 60.0 - default_config.rpcs.initialize_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDR Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @backup_dr_stub.universe_domain - end - - ## - # Create a new BackupDR client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDR client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/backupdr/v1/backupdr_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @backup_dr_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BackupDR::V1::BackupDR::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @backup_dr_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BackupDR::V1::BackupDR::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @backup_dr_stub.logger - end - - # Service calls - - ## - # Lists ManagementServers in a given project and location. - # - # @overload list_management_servers(request, options = nil) - # Pass arguments to `list_management_servers` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_management_servers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - # - # # Call the list_management_servers method. - # result = client.list_management_servers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - # p item - # end - # - def list_management_servers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_management_servers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_management_servers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_management_servers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_management_servers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ManagementServer. - # - # @overload get_management_server(request, options = nil) - # Pass arguments to `get_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_management_server(name: nil) - # Pass arguments to `get_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - # - # # Call the get_management_server method. - # result = client.get_management_server request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - # p result - # - def get_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_management_server, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new ManagementServer in a given project and location. - # - # @overload create_management_server(request, options = nil) - # Pass arguments to `create_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) - # Pass arguments to `create_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @param management_server_id [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - # - # # Call the create_management_server method. - # result = client.create_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_management_server, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ManagementServer. - # - # @overload delete_management_server(request, options = nil) - # Pass arguments to `delete_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_management_server(name: nil, request_id: nil) - # Pass arguments to `delete_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - # - # # Call the delete_management_server method. - # result = client.delete_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_management_server.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_management_server, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new BackupVault in a given project and location. - # - # @overload create_backup_vault(request, options = nil) - # Pass arguments to `create_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param backup_vault_id [::String] - # 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 - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # 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). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - # - # # Call the create_backup_vault method. - # result = client.create_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupVaults in a given project and location. - # - # @overload list_backup_vaults(request, options = nil) - # Pass arguments to `list_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - # - # # Call the list_backup_vaults method. - # result = client.list_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def list_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - # - # @overload fetch_usable_backup_vaults(request, options = nil) - # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - # - # # Call the fetch_usable_backup_vaults method. - # result = client.fetch_usable_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def fetch_usable_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_usable_backup_vaults, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a BackupVault. - # - # @overload get_backup_vault(request, options = nil) - # Pass arguments to `get_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_vault(name: nil, view: nil) - # Pass arguments to `get_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - # - # # Call the get_backup_vault method. - # result = client.get_backup_vault request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - # p result - # - def get_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_vault, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a BackupVault. - # - # @overload update_backup_vault(request, options = nil) - # Pass arguments to `update_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) - # Pass arguments to `update_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # 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). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param force [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @param force_update_access_restriction [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - # - # # Call the update_backup_vault method. - # result = client.update_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_vault&.name - header_params["backup_vault.name"] = request.backup_vault.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a BackupVault. - # - # @overload delete_backup_vault(request, options = nil) - # Pass arguments to `delete_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) - # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # 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). - # @param force [::Boolean] - # Optional. If set to true, any data source from this backup vault will also - # be deleted. - # @param etag [::String] - # 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. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param allow_missing [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @param ignore_backup_plan_references [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - # - # # Call the delete_backup_vault method. - # result = client.delete_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataSources in a given project and location. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_data_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a DataSource. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a DataSource. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # 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). - # @param allow_missing [::Boolean] - # Optional. Enable upsert. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_source&.name - header_params["data_source.name"] = request.data_source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_data_source, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Backups in a given project and location. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch Backups for a given resource type. - # - # @overload fetch_backups_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - # - # # Call the fetch_backups_for_resource_type method. - # result = client.fetch_backups_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def fetch_backups_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_backups_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_backups_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_backups_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a Backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup(name: nil, view: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::Backup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a Backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup(update_mask: nil, backup: nil, request_id: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup&.name - header_params["backup.name"] = request.backup.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup(name: nil, request_id: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restore from a Backup - # - # @overload restore_backup(request, options = nil) - # Pass arguments to `restore_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) - # Pass arguments to `restore_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @param request_id [::String] - # 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). - # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] - # Compute Engine target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] - # Disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] - # Region disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] - # Disk properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - # - # # Call the restore_backup method. - # result = client.restore_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restore_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.restore_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :restore_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlan - # - # @overload create_backup_plan(request, options = nil) - # Pass arguments to `create_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) - # Pass arguments to `create_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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**. - # @param backup_plan_id [::String] - # 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}/. - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The `BackupPlan` resource object to create. - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - # - # # Call the create_backup_plan method. - # result = client.create_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a BackupPlan. - # - # @overload update_backup_plan(request, options = nil) - # Pass arguments to `update_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - # - # # Call the update_backup_plan method. - # result = client.update_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_plan&.name - header_params["backup_plan.name"] = request.backup_plan.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlan. - # - # @overload get_backup_plan(request, options = nil) - # Pass arguments to `get_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_plan(name: nil) - # Pass arguments to `get_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - # - # # Call the get_backup_plan method. - # result = client.get_backup_plan request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - # p result - # - def get_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlans in a given project and location. - # - # @overload list_backup_plans(request, options = nil) - # Pass arguments to `list_backup_plans` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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 - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - # - # # Call the list_backup_plans method. - # result = client.list_backup_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - # p item - # end - # - def list_backup_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plans, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlan. - # - # @overload delete_backup_plan(request, options = nil) - # Pass arguments to `delete_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_plan(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - # - # # Call the delete_backup_plan method. - # result = client.delete_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_plan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanRevision. - # - # @overload get_backup_plan_revision(request, options = nil) - # Pass arguments to `get_backup_plan_revision` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_plan_revision(name: nil) - # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - # - # # Call the get_backup_plan_revision method. - # result = client.get_backup_plan_revision request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p result - # - def get_backup_plan_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlanRevisions in a given project and location. - # - # @overload list_backup_plan_revisions(request, options = nil) - # Pass arguments to `list_backup_plan_revisions` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @param page_size [::Integer] - # 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 - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - # - # # Call the list_backup_plan_revisions method. - # result = client.list_backup_plan_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p item - # end - # - def list_backup_plan_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plan_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlanAssociation - # - # @overload create_backup_plan_association(request, options = nil) - # Pass arguments to `create_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) - # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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**. - # @param backup_plan_association_id [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - # - # # Call the create_backup_plan_association method. - # result = client.create_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :create_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a BackupPlanAssociation. - # - # @overload update_backup_plan_association(request, options = nil) - # Pass arguments to `update_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - # - # # Call the update_backup_plan_association method. - # result = client.update_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_plan_association&.name - header_params["backup_plan_association.name"] = request.backup_plan_association.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :update_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanAssociation. - # - # @overload get_backup_plan_association(request, options = nil) - # Pass arguments to `get_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_plan_association(name: nil) - # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - # - # # Call the get_backup_plan_association method. - # result = client.get_backup_plan_association request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p result - # - def get_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_backup_plan_association, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlanAssociations in a given project and location. - # - # @overload list_backup_plan_associations(request, options = nil) - # Pass arguments to `list_backup_plan_associations` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - # - # # Call the list_backup_plan_associations method. - # result = client.list_backup_plan_associations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def list_backup_plan_associations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_backup_plan_associations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List BackupPlanAssociations for a given resource type. - # - # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - # - # # Call the fetch_backup_plan_associations_for_resource_type method. - # result = client.fetch_backup_plan_associations_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def fetch_backup_plan_associations_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_backup_plan_associations_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlanAssociation. - # - # @overload delete_backup_plan_association(request, options = nil) - # Pass arguments to `delete_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_plan_association(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - # - # # Call the delete_backup_plan_association method. - # result = client.delete_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :delete_backup_plan_association, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Triggers a new Backup. - # - # @overload trigger_backup(request, options = nil) - # Pass arguments to `trigger_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) - # Pass arguments to `trigger_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param rule_id [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @param request_id [::String] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - # - # # Call the trigger_backup method. - # result = client.trigger_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def trigger_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.trigger_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.trigger_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :trigger_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single DataSourceReference. - # - # @overload get_data_source_reference(request, options = nil) - # Pass arguments to `get_data_source_reference` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_source_reference(name: nil) - # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - # - # # Call the get_data_source_reference method. - # result = client.get_data_source_reference request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - # p result - # - def get_data_source_reference request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_source_reference.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source_reference.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :get_data_source_reference, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataSourceReferences for a given project and location. - # - # @overload list_data_source_references(request, options = nil) - # Pass arguments to `list_data_source_references` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_source_references` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - # - # # Call the list_data_source_references method. - # result = client.list_data_source_references request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def list_data_source_references request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_source_references.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_source_references.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :list_data_source_references, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch DataSourceReferences for a given project, location and resource type. - # - # @overload fetch_data_source_references_for_resource_type(request, options = nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - # - # # Call the fetch_data_source_references_for_resource_type method. - # result = client.fetch_data_source_references_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def fetch_data_source_references_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :fetch_data_source_references_for_resource_type, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Initializes the service related config for a project. - # - # @overload initialize_service(request, options = nil) - # Pass arguments to `initialize_service` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) - # Pass arguments to `initialize_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @param resource_type [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @param request_id [::String] - # 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). - # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] - # Optional. The configuration for initializing a Cloud SQL instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - # - # # Call the initialize_service method. - # result = client.initialize_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def initialize_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.initialize_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.initialize_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.call_rpc :initialize_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BackupDR API. - # - # This class represents the configuration for BackupDR, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_management_servers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDR::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BackupDR API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_management_servers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_management_servers - ## - # RPC-specific configuration for `get_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :get_management_server - ## - # RPC-specific configuration for `create_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :create_management_server - ## - # RPC-specific configuration for `delete_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_management_server - ## - # RPC-specific configuration for `create_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_vault - ## - # RPC-specific configuration for `list_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_vaults - ## - # RPC-specific configuration for `fetch_usable_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_usable_backup_vaults - ## - # RPC-specific configuration for `get_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_vault - ## - # RPC-specific configuration for `update_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_vault - ## - # RPC-specific configuration for `delete_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_vault - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `fetch_backups_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backups_for_resource_type - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `restore_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_backup - ## - # RPC-specific configuration for `create_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan - ## - # RPC-specific configuration for `update_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan - ## - # RPC-specific configuration for `get_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan - ## - # RPC-specific configuration for `list_backup_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plans - ## - # RPC-specific configuration for `delete_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan - ## - # RPC-specific configuration for `get_backup_plan_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_revision - ## - # RPC-specific configuration for `list_backup_plan_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_revisions - ## - # RPC-specific configuration for `create_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan_association - ## - # RPC-specific configuration for `update_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan_association - ## - # RPC-specific configuration for `get_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_association - ## - # RPC-specific configuration for `list_backup_plan_associations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_associations - ## - # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backup_plan_associations_for_resource_type - ## - # RPC-specific configuration for `delete_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan_association - ## - # RPC-specific configuration for `trigger_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_backup - ## - # RPC-specific configuration for `get_data_source_reference` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source_reference - ## - # RPC-specific configuration for `list_data_source_references` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_source_references - ## - # RPC-specific configuration for `fetch_data_source_references_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source_references_for_resource_type - ## - # RPC-specific configuration for `initialize_service` - # @return [::Gapic::Config::Method] - # - attr_reader :initialize_service - - # @private - def initialize parent_rpcs = nil - list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers - @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config - get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server - @get_management_server = ::Gapic::Config::Method.new get_management_server_config - create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server - @create_management_server = ::Gapic::Config::Method.new create_management_server_config - delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server - @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config - create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault - @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config - list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults - @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config - fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults - @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config - get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault - @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config - update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault - @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config - delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault - @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type - @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup - @restore_backup = ::Gapic::Config::Method.new restore_backup_config - create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan - @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config - update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan - @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config - get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan - @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config - list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans - @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config - delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan - @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config - get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision - @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config - list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions - @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config - create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association - @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config - update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association - @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config - get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association - @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config - list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations - @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config - fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type - @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config - delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association - @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config - trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup - @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config - get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference - @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config - list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references - @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config - fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type - @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config - initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service - @initialize_service = ::Gapic::Config::Method.new initialize_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb deleted file mode 100644 index f6fc3fd1ca69..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # Credentials for the BackupDR API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb deleted file mode 100644 index 6eeece6aaa79..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BackupDR Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDR Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb deleted file mode 100644 index ab31d1858c98..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/paths.rb +++ /dev/null @@ -1,290 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # Path helper methods for the BackupDR API. - module Paths - ## - # Create a fully-qualified Backup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # @param datasource [String] - # @param backup [String] - # - # @return [::String] - def backup_path project:, location:, backupvault:, datasource:, backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" - raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}/backups/#{backup}" - end - - ## - # Create a fully-qualified BackupPlan resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # - # @return [::String] - def backup_plan_path project:, location:, backup_plan: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}" - end - - ## - # Create a fully-qualified BackupPlanAssociation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}` - # - # @param project [String] - # @param location [String] - # @param backup_plan_association [String] - # - # @return [::String] - def backup_plan_association_path project:, location:, backup_plan_association: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlanAssociations/#{backup_plan_association}" - end - - ## - # Create a fully-qualified BackupPlanRevision resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # @param revision [String] - # - # @return [::String] - def backup_plan_revision_path project:, location:, backup_plan:, revision: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/revisions/#{revision}" - end - - ## - # Create a fully-qualified BackupVault resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # - # @return [::String] - def backup_vault_path project:, location:, backupvault: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}` - # - # @param project [String] - # @param location [String] - # @param ring [String] - # @param key [String] - # - # @return [::String] - def crypto_key_path project:, location:, ring:, key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "ring cannot contain /" if ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{ring}/cryptoKeys/#{key}" - end - - ## - # Create a fully-qualified CryptoKeyVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # @param crypto_key_version [String] - # - # @return [::String] - def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" - end - - ## - # Create a fully-qualified DataSource resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}` - # - # @param project [String] - # @param location [String] - # @param backupvault [String] - # @param datasource [String] - # - # @return [::String] - def data_source_path project:, location:, backupvault:, datasource: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}" - end - - ## - # Create a fully-qualified DataSourceReference resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}` - # - # @param project [String] - # @param location [String] - # @param data_source_reference [String] - # - # @return [::String] - def data_source_reference_path project:, location:, data_source_reference: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataSourceReferences/#{data_source_reference}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}` - # - # @param project [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/instances/#{instance}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified ManagementServer resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/managementServers/{managementserver}` - # - # @param project [String] - # @param location [String] - # @param managementserver [String] - # - # @return [::String] - def management_server_path project:, location:, managementserver: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/managementServers/#{managementserver}" - end - - ## - # Create a fully-qualified StoragePool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/zones/{zone}/storagePools/{storage_pool}` - # - # @param project [String] - # @param zone [String] - # @param storage_pool [String] - # - # @return [::String] - def storage_pool_path project:, zone:, storage_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/zones/#{zone}/storagePools/#{storage_pool}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb deleted file mode 100644 index 5b7fba263be4..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/backupdr/v1/version" -require "google/cloud/backupdr/v1/bindings_override" - -require "google/cloud/backupdr/v1/backupdr/credentials" -require "google/cloud/backupdr/v1/backupdr/paths" -require "google/cloud/backupdr/v1/backupdr/rest/operations" -require "google/cloud/backupdr/v1/backupdr/rest/client" - -module Google - module Cloud - module BackupDR - module V1 - ## - # The BackupDR Service - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/backupdr/v1/backupdr/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module BackupDR - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/backupdr/v1/backupdr/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb deleted file mode 100644 index 343bd216f57b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb +++ /dev/null @@ -1,4493 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - module Rest - ## - # REST client for the BackupDR service. - # - # The BackupDR Service - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_dr_stub - - ## - # Configure the BackupDR Client class. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupDR clients - # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_management_servers.timeout = 60.0 - default_config.rpcs.list_management_servers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_management_server.timeout = 60.0 - default_config.rpcs.get_management_server.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_management_server.timeout = 60.0 - - default_config.rpcs.delete_management_server.timeout = 60.0 - - default_config.rpcs.create_backup_vault.timeout = 60.0 - default_config.rpcs.create_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_backup_vaults.timeout = 60.0 - default_config.rpcs.list_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0 - default_config.rpcs.fetch_usable_backup_vaults.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_vault.timeout = 60.0 - default_config.rpcs.get_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_vault.timeout = 60.0 - - default_config.rpcs.delete_backup_vault.timeout = 60.0 - default_config.rpcs.delete_backup_vault.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_sources.timeout = 60.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_source.timeout = 60.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_source.timeout = 60.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup.timeout = 60.0 - - default_config.rpcs.restore_backup.timeout = 60.0 - - default_config.rpcs.initialize_service.timeout = 60.0 - default_config.rpcs.initialize_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDR Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @backup_dr_stub.universe_domain - end - - ## - # Create a new BackupDR REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupDR client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @backup_dr_stub = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @backup_dr_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @backup_dr_stub.endpoint - config.universe_domain = @backup_dr_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_dr_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @backup_dr_stub.logger - end - - # Service calls - - ## - # Lists ManagementServers in a given project and location. - # - # @overload list_management_servers(request, options = nil) - # Pass arguments to `list_management_servers` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListManagementServersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_management_servers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - # - # # Call the list_management_servers method. - # result = client.list_management_servers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - # p item - # end - # - def list_management_servers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListManagementServersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_management_servers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_management_servers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_management_servers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_management_servers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_management_servers, "management_servers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ManagementServer. - # - # @overload get_management_server(request, options = nil) - # Pass arguments to `get_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_management_server(name: nil) - # Pass arguments to `get_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - # - # # Call the get_management_server method. - # result = client.get_management_server request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - # p result - # - def get_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_management_server request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new ManagementServer in a given project and location. - # - # @overload create_management_server(request, options = nil) - # Pass arguments to `create_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) - # Pass arguments to `create_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @param management_server_id [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @param management_server [::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - # - # # Call the create_management_server method. - # result = client.create_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_management_server request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ManagementServer. - # - # @overload delete_management_server(request, options = nil) - # Pass arguments to `delete_management_server` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_management_server(name: nil, request_id: nil) - # Pass arguments to `delete_management_server` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - # - # # Call the delete_management_server method. - # result = client.delete_management_server request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_management_server request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_management_server.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_management_server.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_management_server.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_management_server request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new BackupVault in a given project and location. - # - # @overload create_backup_vault(request, options = nil) - # Pass arguments to `create_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param backup_vault_id [::String] - # 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 - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # 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). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - # - # # Call the create_backup_vault method. - # result = client.create_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupVaults in a given project and location. - # - # @overload list_backup_vaults(request, options = nil) - # Pass arguments to `list_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - # - # # Call the list_backup_vaults method. - # result = client.list_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def list_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_vaults request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_vaults, "backup_vaults", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - # - # @overload fetch_usable_backup_vaults(request, options = nil) - # Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - # - # # Call the fetch_usable_backup_vaults method. - # result = client.fetch_usable_backup_vaults request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - # p item - # end - # - def fetch_usable_backup_vaults request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_usable_backup_vaults request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_usable_backup_vaults, "backup_vaults", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a BackupVault. - # - # @overload get_backup_vault(request, options = nil) - # Pass arguments to `get_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_vault(name: nil, view: nil) - # Pass arguments to `get_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @param view [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - # - # # Call the get_backup_vault method. - # result = client.get_backup_vault request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - # p result - # - def get_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_vault request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a BackupVault. - # - # @overload update_backup_vault(request, options = nil) - # Pass arguments to `update_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil) - # Pass arguments to `update_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # 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). - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param force [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @param force_update_access_restriction [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - # - # # Call the update_backup_vault method. - # result = client.update_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a BackupVault. - # - # @overload delete_backup_vault(request, options = nil) - # Pass arguments to `delete_backup_vault` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil, ignore_backup_plan_references: nil) - # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # 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). - # @param force [::Boolean] - # Optional. If set to true, any data source from this backup vault will also - # be deleted. - # @param etag [::String] - # 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. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @param allow_missing [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @param ignore_backup_plan_references [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - # - # # Call the delete_backup_vault method. - # result = client.delete_backup_vault request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_vault request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup_vault.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_vault.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_vault request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataSources in a given project and location. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_data_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_sources, "data_sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a DataSource. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a DataSource. - # - # @overload update_data_source(request, options = nil) - # Pass arguments to `update_data_source` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) - # Pass arguments to `update_data_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # 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). - # @param allow_missing [::Boolean] - # Optional. Enable upsert. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - # - # # Call the update_data_source method. - # result = client.update_data_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_data_source request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Backups in a given project and location. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backups, "backups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch Backups for a given resource type. - # - # @overload fetch_backups_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backups_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_backups_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) - # Pass arguments to `fetch_backups_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - # - # # Call the fetch_backups_for_resource_type method. - # result = client.fetch_backups_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - # p item - # end - # - def fetch_backups_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_backups_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_backups_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_backups_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_backups_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backups_for_resource_type, "backups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a Backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup(name: nil, view: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @param view [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the settings of a Backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup(update_mask: nil, backup: nil, request_id: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup(name: nil, request_id: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restore from a Backup - # - # @overload restore_backup(request, options = nil) - # Pass arguments to `restore_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil, clear_overrides_field_mask: nil) - # Pass arguments to `restore_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @param request_id [::String] - # 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). - # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash] - # Compute Engine target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash] - # Disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash] - # Region disk target environment to be used during restore. - # - # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash] - # Disk properties to be overridden during restore. - # - # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param clear_overrides_field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - # - # # Call the restore_backup method. - # result = client.restore_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restore_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restore_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.restore_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlan - # - # @overload create_backup_plan(request, options = nil) - # Pass arguments to `create_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) - # Pass arguments to `create_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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**. - # @param backup_plan_id [::String] - # 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}/. - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The `BackupPlan` resource object to create. - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - # - # # Call the create_backup_plan method. - # result = client.create_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a BackupPlan. - # - # @overload update_backup_plan(request, options = nil) - # Pass arguments to `update_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - # - # # Call the update_backup_plan method. - # result = client.update_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlan. - # - # @overload get_backup_plan(request, options = nil) - # Pass arguments to `get_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_plan(name: nil) - # Pass arguments to `get_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - # - # # Call the get_backup_plan method. - # result = client.get_backup_plan request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - # p result - # - def get_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlans in a given project and location. - # - # @overload list_backup_plans(request, options = nil) - # Pass arguments to `list_backup_plans` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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 - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - # - # # Call the list_backup_plans method. - # result = client.list_backup_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - # p item - # end - # - def list_backup_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plans request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plans, "backup_plans", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlan. - # - # @overload delete_backup_plan(request, options = nil) - # Pass arguments to `delete_backup_plan` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_plan(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - # - # # Call the delete_backup_plan method. - # result = client.delete_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_plan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanRevision. - # - # @overload get_backup_plan_revision(request, options = nil) - # Pass arguments to `get_backup_plan_revision` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_plan_revision(name: nil) - # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - # - # # Call the get_backup_plan_revision method. - # result = client.get_backup_plan_revision request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p result - # - def get_backup_plan_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlanRevisions in a given project and location. - # - # @overload list_backup_plan_revisions(request, options = nil) - # Pass arguments to `list_backup_plan_revisions` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @param page_size [::Integer] - # 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 - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - # - # # Call the list_backup_plan_revisions method. - # result = client.list_backup_plan_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - # p item - # end - # - def list_backup_plan_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plan_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, "backup_plan_revisions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a BackupPlanAssociation - # - # @overload create_backup_plan_association(request, options = nil) - # Pass arguments to `create_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) - # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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**. - # @param backup_plan_association_id [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - # - # # Call the create_backup_plan_association method. - # result = client.create_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.create_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a BackupPlanAssociation. - # - # @overload update_backup_plan_association(request, options = nil) - # Pass arguments to `update_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash] - # Required. The resource being updated - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - # - # # Call the update_backup_plan_association method. - # result = client.update_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.update_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single BackupPlanAssociation. - # - # @overload get_backup_plan_association(request, options = nil) - # Pass arguments to `get_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_plan_association(name: nil) - # Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - # - # # Call the get_backup_plan_association method. - # result = client.get_backup_plan_association request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p result - # - def get_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_backup_plan_association request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BackupPlanAssociations in a given project and location. - # - # @overload list_backup_plan_associations(request, options = nil) - # Pass arguments to `list_backup_plan_associations` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - # - # # Call the list_backup_plan_associations method. - # result = client.list_backup_plan_associations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def list_backup_plan_associations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_backup_plan_associations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_associations, "backup_plan_associations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List BackupPlanAssociations for a given resource type. - # - # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - # - # # Call the fetch_backup_plan_associations_for_resource_type method. - # result = client.fetch_backup_plan_associations_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - # p item - # end - # - def fetch_backup_plan_associations_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_backup_plan_associations_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, "backup_plan_associations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single BackupPlanAssociation. - # - # @overload delete_backup_plan_association(request, options = nil) - # Pass arguments to `delete_backup_plan_association` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_plan_association(name: nil, request_id: nil) - # Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - # - # # Call the delete_backup_plan_association method. - # result = client.delete_backup_plan_association request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_backup_plan_association request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.delete_backup_plan_association request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Triggers a new Backup. - # - # @overload trigger_backup(request, options = nil) - # Pass arguments to `trigger_backup` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload trigger_backup(name: nil, rule_id: nil, request_id: nil) - # Pass arguments to `trigger_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @param rule_id [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @param request_id [::String] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - # - # # Call the trigger_backup method. - # result = client.trigger_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def trigger_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.trigger_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.trigger_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.trigger_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single DataSourceReference. - # - # @overload get_data_source_reference(request, options = nil) - # Pass arguments to `get_data_source_reference` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_source_reference(name: nil) - # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - # - # # Call the get_data_source_reference method. - # result = client.get_data_source_reference request - # - # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - # p result - # - def get_data_source_reference request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_source_reference.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source_reference.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.get_data_source_reference request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataSourceReferences for a given project and location. - # - # @overload list_data_source_references(request, options = nil) - # Pass arguments to `list_data_source_references` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_source_references(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_source_references` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - # - # # Call the list_data_source_references method. - # result = client.list_data_source_references request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def list_data_source_references request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_source_references.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_source_references.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_source_references.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.list_data_source_references request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_data_source_references, "data_source_references", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch DataSourceReferences for a given project, location and resource type. - # - # @overload fetch_data_source_references_for_resource_type(request, options = nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @param resource_type [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @param page_size [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @param order_by [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - # - # # Call the fetch_data_source_references_for_resource_type method. - # result = client.fetch_data_source_references_for_resource_type request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - # p item - # end - # - def fetch_data_source_references_for_resource_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.fetch_data_source_references_for_resource_type request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, "data_source_references", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Initializes the service related config for a project. - # - # @overload initialize_service(request, options = nil) - # Pass arguments to `initialize_service` via a request object, either of type - # {::Google::Cloud::BackupDR::V1::InitializeServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil) - # Pass arguments to `initialize_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @param resource_type [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @param request_id [::String] - # 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). - # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash] - # Optional. The configuration for initializing a Cloud SQL instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/backupdr/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - # - # # Call the initialize_service method. - # result = client.initialize_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def initialize_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::InitializeServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.initialize_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.initialize_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.initialize_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_dr_stub.initialize_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BackupDR REST API. - # - # This class represents the configuration for BackupDR REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_management_servers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_management_servers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the BackupDR API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_management_servers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_management_servers - ## - # RPC-specific configuration for `get_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :get_management_server - ## - # RPC-specific configuration for `create_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :create_management_server - ## - # RPC-specific configuration for `delete_management_server` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_management_server - ## - # RPC-specific configuration for `create_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_vault - ## - # RPC-specific configuration for `list_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_vaults - ## - # RPC-specific configuration for `fetch_usable_backup_vaults` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_usable_backup_vaults - ## - # RPC-specific configuration for `get_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_vault - ## - # RPC-specific configuration for `update_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_vault - ## - # RPC-specific configuration for `delete_backup_vault` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_vault - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `update_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_source - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `fetch_backups_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backups_for_resource_type - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `restore_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_backup - ## - # RPC-specific configuration for `create_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan - ## - # RPC-specific configuration for `update_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan - ## - # RPC-specific configuration for `get_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan - ## - # RPC-specific configuration for `list_backup_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plans - ## - # RPC-specific configuration for `delete_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan - ## - # RPC-specific configuration for `get_backup_plan_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_revision - ## - # RPC-specific configuration for `list_backup_plan_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_revisions - ## - # RPC-specific configuration for `create_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan_association - ## - # RPC-specific configuration for `update_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan_association - ## - # RPC-specific configuration for `get_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_association - ## - # RPC-specific configuration for `list_backup_plan_associations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_associations - ## - # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_backup_plan_associations_for_resource_type - ## - # RPC-specific configuration for `delete_backup_plan_association` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan_association - ## - # RPC-specific configuration for `trigger_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :trigger_backup - ## - # RPC-specific configuration for `get_data_source_reference` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source_reference - ## - # RPC-specific configuration for `list_data_source_references` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_source_references - ## - # RPC-specific configuration for `fetch_data_source_references_for_resource_type` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_data_source_references_for_resource_type - ## - # RPC-specific configuration for `initialize_service` - # @return [::Gapic::Config::Method] - # - attr_reader :initialize_service - - # @private - def initialize parent_rpcs = nil - list_management_servers_config = parent_rpcs.list_management_servers if parent_rpcs.respond_to? :list_management_servers - @list_management_servers = ::Gapic::Config::Method.new list_management_servers_config - get_management_server_config = parent_rpcs.get_management_server if parent_rpcs.respond_to? :get_management_server - @get_management_server = ::Gapic::Config::Method.new get_management_server_config - create_management_server_config = parent_rpcs.create_management_server if parent_rpcs.respond_to? :create_management_server - @create_management_server = ::Gapic::Config::Method.new create_management_server_config - delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server - @delete_management_server = ::Gapic::Config::Method.new delete_management_server_config - create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault - @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config - list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults - @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config - fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults - @fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config - get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault - @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config - update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault - @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config - delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault - @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source - @update_data_source = ::Gapic::Config::Method.new update_data_source_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - fetch_backups_for_resource_type_config = parent_rpcs.fetch_backups_for_resource_type if parent_rpcs.respond_to? :fetch_backups_for_resource_type - @fetch_backups_for_resource_type = ::Gapic::Config::Method.new fetch_backups_for_resource_type_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup - @restore_backup = ::Gapic::Config::Method.new restore_backup_config - create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan - @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config - update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan - @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config - get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan - @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config - list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans - @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config - delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan - @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config - get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision - @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config - list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions - @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config - create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association - @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config - update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association - @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config - get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association - @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config - list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations - @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config - fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type - @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config - delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association - @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config - trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup - @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config - get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference - @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config - list_data_source_references_config = parent_rpcs.list_data_source_references if parent_rpcs.respond_to? :list_data_source_references - @list_data_source_references = ::Gapic::Config::Method.new list_data_source_references_config - fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type - @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config - initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service - @initialize_service = ::Gapic::Config::Method.new initialize_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb deleted file mode 100644 index 382f29324032..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BackupDR Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupDR Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BackupDR::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "backupdr.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb deleted file mode 100644 index c6ef2555cab9..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb +++ /dev/null @@ -1,2350 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/backupdr_pb" - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - module Rest - ## - # REST service stub for the BackupDR service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_management_servers REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListManagementServersResponse] - # A result object deserialized from the server's reply - def list_management_servers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_management_servers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_management_servers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # A result object deserialized from the server's reply - def get_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ManagementServer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_management_server request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_management_server_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_management_server", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_backup_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse] - # A result object deserialized from the server's reply - def list_backup_vaults request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_vaults", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_usable_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse] - # A result object deserialized from the server's reply - def fetch_usable_backup_vaults request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_usable_backup_vaults_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_usable_backup_vaults", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # A result object deserialized from the server's reply - def get_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupVault.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_backup_vault request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup_vault", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse] - # A result object deserialized from the server's reply - def list_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # A result object deserialized from the server's reply - def get_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::DataSource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backups REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupsResponse] - # A result object deserialized from the server's reply - def list_backups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_backups_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_backups_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backups_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_backups_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::Backup] - # A result object deserialized from the server's reply - def get_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::Backup.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restore_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def restore_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restore_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # A result object deserialized from the server's reply - def get_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlan.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_plans REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse] - # A result object deserialized from the server's reply - def list_backup_plans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_plans", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_plan_revision REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision] - # A result object deserialized from the server's reply - def get_backup_plan_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_plan_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_plan_revisions REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse] - # A result object deserialized from the server's reply - def list_backup_plan_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_plan_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_backup_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # A result object deserialized from the server's reply - def get_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_plan_associations REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse] - # A result object deserialized from the server's reply - def list_backup_plan_associations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_associations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_plan_associations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_backup_plan_associations_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_backup_plan_associations_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_backup_plan_associations_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_backup_plan_association request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_association_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup_plan_association", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the trigger_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def trigger_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_trigger_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "trigger_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_data_source_reference REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::DataSourceReference] - # A result object deserialized from the server's reply - def get_data_source_reference request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_reference_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_source_reference", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::DataSourceReference.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_data_source_references REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse] - # A result object deserialized from the server's reply - def list_data_source_references request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_source_references_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_source_references", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_data_source_references_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse] - # A result object deserialized from the server's reply - def fetch_data_source_references_for_resource_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_data_source_references_for_resource_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_data_source_references_for_resource_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the initialize_service REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def initialize_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_initialize_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "initialize_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_management_servers REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListManagementServersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_management_servers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/managementServers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetManagementServerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateManagementServerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/managementServers", - body: "management_server", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_management_server REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_management_server_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_backup_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupVaults", - body: "backup_vault", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_vaults_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupVaults", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_usable_backup_vaults REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_usable_backup_vaults_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupVaults:fetchUsable", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_vault.name}", - body: "backup_vault", - matches: [ - ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_vault REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_vault_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSources", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_source REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_source.name}", - body: "data_source", - matches: [ - ["data_source.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backups REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_backups_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_backups_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup.name}", - body: "backup", - matches: [ - ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::RestoreBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restore_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:restore", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupPlans", - body: "backup_plan", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_plan.name}", - body: "backup_plan", - matches: [ - ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plans REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_plans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlans", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_plan REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan_revision REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_plan_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/revisions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plan_revisions REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_plan_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/revisions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_backup_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupPlanAssociations", - body: "backup_plan_association", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_plan_association.name}", - body: "backup_plan_association", - matches: [ - ["backup_plan_association.name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plan_associations REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_plan_associations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlanAssociations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_backup_plan_associations_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_backup_plan_associations_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlanAssociations:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_plan_association REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_plan_association_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the trigger_backup REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::TriggerBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_trigger_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:triggerBackup", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlanAssociations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_source_reference REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_source_reference_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataSourceReferences/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_source_references REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_source_references_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSourceReferences", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_data_source_references_for_resource_type REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_data_source_references_for_resource_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSourceReferences:fetchForResourceType", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the initialize_service REST call - # - # @param request_pb [::Google::Cloud::BackupDR::V1::InitializeServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_initialize_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:initialize", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb deleted file mode 100644 index 3d9f31b6c12a..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_pb.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupdr.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupplan_pb' -require 'google/cloud/backupdr/v1/backupplanassociation_pb' -require 'google/cloud/backupdr/v1/backupvault_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/cloud/backupdr/v1/datasourcereference_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n\'google/cloud/backupdr/v1/backupdr.proto\x12\x18google.cloud.backupdr.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/backupdr/v1/backupplan.proto\x1a\x34google/cloud/backupdr/v1/backupplanassociation.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x32google/cloud/backupdr/v1/datasourcereference.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbe\x01\n\rNetworkConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cpeering_mode\x18\x02 \x01(\x0e\x32\x33.google.cloud.backupdr.v1.NetworkConfig.PeeringModeB\x03\xe0\x41\x01\"G\n\x0bPeeringMode\x12\x1c\n\x18PEERING_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x01\"6\n\rManagementURI\x12\x13\n\x06web_ui\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\"w\n#WorkforceIdentityBasedManagementURI\x12\'\n\x1a\x66irst_party_management_uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1athird_party_management_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"|\n$WorkforceIdentityBasedOAuth2ClientID\x12)\n\x1c\x66irst_party_oauth2_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1cthird_party_oauth2_client_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd1\n\n\x10ManagementServer\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.ManagementServer.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12J\n\x04type\x18\x0e \x01(\x0e\x32\x37.google.cloud.backupdr.v1.ManagementServer.InstanceTypeB\x03\xe0\x41\x01\x12\x44\n\x0emanagement_uri\x18\x0b \x01(\x0b\x32\'.google.cloud.backupdr.v1.ManagementURIB\x03\xe0\x41\x03\x12s\n\'workforce_identity_based_management_uri\x18\x10 \x01(\x0b\x32=.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURIB\x03\xe0\x41\x03\x12L\n\x05state\x18\x07 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.ManagementServer.InstanceStateB\x03\xe0\x41\x03\x12>\n\x08networks\x18\x08 \x03(\x0b\x32\'.google.cloud.backupdr.v1.NetworkConfigB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10oauth2_client_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12v\n)workforce_identity_based_oauth2_client_id\x18\x11 \x01(\x0b\x32>.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientIDB\x03\xe0\x41\x03\x12\x19\n\x0c\x62\x61_proxy_uri\x18\x12 \x03(\tB\x03\xe0\x41\x03\x12\x36\n\rsatisfies_pzs\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"A\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41\x43KUP_RESTORE\x10\x01\"\x8f\x01\n\rInstanceState\x12\x1e\n\x1aINSTANCE_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\r\n\tREPAIRING\x10\x05\x12\x0f\n\x0bMAINTENANCE\x10\x06\x12\t\n\x05\x45RROR\x10\x07:\xa1\x01\xea\x41\x9d\x01\n(backupdr.googleapis.com/ManagementServer\x12Lprojects/{project}/locations/{location}/managementServers/{managementserver}*\x11managementServers2\x10managementServer\"\xdf\x01\n\x1cListManagementServersRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\t\n\x07_filterB\x0b\n\t_order_by\"\x95\x01\n\x1dListManagementServersResponse\x12\x46\n\x12management_servers\x18\x01 \x03(\x0b\x32*.google.cloud.backupdr.v1.ManagementServer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x1aGetManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\"\xe9\x01\n\x1d\x43reateManagementServerRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(backupdr.googleapis.com/ManagementServer\x12!\n\x14management_server_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11management_server\x18\x03 \x01(\x0b\x32*.google.cloud.backupdr.v1.ManagementServerB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"x\n\x1d\x44\x65leteManagementServerRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(backupdr.googleapis.com/ManagementServer\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xfc\x01\n\x18InitializeServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12w\n(cloud_sql_instance_initialization_config\x18\x04 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfigB\x03\xe0\x41\x01H\x00\x42\x17\n\x15initialization_config\"P\n\x19InitializeServiceResponse\x12\x19\n\x11\x62\x61\x63kup_vault_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_plan_name\x18\x02 \x01(\t\"\x96\x03\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12]\n\x0f\x61\x64\x64itional_info\x18\x08 \x03(\x0b\x32?.google.cloud.backupdr.v1.OperationMetadata.AdditionalInfoEntryB\x03\xe0\x41\x03\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xd4\x43\n\x08\x42\x61\x63kupDR\x12\xd0\x01\n\x15ListManagementServers\x12\x36.google.cloud.backupdr.v1.ListManagementServersRequest\x1a\x37.google.cloud.backupdr.v1.ListManagementServersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/managementServers\x12\xbd\x01\n\x13GetManagementServer\x12\x34.google.cloud.backupdr.v1.GetManagementServerRequest\x1a*.google.cloud.backupdr.v1.ManagementServer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/managementServers/*}\x12\x9b\x02\n\x16\x43reateManagementServer\x12\x37.google.cloud.backupdr.v1.CreateManagementServerRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10ManagementServer\x12\x11OperationMetadata\xda\x41-parent,management_server,management_server_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/managementServers:\x11management_server\x12\xe3\x01\n\x16\x44\x65leteManagementServer\x12\x37.google.cloud.backupdr.v1.DeleteManagementServerRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/managementServers/*}\x12\xf8\x01\n\x11\x43reateBackupVault\x12\x32.google.cloud.backupdr.v1.CreateBackupVaultRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x42\x61\x63kupVault\x12\x11OperationMetadata\xda\x41#parent,backup_vault,backup_vault_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/backupVaults:\x0c\x62\x61\x63kup_vault\x12\xbc\x01\n\x10ListBackupVaults\x12\x31.google.cloud.backupdr.v1.ListBackupVaultsRequest\x1a\x32.google.cloud.backupdr.v1.ListBackupVaultsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/backupVaults\x12\xdd\x01\n\x17\x46\x65tchUsableBackupVaults\x12\x38.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest\x1a\x39.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources\x12\xb4\x01\n\rGetDataSource\x12..google.cloud.backupdr.v1.GetDataSourceRequest\x1a$.google.cloud.backupdr.v1.DataSource\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\x12\x82\x02\n\x10UpdateDataSource\x12\x31.google.cloud.backupdr.v1.UpdateDataSourceRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nDataSource\x12\x11OperationMetadata\xda\x41\x17\x64\x61ta_source,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}:\x0b\x64\x61ta_source\x12\xc5\x01\n\x0bListBackups\x12,.google.cloud.backupdr.v1.ListBackupsRequest\x1a-.google.cloud.backupdr.v1.ListBackupsResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\x12\x98\x02\n\x1b\x46\x65tchBackupsForResourceType\x12<.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest\x1a=.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse\"|\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02_\x12]/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType\x12\xb2\x01\n\tGetBackup\x12*.google.cloud.backupdr.v1.GetBackupRequest\x1a .google.cloud.backupdr.v1.Backup\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf1\x01\n\x0cUpdateBackup\x12-.google.cloud.backupdr.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02Y2O/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:\x06\x62\x61\x63kup\x12\xd3\x01\n\x0c\x44\x65leteBackup\x12-.google.cloud.backupdr.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}\x12\xf0\x01\n\rRestoreBackup\x12..google.cloud.backupdr.v1.RestoreBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15RestoreBackupResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore:\x01*\x12\xf1\x01\n\x10\x43reateBackupPlan\x12\x31.google.cloud.backupdr.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xf3\x01\n\x10UpdateBackupPlan\x12\x31.google.cloud.backupdr.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xa5\x01\n\rGetBackupPlan\x12..google.cloud.backupdr.v1.GetBackupPlanRequest\x1a$.google.cloud.backupdr.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xb8\x01\n\x0fListBackupPlans\x12\x30.google.cloud.backupdr.v1.ListBackupPlansRequest\x1a\x31.google.cloud.backupdr.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xd1\x01\n\x10\x44\x65leteBackupPlan\x12\x31.google.cloud.backupdr.v1.DeleteBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xc9\x01\n\x15GetBackupPlanRevision\x12\x36.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest\x1a,.google.cloud.backupdr.v1.BackupPlanRevision\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/backupPlans/*/revisions/*}\x12\xdc\x01\n\x17ListBackupPlanRevisions\x12\x38.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest\x1a\x39.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/backupPlans/*}/revisions\x12\xc1\x02\n\x1b\x43reateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x39parent,backup_plan_association,backup_plan_association_id\x82\xd3\xe4\x93\x02U\":/v1/{parent=projects/*/locations/*}/backupPlanAssociations:\x17\x62\x61\x63kup_plan_association\x12\xc3\x02\n\x1bUpdateBackupPlanAssociation\x12<.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"\xc6\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41#backup_plan_association,update_mask\x82\xd3\xe4\x93\x02m2R/v1/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}:\x17\x62\x61\x63kup_plan_association\x12\xd1\x01\n\x18GetBackupPlanAssociation\x12\x39.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest\x1a/.google.cloud.backupdr.v1.BackupPlanAssociation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xe4\x01\n\x1aListBackupPlanAssociations\x12;.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest\x1a<.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*}/backupPlanAssociations\x12\xb7\x02\n*FetchBackupPlanAssociationsForResourceType\x12K.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest\x1aL.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse\"n\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02Q\x12O/v1/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType\x12\xf2\x01\n\x1b\x44\x65leteBackupPlanAssociation\x12<.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/backupPlanAssociations/*}\x12\xf0\x01\n\rTriggerBackup\x12..google.cloud.backupdr.v1.TriggerBackupRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41*\n\x15\x42\x61\x63kupPlanAssociation\x12\x11OperationMetadata\xda\x41\x0cname,rule_id\x82\xd3\xe4\x93\x02M\"H/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup:\x01*\x12\xc9\x01\n\x16GetDataSourceReference\x12\x37.google.cloud.backupdr.v1.GetDataSourceReferenceRequest\x1a-.google.cloud.backupdr.v1.DataSourceReference\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/dataSourceReferences/*}\x12\xdc\x01\n\x18ListDataSourceReferences\x12\x39.google.cloud.backupdr.v1.ListDataSourceReferencesRequest\x1a:.google.cloud.backupdr.v1.ListDataSourceReferencesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/dataSourceReferences\x12\xaf\x02\n(FetchDataSourceReferencesForResourceType\x12I.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest\x1aJ.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse\"l\xda\x41\x14parent,resource_type\x82\xd3\xe4\x93\x02O\x12M/v1/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType\x12\xde\x01\n\x11InitializeService\x12\x32.google.cloud.backupdr.v1.InitializeServiceRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41.\n\x19InitializeServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/serviceConfig}:initialize:\x01*\x1aK\xca\x41\x17\x62\x61\x63kupdr.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.backupdr.v1B\rBackupDRProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.BoolValue", "google/protobuf/wrappers.proto"], - ["google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig").msgclass - NetworkConfig::PeeringMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkConfig.PeeringMode").enummodule - ManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementURI").msgclass - WorkforceIdentityBasedManagementURI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI").msgclass - WorkforceIdentityBasedOAuth2ClientID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID").msgclass - ManagementServer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer").msgclass - ManagementServer::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceType").enummodule - ManagementServer::InstanceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ManagementServer.InstanceState").enummodule - ListManagementServersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersRequest").msgclass - ListManagementServersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListManagementServersResponse").msgclass - GetManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetManagementServerRequest").msgclass - CreateManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateManagementServerRequest").msgclass - DeleteManagementServerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteManagementServerRequest").msgclass - InitializeServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceRequest").msgclass - InitializeServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InitializeServiceResponse").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb deleted file mode 100644 index 91bbec9bb35d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb +++ /dev/null @@ -1,119 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/backupdr/v1/backupdr.proto for package 'Google.Cloud.BackupDR.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/backupdr/v1/backupdr_pb' - -module Google - module Cloud - module BackupDR - module V1 - module BackupDR - # The BackupDR Service - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.backupdr.v1.BackupDR' - - # Lists ManagementServers in a given project and location. - rpc :ListManagementServers, ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::Google::Cloud::BackupDR::V1::ListManagementServersResponse - # Gets details of a single ManagementServer. - rpc :GetManagementServer, ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::Google::Cloud::BackupDR::V1::ManagementServer - # Creates a new ManagementServer in a given project and location. - rpc :CreateManagementServer, ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::Google::Longrunning::Operation - # Deletes a single ManagementServer. - rpc :DeleteManagementServer, ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::Google::Longrunning::Operation - # Creates a new BackupVault in a given project and location. - rpc :CreateBackupVault, ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Google::Longrunning::Operation - # Lists BackupVaults in a given project and location. - rpc :ListBackupVaults, ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse - # FetchUsableBackupVaults lists usable BackupVaults in a given project and - # location. Usable BackupVault are the ones that user has - # backupdr.backupVaults.get permission. - rpc :FetchUsableBackupVaults, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse - # Gets details of a BackupVault. - rpc :GetBackupVault, ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Google::Cloud::BackupDR::V1::BackupVault - # Updates the settings of a BackupVault. - rpc :UpdateBackupVault, ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Google::Longrunning::Operation - # Deletes a BackupVault. - rpc :DeleteBackupVault, ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Google::Longrunning::Operation - # Lists DataSources in a given project and location. - rpc :ListDataSources, ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse - # Gets details of a DataSource. - rpc :GetDataSource, ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Google::Cloud::BackupDR::V1::DataSource - # Updates the settings of a DataSource. - rpc :UpdateDataSource, ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Google::Longrunning::Operation - # Lists Backups in a given project and location. - rpc :ListBackups, ::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Google::Cloud::BackupDR::V1::ListBackupsResponse - # Fetch Backups for a given resource type. - rpc :FetchBackupsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse - # Gets details of a Backup. - rpc :GetBackup, ::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Google::Cloud::BackupDR::V1::Backup - # Updates the settings of a Backup. - rpc :UpdateBackup, ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Google::Longrunning::Operation - # Deletes a Backup. - rpc :DeleteBackup, ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Google::Longrunning::Operation - # Restore from a Backup - rpc :RestoreBackup, ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Google::Longrunning::Operation - # Create a BackupPlan - rpc :CreateBackupPlan, ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation - # Update a BackupPlan. - rpc :UpdateBackupPlan, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlan. - rpc :GetBackupPlan, ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Google::Cloud::BackupDR::V1::BackupPlan - # Lists BackupPlans in a given project and location. - rpc :ListBackupPlans, ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse - # Deletes a single BackupPlan. - rpc :DeleteBackupPlan, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlanRevision. - rpc :GetBackupPlanRevision, ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Google::Cloud::BackupDR::V1::BackupPlanRevision - # Lists BackupPlanRevisions in a given project and location. - rpc :ListBackupPlanRevisions, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse - # Create a BackupPlanAssociation - rpc :CreateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Update a BackupPlanAssociation. - rpc :UpdateBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Gets details of a single BackupPlanAssociation. - rpc :GetBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Google::Cloud::BackupDR::V1::BackupPlanAssociation - # Lists BackupPlanAssociations in a given project and location. - rpc :ListBackupPlanAssociations, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse - # List BackupPlanAssociations for a given resource type. - rpc :FetchBackupPlanAssociationsForResourceType, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse - # Deletes a single BackupPlanAssociation. - rpc :DeleteBackupPlanAssociation, ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Google::Longrunning::Operation - # Triggers a new Backup. - rpc :TriggerBackup, ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Google::Longrunning::Operation - # Gets details of a single DataSourceReference. - rpc :GetDataSourceReference, ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Google::Cloud::BackupDR::V1::DataSourceReference - # Lists DataSourceReferences for a given project and location. - rpc :ListDataSourceReferences, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse - # Fetch DataSourceReferences for a given project, location and resource type. - rpc :FetchDataSourceReferencesForResourceType, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse - # Initializes the service related config for a project. - rpc :InitializeService, ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb deleted file mode 100644 index 4920dc53d378..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplan_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupplan.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/dayofweek_pb' -require 'google/type/month_pb' - - -descriptor_data = "\n)google/cloud/backupdr/v1/backupplan.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x17google/type/month.proto\"\xa5\x07\n\nBackupPlan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.BackupPlan.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x0c\x62\x61\x63kup_rules\x18\x06 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupRuleB\x03\xe0\x41\x02\x12>\n\x05state\x18\x07 \x01(\x0e\x32*.google.cloud.backupdr.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62\x61\x63kup_vault\x18\n \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12)\n\x1c\x62\x61\x63kup_vault_service_account\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12log_retention_days\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18supported_resource_types\x18\r \x03(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rrevision_name\x18\x0f \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x84\x01\xea\x41\x80\x01\n\"backupdr.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}*\x0b\x62\x61\x63kupPlans2\nbackupPlan\"\xb0\x01\n\nBackupRule\x12\x17\n\x07rule_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x15\x62\x61\x63kup_retention_days\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12L\n\x11standard_schedule\x18\x05 \x01(\x0b\x32*.google.cloud.backupdr.v1.StandardScheduleB\x03\xe0\x41\x01H\x00\x42\x17\n\x15\x62\x61\x63kup_schedule_oneof\"\x97\x04\n\x10StandardSchedule\x12W\n\x0frecurrence_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.backupdr.v1.StandardSchedule.RecurrenceTypeB\x03\xe0\x41\x02\x12\x1d\n\x10hourly_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x31\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12\x1a\n\rdays_of_month\x18\x04 \x03(\x05\x42\x03\xe0\x41\x01\x12H\n\x11week_day_of_month\x18\x05 \x01(\x0b\x32(.google.cloud.backupdr.v1.WeekDayOfMonthB\x03\xe0\x41\x01\x12\'\n\x06months\x18\x06 \x03(\x0e\x32\x12.google.type.MonthB\x03\xe0\x41\x01\x12\x42\n\rbackup_window\x18\x07 \x01(\x0b\x32&.google.cloud.backupdr.v1.BackupWindowB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x08 \x01(\tB\x03\xe0\x41\x02\"m\n\x0eRecurrenceType\x12\x1f\n\x1bRECURRENCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\"L\n\x0c\x42\x61\x63kupWindow\x12\x1e\n\x11start_hour_of_day\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x65nd_hour_of_day\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xfa\x01\n\x0eWeekDayOfMonth\x12P\n\rweek_of_month\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonthB\x03\xe0\x41\x02\x12\x30\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"d\n\x0bWeekOfMonth\x12\x1d\n\x19WEEK_OF_MONTH_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IRST\x10\x01\x12\n\n\x06SECOND\x10\x02\x12\t\n\x05THIRD\x10\x03\x12\n\n\x06\x46OURTH\x10\x04\x12\x08\n\x04LAST\x10\x05\"\xd3\x01\n\x17\x43reateBackupPlanRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x62\x61\x63kup_plan\x18\x03 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb1\x01\n\x16ListBackupPlansRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/BackupPlan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListBackupPlansResponse\x12:\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\"t\n\x17\x44\x65leteBackupPlanRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n\x17UpdateBackupPlanRequest\x12>\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x90\x04\n\x12\x42\x61\x63kupPlanRevision\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x05state\x18\x03 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.BackupPlanRevision.StateB\x03\xe0\x41\x03\x12\x42\n\x14\x62\x61\x63kup_plan_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.backupdr.v1.BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04:\xb1\x01\xea\x41\xad\x01\n*backupdr.googleapis.com/BackupPlanRevision\x12Vprojects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}*\x13\x62\x61\x63kupPlanRevisions2\x12\x62\x61\x63kupPlanRevision\"`\n\x1cGetBackupPlanRevisionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*backupdr.googleapis.com/BackupPlanRevision\"\x95\x01\n\x1eListBackupPlanRevisionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*backupdr.googleapis.com/BackupPlanRevision\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9c\x01\n\x1fListBackupPlanRevisionsResponse\x12K\n\x15\x62\x61\x63kup_plan_revisions\x18\x01 \x03(\x0b\x32,.google.cloud.backupdr.v1.BackupPlanRevision\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xbf\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - BackupPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan").msgclass - BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlan.State").enummodule - BackupRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupRule").msgclass - StandardSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule").msgclass - StandardSchedule::RecurrenceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.StandardSchedule.RecurrenceType").enummodule - BackupWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupWindow").msgclass - WeekDayOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth").msgclass - WeekDayOfMonth::WeekOfMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth").enummodule - CreateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanRequest").msgclass - ListBackupPlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansRequest").msgclass - ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlansResponse").msgclass - GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRequest").msgclass - DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanRequest").msgclass - UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanRequest").msgclass - BackupPlanRevision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision").msgclass - BackupPlanRevision::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanRevision.State").enummodule - GetBackupPlanRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanRevisionRequest").msgclass - ListBackupPlanRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest").msgclass - ListBackupPlanRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb deleted file mode 100644 index 62ec916ed7ad..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupplanassociation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n4google/cloud/backupdr/v1/backupplanassociation.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xdc\x07\n\x15\x42\x61\x63kupPlanAssociation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1d\n\rresource_type\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x08resource\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12?\n\x0b\x62\x61\x63kup_plan\x18\x04 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.BackupPlanAssociation.StateB\x03\xe0\x41\x03\x12H\n\x11rules_config_info\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.RuleConfigInfoB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x8f\x01\n5cloud_sql_instance_backup_plan_association_properties\x18\n \x01(\x0b\x32I.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationPropertiesB\x03\xe0\x41\x03H\x00\x12$\n\x17\x62\x61\x63kup_plan_revision_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x62\x61\x63kup_plan_revision_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08INACTIVE\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\xbc\x01\xea\x41\xb8\x01\n-backupdr.googleapis.com/BackupPlanAssociation\x12Xprojects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}*\x16\x62\x61\x63kupPlanAssociations2\x15\x62\x61\x63kupPlanAssociationB\x15\n\x13resource_properties\"\x89\x03\n\x0eRuleConfigInfo\x12\x14\n\x07rule_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x11last_backup_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\x8c\x02\n\"CreateBackupPlanAssociationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\'\n\x1a\x62\x61\x63kup_plan_association_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb0\x01\n!ListBackupPlanAssociationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\"ListBackupPlanAssociationsResponse\x12Q\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xf3\x01\n1FetchBackupPlanAssociationsForResourceTypeRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-backupdr.googleapis.com/BackupPlanAssociation\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n2FetchBackupPlanAssociationsForResourceTypeResponse\x12V\n\x18\x62\x61\x63kup_plan_associations\x18\x01 \x03(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"f\n\x1fGetBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\"\x8a\x01\n\"DeleteBackupPlanAssociationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd2\x01\n\"UpdateBackupPlanAssociationRequest\x12U\n\x17\x62\x61\x63kup_plan_association\x18\x01 \x01(\x0b\x32/.google.cloud.backupdr.v1.BackupPlanAssociationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x92\x01\n\x14TriggerBackupRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x14\n\x07rule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x42\xca\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x1a\x42\x61\x63kupPlanAssociationProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], - ["google.rpc.Status", "google/rpc/status.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - BackupPlanAssociation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation").msgclass - BackupPlanAssociation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupPlanAssociation.State").enummodule - RuleConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo").msgclass - RuleConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState").enummodule - CreateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest").msgclass - ListBackupPlanAssociationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest").msgclass - ListBackupPlanAssociationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse").msgclass - FetchBackupPlanAssociationsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest").msgclass - FetchBackupPlanAssociationsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse").msgclass - GetBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupPlanAssociationRequest").msgclass - DeleteBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest").msgclass - UpdateBackupPlanAssociationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest").msgclass - TriggerBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TriggerBackupRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb deleted file mode 100644 index 681dd9955234..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_ba.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/backupdr/v1/backupvault_ba.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\x02\n\x1f\x42\x61\x63kupApplianceBackupProperties\x12\x1f\n\rgeneration_id\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12;\n\rfinalize_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12G\n\x19recovery_range_start_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x45\n\x17recovery_range_end_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x10\n\x0e_generation_idB\x10\n\x0e_finalize_timeB\x1c\n\x1a_recovery_range_start_timeB\x1a\n\x18_recovery_range_end_timeB\xc2\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x12\x42\x61\x63kupvaultBaProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - BackupApplianceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb deleted file mode 100644 index 9cb353f7b459..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_cloudsql.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/backupdr/v1/backupvault_cloudsql.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x01\n$CloudSqlInstanceDataSourceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xc3\x02\n CloudSqlInstanceBackupProperties\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x66inal_backup\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12\x41\n\x0fsource_instance\x18\x04 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12=\n\x14instance_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_delete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xeb\x01\n-CloudSqlInstanceDataSourceReferenceProperties\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12\'\n\x1a\x64\x61tabase_installed_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14instance_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rinstance_tier\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcd\x01\n$CloudSqlInstanceInitializationConfig\x12\\\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x46.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.EditionB\x03\xe0\x41\x02\"G\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x02\"p\n/CloudSqlInstanceBackupPlanAssociationProperties\x12=\n\x14instance_create_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x96\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x42\x61\x63kupvaultCloudSqlProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41K\n sqladmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - CloudSqlInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties").msgclass - CloudSqlInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties").msgclass - CloudSqlInstanceDataSourceReferenceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties").msgclass - CloudSqlInstanceInitializationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig").msgclass - CloudSqlInstanceInitializationConfig::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition").enummodule - CloudSqlInstanceBackupPlanAssociationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb deleted file mode 100644 index 2fefb83b4977..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_disk.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_gce_pb' - - -descriptor_data = "\n/google/cloud/backupdr/v1/backupvault_disk.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\"@\n\x15\x44iskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"d\n\x1bRegionDiskTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rreplica_zones\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xa5\x0b\n\x15\x44iskRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x19\n\x07size_gb\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x15\n\x08licenses\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12G\n\x10guest_os_feature\x18\x05 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x06 \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12+\n\x19physical_block_size_bytes\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10provisioned_iops\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16provisioned_throughput\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12-\n\x1b\x65nable_confidential_compute\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x45\n\x0cstorage_pool\x18\x0b \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"compute.googleapis.com/StoragePoolH\x08\x88\x01\x01\x12Y\n\x0b\x61\x63\x63\x65ss_mode\x18\x0c \x01(\x0e\x32:.google.cloud.backupdr.v1.DiskRestoreProperties.AccessModeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\\\n\x0c\x61rchitecture\x18\x0e \x01(\x0e\x32<.google.cloud.backupdr.v1.DiskRestoreProperties.ArchitectureB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1c\n\x0fresource_policy\x18\x0f \x03(\tB\x03\xe0\x41\x01\x12\x16\n\x04type\x18\x10 \x01(\tB\x03\xe0\x41\x02H\x0b\x88\x01\x01\x12P\n\x06labels\x18\x11 \x03(\x0b\x32;.google.cloud.backupdr.v1.DiskRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12l\n\x15resource_manager_tags\x18\x12 \x03(\x0b\x32H.google.cloud.backupdr.v1.DiskRestoreProperties.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"L\n\nAccessMode\x12\x15\n\x11READ_WRITE_SINGLE\x10\x00\x12\x13\n\x0fREAD_WRITE_MANY\x10\x01\x12\x12\n\x0eREAD_ONLY_MANY\x10\x02\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\n\n\x08_size_gbB\x16\n\x14_disk_encryption_keyB\x1c\n\x1a_physical_block_size_bytesB\x13\n\x11_provisioned_iopsB\x19\n\x17_provisioned_throughputB\x1e\n\x1c_enable_confidential_computeB\x0f\n\r_storage_poolB\x0e\n\x0c_access_modeB\x0f\n\r_architectureB\x07\n\x05_type\"\xff\x03\n\x14\x44iskBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08licenses\x18\x02 \x03(\t\x12\x42\n\x10guest_os_feature\x18\x03 \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeature\x12V\n\x0c\x61rchitecture\x18\x04 \x01(\x0e\x32;.google.cloud.backupdr.v1.DiskBackupProperties.ArchitectureH\x01\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07size_gb\x18\x06 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06region\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x11\n\x04zone\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x15\n\rreplica_zones\x18\t \x03(\t\x12\x18\n\x0bsource_disk\x18\n \x01(\tH\x06\x88\x01\x01\"C\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\n\n\x06X86_64\x10\x01\x12\t\n\x05\x41RM64\x10\x02\x42\x0e\n\x0c_descriptionB\x0f\n\r_architectureB\x07\n\x05_typeB\n\n\x08_size_gbB\t\n\x07_regionB\x07\n\x05_zoneB\x0e\n\x0c_source_disk\"\\\n\x18\x44iskDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0f\n\x07size_gb\x18\x04 \x01(\x03\x42\xa8\x02\n\x1c\x63om.google.cloud.backupdr.v1B\x14\x42\x61\x63kupvaultDiskProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41\x61\n\"compute.googleapis.com/StoragePool\x12;projects/{project}/zones/{zone}/storagePools/{storage_pool}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.backupdr.v1.GuestOsFeature", "google/cloud/backupdr/v1/backupvault_gce.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - DiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskTargetEnvironment").msgclass - RegionDiskTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RegionDiskTargetEnvironment").msgclass - DiskRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties").msgclass - DiskRestoreProperties::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode").enummodule - DiskRestoreProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskRestoreProperties.Architecture").enummodule - DiskBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties").msgclass - DiskBackupProperties::Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskBackupProperties.Architecture").enummodule - DiskDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DiskDataSourceProperties").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb deleted file mode 100644 index 7822118f6ba8..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault_gce.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' - - -descriptor_data = "\n.google/cloud/backupdr/v1/backupvault_gce.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xe8\x07\n\x1f\x43omputeInstanceBackupProperties\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x04tags\x18\x02 \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsH\x01\x88\x01\x01\x12\x19\n\x0cmachine_type\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63\x61n_ip_forward\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x45\n\x11network_interface\x18\x05 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterface\x12\x34\n\x04\x64isk\x18\x06 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDisk\x12\x39\n\x08metadata\x18\x07 \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataH\x04\x88\x01\x01\x12\x41\n\x0fservice_account\x18\x08 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccount\x12=\n\nscheduling\x18\t \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingH\x05\x88\x01\x01\x12\x46\n\x11guest_accelerator\x18\n \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfig\x12\x1d\n\x10min_cpu_platform\x18\x0b \x01(\tH\x06\x88\x01\x01\x12Z\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeH\x07\x88\x01\x01\x12\x1c\n\x0fsource_instance\x18\r \x01(\tH\x08\x88\x01\x01\x12U\n\x06labels\x18\x0e \x03(\x0b\x32\x45.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\x07\n\x05_tagsB\x0f\n\r_machine_typeB\x11\n\x0f_can_ip_forwardB\x0b\n\t_metadataB\r\n\x0b_schedulingB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_key_revocation_action_typeB\x12\n\x10_source_instance\"\xc7\x12\n ComputeInstanceRestoreProperties\x12\x16\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12^\n\x19\x61\x64vanced_machine_features\x18\x02 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.AdvancedMachineFeaturesB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0e\x63\x61n_ip_forward\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x64\n\x1c\x63onfidential_instance_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.ConfidentialInstanceConfigB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12%\n\x13\x64\x65letion_protection\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12:\n\x05\x64isks\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AttachedDiskB\x03\xe0\x41\x01\x12I\n\x0e\x64isplay_device\x18\x08 \x01(\x0b\x32\'.google.cloud.backupdr.v1.DisplayDeviceB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12L\n\x12guest_accelerators\x18\t \x03(\x0b\x32+.google.cloud.backupdr.v1.AcceleratorConfigB\x03\xe0\x41\x01\x12\x1a\n\x08hostname\x18\n \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12Z\n\x17instance_encryption_key\x18\x0b \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12_\n\x1akey_revocation_action_type\x18\x0c \x01(\x0e\x32\x31.google.cloud.backupdr.v1.KeyRevocationActionTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12[\n\x06labels\x18\r \x03(\x0b\x32\x46.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x0cmachine_type\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12>\n\x08metadata\x18\x0f \x01(\x0b\x32\".google.cloud.backupdr.v1.MetadataB\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\x10min_cpu_platform\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12K\n\x12network_interfaces\x18\x11 \x03(\x0b\x32*.google.cloud.backupdr.v1.NetworkInterfaceB\x03\xe0\x41\x01\x12`\n\x1anetwork_performance_config\x18\x12 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.NetworkPerformanceConfigB\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x42\n\x06params\x18\x13 \x01(\x0b\x32(.google.cloud.backupdr.v1.InstanceParamsB\x03\xe0\x41\x04H\x0e\x88\x01\x01\x12\x88\x01\n\x1aprivate_ipv6_google_access\x18\x14 \x01(\x0e\x32Z.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccessB\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12h\n\x13\x61llocation_affinity\x18\x15 \x01(\x0b\x32,.google.cloud.backupdr.v1.AllocationAffinityB\x03\xe0\x41\x01H\x10R\x13reservationAffinity\x88\x01\x01\x12\x1e\n\x11resource_policies\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x42\n\nscheduling\x18\x17 \x01(\x0b\x32$.google.cloud.backupdr.v1.SchedulingB\x03\xe0\x41\x01H\x11\x88\x01\x01\x12G\n\x10service_accounts\x18\x18 \x03(\x0b\x32(.google.cloud.backupdr.v1.ServiceAccountB\x03\xe0\x41\x01\x12\x36\n\x04tags\x18\x1a \x01(\x0b\x32\x1e.google.cloud.backupdr.v1.TagsB\x03\xe0\x41\x01H\x12\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc7\x01\n\x1fInstancePrivateIpv6GoogleAccess\x12\x33\n/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_FROM_SUBNETWORK\x10\x01\x12\'\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\x10\x02\x12)\n%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\x10\x03\x42\x07\n\x05_nameB\x1c\n\x1a_advanced_machine_featuresB\x11\n\x0f_can_ip_forwardB\x1f\n\x1d_confidential_instance_configB\x16\n\x14_deletion_protectionB\x0e\n\x0c_descriptionB\x11\n\x0f_display_deviceB\x0b\n\t_hostnameB\x1a\n\x18_instance_encryption_keyB\x1d\n\x1b_key_revocation_action_typeB\x0f\n\r_machine_typeB\x0b\n\t_metadataB\x13\n\x11_min_cpu_platformB\x1d\n\x1b_network_performance_configB\t\n\x07_paramsB\x1d\n\x1b_private_ipv6_google_accessB\x16\n\x14_allocation_affinityB\r\n\x0b_schedulingB\x07\n\x05_tags\"K\n ComputeInstanceTargetEnvironment\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n#ComputeInstanceDataSourceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cmachine_type\x18\x03 \x01(\t\x12\x18\n\x10total_disk_count\x18\x04 \x01(\x03\x12\x1a\n\x12total_disk_size_gb\x18\x05 \x01(\x03\"\xa5\x02\n\x17\x41\x64vancedMachineFeatures\x12.\n\x1c\x65nable_nested_virtualization\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10threads_per_core\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x12visible_core_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12(\n\x16\x65nable_uefi_networking\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualizationB\x13\n\x11_threads_per_coreB\x15\n\x13_visible_core_countB\x19\n\x17_enable_uefi_networking\"k\n\x1a\x43onfidentialInstanceConfig\x12-\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1e\n\x1c_enable_confidential_compute\"D\n\rDisplayDevice\x12 \n\x0e\x65nable_display\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_enable_display\"\x87\x01\n\x11\x41\x63\x63\x65leratorConfig\x12\"\n\x10\x61\x63\x63\x65lerator_type\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61\x63\x63\x65lerator_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_accelerator_typeB\x14\n\x12_accelerator_count\"\xbc\x01\n\x15\x43ustomerEncryptionKey\x12\x16\n\x07raw_key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12 \n\x11rsa_encrypted_key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0ckms_key_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12)\n\x17kms_key_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x05\n\x03keyB\x1a\n\x18_kms_key_service_account\"I\n\x05\x45ntry\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_value\"?\n\x08Metadata\x12\x33\n\x05items\x18\x01 \x03(\x0b\x32\x1f.google.cloud.backupdr.v1.EntryB\x03\xe0\x41\x01\"\x96\t\n\x10NetworkInterface\x12\x19\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nsubnetwork\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12/\n\nip_address\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02H\x02R\tnetworkIP\x88\x01\x01\x12&\n\x0cipv6_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x03H\x03\x88\x01\x01\x12-\n\x1binternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x43\n\x0e\x61\x63\x63\x65ss_configs\x18\x07 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12H\n\x13ipv6_access_configs\x18\x08 \x03(\x0b\x32&.google.cloud.backupdr.v1.AccessConfigB\x03\xe0\x41\x01\x12\x44\n\x0f\x61lias_ip_ranges\x18\t \x03(\x0b\x32&.google.cloud.backupdr.v1.AliasIpRangeB\x03\xe0\x41\x01\x12M\n\nstack_type\x18\n \x01(\x0e\x32\x34.google.cloud.backupdr.v1.NetworkInterface.StackTypeH\x06\x88\x01\x01\x12]\n\x10ipv6_access_type\x18\x0b \x01(\x0e\x32\x39.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessTypeB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0bqueue_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12N\n\x08nic_type\x18\r \x01(\x0e\x32\x32.google.cloud.backupdr.v1.NetworkInterface.NicTypeB\x03\xe0\x41\x01H\t\x88\x01\x01\x12$\n\x12network_attachment\x18\x0e \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\"E\n\tStackType\x12\x1a\n\x16STACK_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIPV4_ONLY\x10\x01\x12\r\n\tIPV4_IPV6\x10\x02\"N\n\x0eIpv6AccessType\x12 \n\x1cUNSPECIFIED_IPV6_ACCESS_TYPE\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\x0c\n\x08\x45XTERNAL\x10\x02\">\n\x07NicType\x12\x18\n\x14NIC_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nVIRTIO_NET\x10\x01\x12\t\n\x05GVNIC\x10\x02\x42\n\n\x08_networkB\r\n\x0b_subnetworkB\r\n\x0b_ip_addressB\x0f\n\r_ipv6_addressB\x1e\n\x1c_internal_ipv6_prefix_lengthB\x07\n\x05_nameB\r\n\x0b_stack_typeB\x13\n\x11_ipv6_access_typeB\x0e\n\x0c_queue_countB\x0b\n\t_nic_typeB\x15\n\x13_network_attachment\"\xd9\x01\n\x18NetworkPerformanceConfig\x12\x66\n\x1btotal_egress_bandwidth_tier\x18\x01 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.NetworkPerformanceConfig.TierB\x03\xe0\x41\x01H\x00\x88\x01\x01\"5\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06TIER_1\x10\x02\x42\x1e\n\x1c_total_egress_bandwidth_tier\"\xb2\x05\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AccessConfig.AccessTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12$\n\x0b\x65xternal_ip\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02R\x05natIP\x88\x01\x01\x12\x1f\n\rexternal_ipv6\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12-\n\x1b\x65xternal_ipv6_prefix_length\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12 \n\x0eset_public_ptr\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12(\n\x16public_ptr_domain_name\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12R\n\x0cnetwork_tier\x18\x08 \x01(\x0e\x32\x32.google.cloud.backupdr.v1.AccessConfig.NetworkTierB\x03\xe0\x41\x01H\x07\x88\x01\x01\"N\n\nAccessType\x12\x1b\n\x17\x41\x43\x43\x45SS_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eONE_TO_ONE_NAT\x10\x01\x12\x0f\n\x0b\x44IRECT_IPV6\x10\x02\"F\n\x0bNetworkTier\x12\x1c\n\x18NETWORK_TIER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREMIUM\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x42\x07\n\x05_typeB\x07\n\x05_nameB\x0e\n\x0c_external_ipB\x10\n\x0e_external_ipv6B\x1e\n\x1c_external_ipv6_prefix_lengthB\x11\n\x0f_set_public_ptrB\x19\n\x17_public_ptr_domain_nameB\x0f\n\r_network_tier\"\x84\x01\n\x0c\x41liasIpRange\x12\x1f\n\rip_cidr_range\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15subnetwork_range_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x10\n\x0e_ip_cidr_rangeB\x18\n\x16_subnetwork_range_name\"\xb3\x01\n\x0eInstanceParams\x12\x65\n\x15resource_manager_tags\x18\x01 \x03(\x0b\x32\x41.google.cloud.backupdr.v1.InstanceParams.ResourceManagerTagsEntryB\x03\xe0\x41\x01\x1a:\n\x18ResourceManagerTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x02\n\x12\x41llocationAffinity\x12t\n\x17\x63onsume_allocation_type\x18\x01 \x01(\x0e\x32\x31.google.cloud.backupdr.v1.AllocationAffinity.TypeB\x03\xe0\x41\x01H\x00R\x16\x63onsumeReservationType\x88\x01\x01\x12\x15\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"_\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_RESERVATION\x10\x01\x12\x13\n\x0f\x41NY_RESERVATION\x10\x02\x12\x18\n\x14SPECIFIC_RESERVATION\x10\x03\x42\x1a\n\x18_consume_allocation_typeB\x06\n\x04_key\"\xdc\t\n\nScheduling\x12]\n\x13on_host_maintenance\x18\x01 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.OnHostMaintenanceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12#\n\x11\x61utomatic_restart\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1d\n\x0bpreemptible\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12O\n\x0fnode_affinities\x18\x04 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.Scheduling.NodeAffinityB\x03\xe0\x41\x01\x12\x1f\n\rmin_node_cpus\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\\\n\x12provisioning_model\x18\x06 \x01(\x0e\x32\x36.google.cloud.backupdr.v1.Scheduling.ProvisioningModelB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12m\n\x1binstance_termination_action\x18\x07 \x01(\x0e\x32>.google.cloud.backupdr.v1.Scheduling.InstanceTerminationActionB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12Z\n\x1alocal_ssd_recovery_timeout\x18\n \x01(\x0b\x32,.google.cloud.backupdr.v1.SchedulingDurationB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\xe1\x01\n\x0cNodeAffinity\x12\x15\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12V\n\x08operator\x18\x02 \x01(\x0e\x32:.google.cloud.backupdr.v1.Scheduling.NodeAffinity.OperatorB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x13\n\x06values\x18\x03 \x03(\tB\x03\xe0\x41\x01\"8\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02IN\x10\x01\x12\n\n\x06NOT_IN\x10\x02\x42\x06\n\x04_keyB\x0b\n\t_operator\"U\n\x11OnHostMaintenance\x12#\n\x1fON_HOST_MAINTENANCE_UNSPECIFIED\x10\x00\x12\r\n\tTERMINATE\x10\x01\x12\x0c\n\x07MIGRATE\x10\xe8\x07\"O\n\x11ProvisioningModel\x12\"\n\x1ePROVISIONING_MODEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x08\n\x04SPOT\x10\x02\"^\n\x19InstanceTerminationAction\x12+\n\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\x16\n\x14_on_host_maintenanceB\x14\n\x12_automatic_restartB\x0e\n\x0c_preemptibleB\x10\n\x0e_min_node_cpusB\x15\n\x13_provisioning_modelB\x1e\n\x1c_instance_termination_actionB\x1d\n\x1b_local_ssd_recovery_timeout\"^\n\x12SchedulingDuration\x12\x19\n\x07seconds\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05nanos\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\n\n\x08_secondsB\x08\n\x06_nanos\"H\n\x0eServiceAccount\x12\x17\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x08\n\x06_email\"\x1a\n\x04Tags\x12\x12\n\x05items\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x91\x0c\n\x0c\x41ttachedDisk\x12\\\n\x11initialize_params\x18\x01 \x01(\x0b\x32\x37.google.cloud.backupdr.v1.AttachedDisk.InitializeParamsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0b\x64\x65vice_name\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x16\n\x04kind\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14\x64isk_type_deprecated\x18\x06 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x02\x18\x01H\x03\x88\x01\x01\x12G\n\x04mode\x18\x07 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskModeB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x18\n\x06source\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x17\n\x05index\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04\x62oot\x18\n \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1d\n\x0b\x61uto_delete\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x14\n\x07license\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12V\n\x0e\x64isk_interface\x18\r \x01(\x0e\x32\x34.google.cloud.backupdr.v1.AttachedDisk.DiskInterfaceB\x03\xe0\x41\x01H\t\x88\x01\x01\x12G\n\x10guest_os_feature\x18\x0e \x03(\x0b\x32(.google.cloud.backupdr.v1.GuestOsFeatureB\x03\xe0\x41\x01\x12V\n\x13\x64isk_encryption_key\x18\x0f \x01(\x0b\x32/.google.cloud.backupdr.v1.CustomerEncryptionKeyB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0c\x64isk_size_gb\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12W\n\x0bsaved_state\x18\x11 \x01(\x0e\x32\x35.google.cloud.backupdr.v1.AttachedDisk.DiskSavedStateB\x06\xe0\x41\x01\xe0\x41\x03H\x0c\x88\x01\x01\x12\x1e\n\tdisk_type\x18\x12 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x03H\r\x88\x01\x01\x12G\n\x04type\x18\x13 \x01(\x0e\x32/.google.cloud.backupdr.v1.AttachedDisk.DiskTypeB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x1aY\n\x10InitializeParams\x12\x1b\n\tdisk_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1a\n\rreplica_zones\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_disk_name\"B\n\x08\x44iskType\x12\x19\n\x15\x44ISK_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SCRATCH\x10\x01\x12\x0e\n\nPERSISTENT\x10\x02\"P\n\x08\x44iskMode\x12\x19\n\x15\x44ISK_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\n\n\x06LOCKED\x10\x03\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\"A\n\x0e\x44iskSavedState\x12 \n\x1c\x44ISK_SAVED_STATE_UNSPECIFIED\x10\x00\x12\r\n\tPRESERVED\x10\x01\x42\x14\n\x12_initialize_paramsB\x0e\n\x0c_device_nameB\x07\n\x05_kindB\x17\n\x15_disk_type_deprecatedB\x07\n\x05_modeB\t\n\x07_sourceB\x08\n\x06_indexB\x07\n\x05_bootB\x0e\n\x0c_auto_deleteB\x11\n\x0f_disk_interfaceB\x16\n\x14_disk_encryption_keyB\x0f\n\r_disk_size_gbB\x0e\n\x0c_saved_stateB\x0c\n\n_disk_typeB\x07\n\x05_type\"\xb5\x03\n\x0eGuestOsFeature\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x34.google.cloud.backupdr.v1.GuestOsFeature.FeatureTypeH\x00\x88\x01\x01\"\xd0\x02\n\x0b\x46\x65\x61tureType\x12\x1c\n\x18\x46\x45\x41TURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VIRTIO_SCSI_MULTIQUEUE\x10\x01\x12\x0b\n\x07WINDOWS\x10\x02\x12\x13\n\x0fMULTI_IP_SUBNET\x10\x03\x12\x13\n\x0fUEFI_COMPATIBLE\x10\x04\x12\x0f\n\x0bSECURE_BOOT\x10\x05\x12\t\n\x05GVNIC\x10\x06\x12\x0f\n\x0bSEV_CAPABLE\x10\x07\x12\x1f\n\x1b\x42\x41RE_METAL_LINUX_COMPATIBLE\x10\x08\x12\x1d\n\x19SUSPEND_RESUME_COMPATIBLE\x10\t\x12\x17\n\x13SEV_LIVE_MIGRATABLE\x10\n\x12\x13\n\x0fSEV_SNP_CAPABLE\x10\x0b\x12\x0f\n\x0bTDX_CAPABLE\x10\x0c\x12\x08\n\x04IDPF\x10\r\x12\x1a\n\x16SEV_LIVE_MIGRATABLE_V2\x10\x0e\x42\x07\n\x05_type*Y\n\x17KeyRevocationActionType\x12*\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x08\n\x04STOP\x10\x02\x42\xc3\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x13\x42\x61\x63kupvaultGceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - ComputeInstanceBackupProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceBackupProperties").msgclass - ComputeInstanceRestoreProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties").msgclass - ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess").enummodule - ComputeInstanceTargetEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment").msgclass - ComputeInstanceDataSourceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties").msgclass - AdvancedMachineFeatures = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AdvancedMachineFeatures").msgclass - ConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ConfidentialInstanceConfig").msgclass - DisplayDevice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DisplayDevice").msgclass - AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AcceleratorConfig").msgclass - CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CustomerEncryptionKey").msgclass - Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Entry").msgclass - Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Metadata").msgclass - NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface").msgclass - NetworkInterface::StackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.StackType").enummodule - NetworkInterface::Ipv6AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType").enummodule - NetworkInterface::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkInterface.NicType").enummodule - NetworkPerformanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig").msgclass - NetworkPerformanceConfig::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier").enummodule - AccessConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig").msgclass - AccessConfig::AccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.AccessType").enummodule - AccessConfig::NetworkTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AccessConfig.NetworkTier").enummodule - AliasIpRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AliasIpRange").msgclass - InstanceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.InstanceParams").msgclass - AllocationAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity").msgclass - AllocationAffinity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AllocationAffinity.Type").enummodule - Scheduling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling").msgclass - Scheduling::NodeAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity").msgclass - Scheduling::NodeAffinity::Operator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator").enummodule - Scheduling::OnHostMaintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.OnHostMaintenance").enummodule - Scheduling::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.ProvisioningModel").enummodule - Scheduling::InstanceTerminationAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction").enummodule - SchedulingDuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.SchedulingDuration").msgclass - ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceAccount").msgclass - Tags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Tags").msgclass - AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk").msgclass - AttachedDisk::InitializeParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.InitializeParams").msgclass - AttachedDisk::DiskType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskType").enummodule - AttachedDisk::DiskMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskMode").enummodule - AttachedDisk::DiskInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskInterface").enummodule - AttachedDisk::DiskSavedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.AttachedDisk.DiskSavedState").enummodule - GuestOsFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature").msgclass - GuestOsFeature::FeatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GuestOsFeature.FeatureType").enummodule - KeyRevocationActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.KeyRevocationActionType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb deleted file mode 100644 index 57dcfc943182..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/backupvault_pb.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/backupvault.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_ba_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/cloud/backupdr/v1/backupvault_disk_pb' -require 'google/cloud/backupdr/v1/backupvault_gce_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n*google/cloud/backupdr/v1/backupvault.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/backupdr/v1/backupvault_ba.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a/google/cloud/backupdr/v1/backupvault_disk.proto\x1a.google/cloud/backupdr/v1/backupvault_gce.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9f\x0f\n\x0b\x42\x61\x63kupVault\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x46\n\x06labels\x18\x03 \x03(\x0b\x32\x31.google.cloud.backupdr.v1.BackupVault.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12W\n*backup_minimum_enforced_retention_duration\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02H\x03\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1b \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\tdeletable\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x16\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupVault.StateB\x03\xe0\x41\x03\x12<\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12total_stored_bytes\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x15 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12P\n\x0b\x61nnotations\x18\x16 \x03(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.AnnotationsEntryB\x03\xe0\x41\x01\x12X\n\x12\x61\x63\x63\x65ss_restriction\x18\x18 \x01(\x0e\x32\x37.google.cloud.backupdr.v1.BackupVault.AccessRestrictionB\x03\xe0\x41\x01\x12[\n\x11\x65ncryption_config\x18\x1d \x01(\x0b\x32\x36.google.cloud.backupdr.v1.BackupVault.EncryptionConfigB\x03\xe0\x41\x01H\x08\x88\x01\x01\x1ai\n\x10\x45ncryptionConfig\x12\x44\n\x0ckms_key_name\x18\x01 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x00\x88\x01\x01\x42\x0f\n\r_kms_key_name\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x1a\x42\x61\x63kupRetentionInheritance\x12,\n(BACKUP_RETENTION_INHERITANCE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INHERIT_VAULT_RETENTION\x10\x01\x12\x1c\n\x18MATCH_BACKUP_EXPIRE_TIME\x10\x02\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\"\x9e\x01\n\x11\x41\x63\x63\x65ssRestriction\x12\"\n\x1e\x41\x43\x43\x45SS_RESTRICTION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWITHIN_PROJECT\x10\x01\x12\x17\n\x13WITHIN_ORGANIZATION\x10\x02\x12\x10\n\x0cUNRESTRICTED\x10\x03\x12&\n\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\x10\x04:\x88\x01\xea\x41\x84\x01\n#backupdr.googleapis.com/BackupVault\x12\x42projects/{project}/locations/{location}/backupVaults/{backupvault}*\x0c\x62\x61\x63kupVaults2\x0b\x62\x61\x63kupVaultB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB-\n+_backup_minimum_enforced_retention_durationB\x1f\n\x1d_backup_retention_inheritanceB\x0c\n\n_deletableB\x07\n\x05_etagB\x11\n\x0f_effective_timeB\x14\n\x12_encryption_config\"\x8c\t\n\nDataSource\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05state\x18\x15 \x01(\x0e\x32*.google.cloud.backupdr.v1.DataSource.StateB\x03\xe0\x41\x03\x12\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.backupdr.v1.DataSource.LabelsEntryB\x03\xe0\x41\x01\x12\x39\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62\x61\x63kup_count\x18\x07 \x01(\x03H\x03\x88\x01\x01\x12\x11\n\x04\x65tag\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x1f\n\x12total_stored_bytes\x18\x17 \x01(\x03H\x05\x88\x01\x01\x12\x46\n\x0c\x63onfig_state\x18\x18 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12K\n\x12\x62\x61\x63kup_config_info\x18\x19 \x01(\x0b\x32*.google.cloud.backupdr.v1.BackupConfigInfoB\x03\xe0\x41\x03\x12S\n\x18\x64\x61ta_source_gcp_resource\x18\x1a \x01(\x0b\x32/.google.cloud.backupdr.v1.DataSourceGcpResourceH\x00\x12r\n(data_source_backup_appliance_application\x18\x1b \x01(\x0b\x32>.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationH\x00\x12\x37\n*backup_blocked_by_vault_access_restriction\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\x9e\x01\xea\x41\x9a\x01\n\"backupdr.googleapis.com/DataSource\x12[projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}*\x0b\x64\x61taSources2\ndataSourceB\x11\n\x0fsource_resourceB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x0f\n\r_backup_countB\x07\n\x05_etagB\x15\n\x13_total_stored_bytes\"\xb1\x04\n\x10\x42\x61\x63kupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\x11last_backup_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x11gcp_backup_config\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.GcpBackupConfigH\x00\x12_\n\x1e\x62\x61\x63kup_appliance_backup_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.BackupApplianceBackupConfigH\x00\"\x80\x01\n\x0fLastBackupState\x12!\n\x1dLAST_BACKUP_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IRST_BACKUP_PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x0f\n\rbackup_config\"\xa4\x02\n\x0fGcpBackupConfig\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1f\n\x17\x62\x61\x63kup_plan_description\x18\x02 \x01(\t\x12S\n\x17\x62\x61\x63kup_plan_association\x18\x03 \x01(\tB2\xfa\x41/\n-backupdr.googleapis.com/BackupPlanAssociation\x12\x19\n\x11\x62\x61\x63kup_plan_rules\x18\x04 \x03(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x05 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x06 \x01(\t\"\xba\x01\n\x1b\x42\x61\x63kupApplianceBackupConfig\x12\x1d\n\x15\x62\x61\x63kup_appliance_name\x18\x01 \x01(\t\x12\x1b\n\x13\x62\x61\x63kup_appliance_id\x18\x02 \x01(\x03\x12\x0e\n\x06sla_id\x18\x03 \x01(\x03\x12\x18\n\x10\x61pplication_name\x18\x04 \x01(\t\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x10\n\x08slt_name\x18\x06 \x01(\t\x12\x10\n\x08slp_name\x18\x07 \x01(\t\"\xb5\x03\n\x15\x44\x61taSourceGcpResource\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12o\n&compute_instance_datasource_properties\x18\x04 \x01(\x0b\x32=.google.cloud.backupdr.v1.ComputeInstanceDataSourcePropertiesH\x00\x12w\n(cloud_sql_instance_datasource_properties\x18\x05 \x01(\x0b\x32>.google.cloud.backupdr.v1.CloudSqlInstanceDataSourcePropertiesB\x03\xe0\x41\x03H\x00\x12X\n\x1a\x64isk_datasource_properties\x18\x07 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.DiskDataSourcePropertiesH\x00\x42\x19\n\x17gcp_resource_properties\"\xb9\x01\n$DataSourceBackupApplianceApplication\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x18\n\x10\x62\x61\x63kup_appliance\x18\x02 \x01(\t\x12\x14\n\x0c\x61ppliance_id\x18\x03 \x01(\x03\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x08 \x01(\x03\x12\x10\n\x08hostname\x18\x06 \x01(\t\x12\x0f\n\x07host_id\x18\x07 \x01(\x03\")\n\x0fServiceLockInfo\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n\x17\x42\x61\x63kupApplianceLockInfo\x12 \n\x13\x62\x61\x63kup_appliance_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\"\n\x15\x62\x61\x63kup_appliance_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0block_reason\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x08job_name\x18\x06 \x01(\tH\x00\x12\x16\n\x0c\x62\x61\x63kup_image\x18\x07 \x01(\tH\x00\x12\x10\n\x06sla_id\x18\x08 \x01(\x03H\x00\x42\r\n\x0block_source\"\xfe\x01\n\nBackupLock\x12\x38\n\x0flock_until_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12W\n\x1a\x62\x61\x63kup_appliance_lock_info\x18\x03 \x01(\x0b\x32\x31.google.cloud.backupdr.v1.BackupApplianceLockInfoH\x00\x12K\n\x11service_lock_info\x18\x04 \x01(\x0b\x32).google.cloud.backupdr.v1.ServiceLockInfoB\x03\xe0\x41\x03H\x00\x42\x10\n\x0e\x43lientLockInfo\"\x9b\x13\n\x06\x42\x61\x63kup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x1d\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x39\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x39\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x41\n\x06labels\x18\x05 \x03(\x0b\x32,.google.cloud.backupdr.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12I\n\x1b\x65nforced_retention_end_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12p\n\x1c\x62\x61\x63kup_retention_inheritance\x18\x1e \x01(\x0e\x32@.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritanceB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x39\n\x0b\x65xpire_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12>\n\x10\x63onsistency_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03H\t\x88\x01\x01\x12\x16\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12:\n\x05state\x18\x0f \x01(\x0e\x32&.google.cloud.backupdr.v1.Backup.StateB\x03\xe0\x41\x03\x12@\n\rservice_locks\x18\x11 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x03\x12I\n\x16\x62\x61\x63kup_appliance_locks\x18\x12 \x03(\x0b\x32$.google.cloud.backupdr.v1.BackupLockB\x03\xe0\x41\x01\x12l\n\"compute_instance_backup_properties\x18\x13 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.ComputeInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12o\n$cloud_sql_instance_backup_properties\x18\x1a \x01(\x0b\x32:.google.cloud.backupdr.v1.CloudSqlInstanceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12l\n\"backup_appliance_backup_properties\x18\x15 \x01(\x0b\x32\x39.google.cloud.backupdr.v1.BackupApplianceBackupPropertiesB\x03\xe0\x41\x03H\x00\x12U\n\x16\x64isk_backup_properties\x18\x1c \x01(\x0b\x32..google.cloud.backupdr.v1.DiskBackupPropertiesB\x03\xe0\x41\x03H\x00\x12\x45\n\x0b\x62\x61\x63kup_type\x18\x14 \x01(\x0e\x32+.google.cloud.backupdr.v1.Backup.BackupTypeB\x03\xe0\x41\x03\x12W\n\x14gcp_backup_plan_info\x18\x16 \x01(\x0b\x32\x32.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfoB\x03\xe0\x41\x03H\x01\x12 \n\x13resource_size_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\rsatisfies_pzs\x18\x18 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x19 \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12H\n\x0cgcp_resource\x18\x1f \x01(\x0b\x32+.google.cloud.backupdr.v1.BackupGcpResourceB\x03\xe0\x41\x03H\x02\x12J\n\x10kms_key_versions\x18! \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x1a\xb2\x01\n\x11GCPBackupPlanInfo\x12<\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\tB\'\xfa\x41$\n\"backupdr.googleapis.com/BackupPlan\x12\x1b\n\x13\x62\x61\x63kup_plan_rule_id\x18\x02 \x01(\t\x12!\n\x19\x62\x61\x63kup_plan_revision_name\x18\x03 \x01(\t\x12\x1f\n\x17\x62\x61\x63kup_plan_revision_id\x18\x04 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\r\n\tUPLOADING\x10\x05\"b\n\nBackupType\x12\x1b\n\x17\x42\x41\x43KUP_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\r\n\tON_DEMAND\x10\x02\x12\x19\n\x15ON_DEMAND_OPERATIONAL\x10\x03:\xa3\x01\xea\x41\x9f\x01\n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12lprojects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}*\x07\x62\x61\x63kups2\x06\x62\x61\x63kupB\x13\n\x11\x62\x61\x63kup_propertiesB\x0b\n\tplan_infoB\x11\n\x0fsource_resourceB\x0e\n\x0c_descriptionB\x0e\n\x0c_create_timeB\x0e\n\x0c_update_timeB\x1e\n\x1c_enforced_retention_end_timeB\x1f\n\x1d_backup_retention_inheritanceB\x0e\n\x0c_expire_timeB\x13\n\x11_consistency_timeB\x07\n\x05_etagB\x10\n\x0e_satisfies_pzsB\x10\n\x0e_satisfies_pzi\"\xf4\x01\n\x18\x43reateBackupVaultRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x1c\n\x0f\x62\x61\x63kup_vault_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x03 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xf1\x01\n\x17ListBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12<\n\x04view\x18\x06 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x86\x01\n\x18ListBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x1e\x46\x65tchUsableBackupVaultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#backupdr.googleapis.com/BackupVault\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1f\x46\x65tchUsableBackupVaultsResponse\x12<\n\rbackup_vaults\x18\x01 \x03(\x0b\x32%.google.cloud.backupdr.v1.BackupVault\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8e\x02\n\"FetchBackupsForResourceTypeRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x07 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"q\n#FetchBackupsForResourceTypeResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x90\x01\n\x15GetBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12<\n\x04view\x18\x02 \x01(\x0e\x32).google.cloud.backupdr.v1.BackupVaultViewB\x03\xe0\x41\x01\"\x91\x02\n\x18UpdateBackupVaultRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12@\n\x0c\x62\x61\x63kup_vault\x18\x02 \x01(\x0b\x32%.google.cloud.backupdr.v1.BackupVaultB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x66orce_update_access_restriction\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xfc\x01\n\x18\x44\x65leteBackupVaultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#backupdr.googleapis.com/BackupVault\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1dignore_backup_plan_references\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x16ListDataSourcesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"backupdr.googleapis.com/DataSource\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x17ListDataSourcesResponse\x12:\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32$.google.cloud.backupdr.v1.DataSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetDataSourceRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"backupdr.googleapis.com/DataSource\"\xcc\x01\n\x17UpdateDataSourceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12>\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32$.google.cloud.backupdr.v1.DataSourceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x01\n\x12ListBackupsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\x04view\x18\x06 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"v\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.cloud.backupdr.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x81\x01\n\x10GetBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x37\n\x04view\x18\x02 \x01(\x0e\x32$.google.cloud.backupdr.v1.BackupViewB\x03\xe0\x41\x01\"\xa3\x01\n\x13UpdateBackupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32 .google.cloud.backupdr.v1.BackupB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"l\n\x13\x44\x65leteBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xe2\x05\n\x14RestoreBackupRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x62\x61\x63kupdr.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n#compute_instance_target_environment\x18\x03 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironmentH\x00\x12R\n\x17\x64isk_target_environment\x18\x05 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskTargetEnvironmentH\x00\x12_\n\x1eregion_disk_target_environment\x18\x06 \x01(\x0b\x32\x35.google.cloud.backupdr.v1.RegionDiskTargetEnvironmentH\x00\x12i\n#compute_instance_restore_properties\x18\x04 \x01(\x0b\x32:.google.cloud.backupdr.v1.ComputeInstanceRestorePropertiesH\x01\x12R\n\x17\x64isk_restore_properties\x18\x07 \x01(\x0b\x32/.google.cloud.backupdr.v1.DiskRestorePropertiesH\x01\x12H\n\x1a\x63lear_overrides_field_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x14\n\x12target_environmentB\x15\n\x13instance_propertiesB\x1d\n\x1b_clear_overrides_field_mask\"Z\n\x15RestoreBackupResponse\x12\x41\n\x0ftarget_resource\x18\x01 \x01(\x0b\x32(.google.cloud.backupdr.v1.TargetResource\"g\n\x0eTargetResource\x12=\n\x0cgcp_resource\x18\x01 \x01(\x0b\x32%.google.cloud.backupdr.v1.GcpResourceH\x00\x42\x16\n\x14target_resource_info\"G\n\x0bGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"M\n\x11\x42\x61\x63kupGcpResource\x12\x18\n\x10gcp_resourcename\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t*Q\n\x11\x42\x61\x63kupConfigState\x12#\n\x1f\x42\x41\x43KUP_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PASSIVE\x10\x02*V\n\nBackupView\x12\x1b\n\x17\x42\x41\x43KUP_VIEW_UNSPECIFIED\x10\x00\x12\x15\n\x11\x42\x41\x43KUP_VIEW_BASIC\x10\x01\x12\x14\n\x10\x42\x41\x43KUP_VIEW_FULL\x10\x02*m\n\x0f\x42\x61\x63kupVaultView\x12!\n\x1d\x42\x41\x43KUP_VAULT_VIEW_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42\x41\x43KUP_VAULT_VIEW_BASIC\x10\x01\x12\x1a\n\x16\x42\x41\x43KUP_VAULT_VIEW_FULL\x10\x02\x42\xda\x03\n\x1c\x63om.google.cloud.backupdr.v1B\x10\x42\x61\x63kupVaultProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1\xea\x41m\n!cloudkms.googleapis.com/CryptoKey\x12Hprojects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ["google.rpc.Status", "google/rpc/status.proto"], - ["google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties", "google/cloud/backupdr/v1/backupvault_gce.proto"], - ["google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], - ["google.cloud.backupdr.v1.DiskDataSourceProperties", "google/cloud/backupdr/v1/backupvault_disk.proto"], - ["google.cloud.backupdr.v1.BackupApplianceBackupProperties", "google/cloud/backupdr/v1/backupvault_ba.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - BackupVault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault").msgclass - BackupVault::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.EncryptionConfig").msgclass - BackupVault::BackupRetentionInheritance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance").enummodule - BackupVault::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.State").enummodule - BackupVault::AccessRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVault.AccessRestriction").enummodule - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource").msgclass - DataSource::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSource.State").enummodule - BackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo").msgclass - BackupConfigInfo::LastBackupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState").enummodule - GcpBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpBackupConfig").msgclass - BackupApplianceBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceBackupConfig").msgclass - DataSourceGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResource").msgclass - DataSourceBackupApplianceApplication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupApplianceApplication").msgclass - ServiceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ServiceLockInfo").msgclass - BackupApplianceLockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupApplianceLockInfo").msgclass - BackupLock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupLock").msgclass - Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup").msgclass - Backup::GCPBackupPlanInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo").msgclass - Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.State").enummodule - Backup::BackupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.Backup.BackupType").enummodule - CreateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.CreateBackupVaultRequest").msgclass - ListBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsRequest").msgclass - ListBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupVaultsResponse").msgclass - FetchUsableBackupVaultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest").msgclass - FetchUsableBackupVaultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse").msgclass - FetchBackupsForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest").msgclass - FetchBackupsForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse").msgclass - GetBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupVaultRequest").msgclass - UpdateBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupVaultRequest").msgclass - DeleteBackupVaultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupVaultRequest").msgclass - ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesRequest").msgclass - ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourcesResponse").msgclass - GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceRequest").msgclass - UpdateDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateDataSourceRequest").msgclass - ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsRequest").msgclass - ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListBackupsResponse").msgclass - GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetBackupRequest").msgclass - UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.UpdateBackupRequest").msgclass - DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DeleteBackupRequest").msgclass - RestoreBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupRequest").msgclass - RestoreBackupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.RestoreBackupResponse").msgclass - TargetResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.TargetResource").msgclass - GcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GcpResource").msgclass - BackupGcpResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupGcpResource").msgclass - BackupConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupConfigState").enummodule - BackupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupView").enummodule - BackupVaultView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.BackupVaultView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb deleted file mode 100644 index ecfc1771ff13..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/bindings_override.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module BackupDR - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/backupdr/v1/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BackupDR"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/managementServers/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb deleted file mode 100644 index f6541ad81bf1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/datasourcereference_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/backupdr/v1/datasourcereference.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/backupdr/v1/backupvault_pb' -require 'google/cloud/backupdr/v1/backupvault_cloudsql_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/backupdr/v1/datasourcereference.proto\x12\x18google.cloud.backupdr.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/backupdr/v1/backupvault.proto\x1a\x33google/cloud/backupdr/v1/backupvault_cloudsql.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd7\x05\n\x13\x44\x61taSourceReference\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12?\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"backupdr.googleapis.com/DataSource\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x1f\x64\x61ta_source_backup_config_state\x18\x04 \x01(\x0e\x32+.google.cloud.backupdr.v1.BackupConfigStateB\x03\xe0\x41\x03\x12%\n\x18\x64\x61ta_source_backup_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x61\n\x1e\x64\x61ta_source_backup_config_info\x18\x06 \x01(\x0b\x32\x34.google.cloud.backupdr.v1.DataSourceBackupConfigInfoB\x03\xe0\x41\x03\x12_\n\x1d\x64\x61ta_source_gcp_resource_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.backupdr.v1.DataSourceGcpResourceInfoB\x03\xe0\x41\x03\x12$\n\x12total_stored_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01:\xb2\x01\xea\x41\xae\x01\n+backupdr.googleapis.com/DataSourceReference\x12Tprojects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}*\x14\x64\x61taSourceReferences2\x13\x64\x61taSourceReferenceB\x15\n\x13_total_stored_bytes\"\xca\x01\n\x1a\x44\x61taSourceBackupConfigInfo\x12Z\n\x11last_backup_state\x18\x01 \x01(\x0e\x32:.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupStateB\x03\xe0\x41\x03\x12P\n\'last_successful_backup_consistency_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\xf2\x01\n\x19\x44\x61taSourceGcpResourceInfo\x12\x1d\n\x10gcp_resourcename\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12u\n\x1d\x63loud_sql_instance_properties\x18\x04 \x01(\x0b\x32G.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferencePropertiesB\x03\xe0\x41\x03H\x00\x42\x15\n\x13resource_properties\"b\n\x1dGetDataSourceReferenceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+backupdr.googleapis.com/DataSourceReference\"\xc3\x01\n\x1fListDataSourceReferencesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9f\x01\n ListDataSourceReferencesResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xef\x01\n/FetchDataSourceReferencesForResourceTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+backupdr.googleapis.com/DataSourceReference\x12\x1a\n\rresource_type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n0FetchDataSourceReferencesForResourceTypeResponse\x12M\n\x16\x64\x61ta_source_references\x18\x01 \x03(\x0b\x32-.google.cloud.backupdr.v1.DataSourceReference\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xc8\x01\n\x1c\x63om.google.cloud.backupdr.v1B\x18\x44\x61taSourceReferenceProtoP\x01Z8cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb\xaa\x02\x18Google.Cloud.BackupDR.V1\xca\x02\x18Google\\Cloud\\BackupDR\\V1\xea\x02\x1bGoogle::Cloud::BackupDR::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties", "google/cloud/backupdr/v1/backupvault_cloudsql.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module BackupDR - module V1 - DataSourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceReference").msgclass - DataSourceBackupConfigInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceBackupConfigInfo").msgclass - DataSourceGcpResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.DataSourceGcpResourceInfo").msgclass - GetDataSourceReferenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.GetDataSourceReferenceRequest").msgclass - ListDataSourceReferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesRequest").msgclass - ListDataSourceReferencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.ListDataSourceReferencesResponse").msgclass - FetchDataSourceReferencesForResourceTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest").msgclass - FetchDataSourceReferencesForResourceTypeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb deleted file mode 100644 index 9cc488ca2ae8..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/backupdr/v1/backupdr/rest" -require "google/cloud/backupdr/v1/backup_dr_protection_summary/rest" -require "google/cloud/backupdr/v1/bindings_override" -require "google/cloud/backupdr/v1/version" - -module Google - module Cloud - module BackupDR - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/backupdr/v1/rest" - # client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb b/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb deleted file mode 100644 index e74b73cd9c04..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/lib/google/cloud/backupdr/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md deleted file mode 100644 index c891244acc73..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Backup and DR Service V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb deleted file mode 100644 index de97c93454cf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupdr.rb +++ /dev/null @@ -1,415 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # Network configuration for ManagementServer instance. - # @!attribute [rw] network - # @return [::String] - # Optional. The resource name of the Google Compute Engine VPC network to - # which the ManagementServer instance is connected. - # @!attribute [rw] peering_mode - # @return [::Google::Cloud::BackupDR::V1::NetworkConfig::PeeringMode] - # Optional. The network connect mode of the ManagementServer instance. For - # this version, only PRIVATE_SERVICE_ACCESS is supported. - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VPC peering modes supported by Cloud BackupDR. - module PeeringMode - # Peering mode not set. - PEERING_MODE_UNSPECIFIED = 0 - - # Connect using Private Service Access to the Management Server. Private - # services access provides an IP address range for multiple Google Cloud - # services, including Cloud BackupDR. - PRIVATE_SERVICE_ACCESS = 1 - end - end - - # ManagementURI for the Management Server resource. - # @!attribute [r] web_ui - # @return [::String] - # Output only. The ManagementServer AGM/RD WebUI URL. - # @!attribute [r] api - # @return [::String] - # Output only. The ManagementServer AGM/RD API URL. - class ManagementURI - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. - # @!attribute [r] first_party_management_uri - # @return [::String] - # Output only. First party Management URI for Google Identities. - # @!attribute [r] third_party_management_uri - # @return [::String] - # Output only. Third party Management URI for External Identity Providers. - class WorkforceIdentityBasedManagementURI - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, - # @!attribute [r] first_party_oauth2_client_id - # @return [::String] - # Output only. First party OAuth Client ID for Google Identities. - # @!attribute [r] third_party_oauth2_client_id - # @return [::String] - # Output only. Third party OAuth Client ID for External Identity Providers. - class WorkforceIdentityBasedOAuth2ClientID - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ManagementServer describes a single BackupDR ManagementServer instance. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the ManagementServer instance (2048 characters - # or less). - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # Labels currently defined: - # 1. migrate_from_go= - # If set to true, the MS is created in migration ready mode. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceType] - # Optional. The type of the ManagementServer resource. - # @!attribute [r] management_uri - # @return [::Google::Cloud::BackupDR::V1::ManagementURI] - # Output only. The hostname or ip address of the exposed AGM endpoints, used - # by clients to connect to AGM/RD graphical user interface and APIs. - # @!attribute [r] workforce_identity_based_management_uri - # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedManagementURI] - # Output only. The hostnames of the exposed AGM endpoints for both types of - # user i.e. 1p and 3p, used to connect AGM/RM UI. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceState] - # Output only. The ManagementServer state. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkConfig>] - # Optional. VPC networks to which the ManagementServer instance is connected. - # For this version, only a single network is supported. This field is - # optional if MS is created without PSA - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag for the ManagementServer resource to - # prevent simultaneous updates from overwiting each other. - # @!attribute [r] oauth2_client_id - # @return [::String] - # 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 - # specification - # https://openid.net/specs/openid-connect-core-1_0.html#IDToken). - # @!attribute [r] workforce_identity_based_oauth2_client_id - # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedOAuth2ClientID] - # Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. - # @!attribute [r] ba_proxy_uri - # @return [::Array<::String>] - # Output only. The hostname or ip address of the exposed AGM endpoints, used - # by BAs to connect to BA proxy. - # @!attribute [r] satisfies_pzs - # @return [::Google::Protobuf::BoolValue] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - class ManagementServer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of backup service resource. - module InstanceType - # Instance type is not mentioned. - INSTANCE_TYPE_UNSPECIFIED = 0 - - # Instance for backup and restore management (i.e., AGM). - BACKUP_RESTORE = 1 - end - - # State of Management server instance. - module InstanceState - # State not set. - INSTANCE_STATE_UNSPECIFIED = 0 - - # The instance is being created. - CREATING = 1 - - # The instance has been created and is fully usable. - READY = 2 - - # The instance configuration is being updated. Certain kinds of updates - # may cause the instance to become unusable while the update is in - # progress. - UPDATING = 3 - - # The instance is being deleted. - DELETING = 4 - - # The instance is being repaired and may be unstable. - REPAIRING = 5 - - # Maintenance is being performed on this instance. - MAINTENANCE = 6 - - # The instance is experiencing an issue and might be unusable. You can get - # further details from the statusMessage field of Instance resource. - ERROR = 7 - end - end - - # Request message for listing management servers. - # @!attribute [rw] parent - # @return [::String] - # 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 Google Cloud regions, for example - # **us-central1**. To retrieve management servers for all locations, use "-" - # for the - # '\\{location}' value. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListManagementServersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing management servers. - # @!attribute [rw] management_servers - # @return [::Array<::Google::Cloud::BackupDR::V1::ManagementServer>] - # The list of ManagementServer instances in the project for the specified - # location. - # - # If the '\\{location}' value in the request is "-", the response contains a - # list of instances from all locations. In case any location is unreachable, - # the response will only return management servers in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListManagementServersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a management server instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the management server resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}' - class GetManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a management server instance. - # @!attribute [rw] parent - # @return [::String] - # Required. The management server project and location in the format - # 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR - # locations map to Google Cloud regions, for example **us-central1**. - # @!attribute [rw] management_server_id - # @return [::String] - # Required. The name of the management server to create. The name must be - # unique for the specified project and location. - # @!attribute [rw] management_server - # @return [::Google::Cloud::BackupDR::V1::ManagementServer] - # Required. A [management server - # resource][google.cloud.backupdr.v1.ManagementServer] - # @!attribute [rw] request_id - # @return [::String] - # 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). - class CreateManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a management server instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] request_id - # @return [::String] - # 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). - class DeleteManagementServerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for initializing the service. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the serviceConfig used to initialize the - # service. Format: - # `projects/{project_id}/locations/{location}/serviceConfig`. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The resource type to which the default service config will be - # applied. Examples include, "compute.googleapis.com/Instance" and - # "storage.googleapis.com/Bucket". - # @!attribute [rw] request_id - # @return [::String] - # 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). - # @!attribute [rw] cloud_sql_instance_initialization_config - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig] - # Optional. The configuration for initializing a Cloud SQL instance. - class InitializeServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for initializing the service. - # @!attribute [rw] backup_vault_name - # @return [::String] - # The resource name of the default `BackupVault` created. - # Format: - # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - # @!attribute [rw] backup_plan_name - # @return [::String] - # The resource name of the default `BackupPlan` created. - # Format: - # `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`. - class InitializeServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to 'Code.CANCELLED'. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - # @!attribute [r] additional_info - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. AdditionalInfo contains additional Info related to backup plan - # association resource. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AdditionalInfoEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb deleted file mode 100644 index 3fe7afac110e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplan.rb +++ /dev/null @@ -1,588 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # A `BackupPlan` specifies some common fields, such as `description` as well - # as one or more `BackupRule` messages. Each `BackupRule` has a retention - # policy and defines a schedule by which the system is to perform backup - # workloads. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the `BackupPlan`. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @!attribute [rw] description - # @return [::String] - # 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. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. This collection of key/value pairs allows for custom labels to be - # supplied by the user. Example, \\{"tag": "Weekly"}. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the `BackupPlan` was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the `BackupPlan` was last updated. - # @!attribute [rw] backup_rules - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupRule>] - # Required. The backup rules for this `BackupPlan`. There must be at least - # one `BackupRule` message. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlan::State] - # Output only. The `State` for the `BackupPlan`. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The resource type to which the `BackupPlan` will be applied. - # Examples include, "compute.googleapis.com/Instance", - # "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", - # "compute.googleapis.com/Disk". - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] backup_vault - # @return [::String] - # Required. Resource name of backup vault which will be used as storage - # location for backups. Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupvault} - # @!attribute [r] backup_vault_service_account - # @return [::String] - # 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. - # @!attribute [rw] log_retention_days - # @return [::Integer] - # Optional. Applicable only for CloudSQL resource_type. - # - # Configures how long logs will be stored. It is defined in “days”. This - # value should be greater than or equal to minimum enforced log retention - # duration of the backup vault. - # @!attribute [r] supported_resource_types - # @return [::Array<::String>] - # Output only. All resource types to which backupPlan can be applied. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] revision_name - # @return [::String] - # Output only. The resource id of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` - class BackupPlan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `State` enumerates the possible states for a `BackupPlan`. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - - # The resource is being updated. - UPDATING = 5 - end - end - - # `BackupRule` binds the backup schedule to a retention policy. - # @!attribute [rw] rule_id - # @return [::String] - # 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}/. - # @!attribute [rw] backup_retention_days - # @return [::Integer] - # Required. Configures the duration for which backup data will be kept. It is - # defined in “days”. The value should be greater than or equal to minimum - # enforced retention of the backup vault. - # - # Minimum value is 1 and maximum value is 36159 for custom retention - # on-demand backup. - # Minimum and maximum values are workload specific for all other rules. - # @!attribute [rw] standard_schedule - # @return [::Google::Cloud::BackupDR::V1::StandardSchedule] - # Optional. Defines a schedule that runs within the confines of a defined - # window of time. - class BackupRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StandardSchedule` defines a schedule that run within the confines of a - # defined window of days. We can define recurrence type for schedule as - # HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. - # @!attribute [rw] recurrence_type - # @return [::Google::Cloud::BackupDR::V1::StandardSchedule::RecurrenceType] - # Required. Specifies the `RecurrenceType` for the schedule. - # @!attribute [rw] hourly_frequency - # @return [::Integer] - # 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 4 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). - # @!attribute [rw] days_of_week - # @return [::Array<::Google::Type::DayOfWeek>] - # 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`. - # @!attribute [rw] days_of_month - # @return [::Array<::Integer>] - # 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. - # @!attribute [rw] week_day_of_month - # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth] - # Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST - # MONDAY, on which jobs will run. This will be specified by two fields in - # `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, - # e.g. `LAST`. - # - # This field is only applicable for `recurrence_type`, `MONTHLY` and - # `YEARLY`. A validation error will occur if other values are supplied. - # @!attribute [rw] months - # @return [::Array<::Google::Type::Month>] - # 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. - # @!attribute [rw] backup_window - # @return [::Google::Cloud::BackupDR::V1::BackupWindow] - # Required. A BackupWindow defines the window of day during which backup jobs - # will run. Jobs are queued at the beginning of the window and will be marked - # as `NOT_RUN` if they do not start by the end of the window. - # - # Note: running jobs will not be cancelled at the end of the window. - # @!attribute [rw] time_zone - # @return [::String] - # 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. - class StandardSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `RecurrenceTypes` enumerates the applicable periodicity for the schedule. - module RecurrenceType - # recurrence type not set - RECURRENCE_TYPE_UNSPECIFIED = 0 - - # The `BackupRule` is to be applied hourly. - HOURLY = 1 - - # The `BackupRule` is to be applied daily. - DAILY = 2 - - # The `BackupRule` is to be applied weekly. - WEEKLY = 3 - - # The `BackupRule` is to be applied monthly. - MONTHLY = 4 - - # The `BackupRule` is to be applied yearly. - YEARLY = 5 - end - end - - # `BackupWindow` defines a window of the day during which backup jobs will run. - # @!attribute [rw] start_hour_of_day - # @return [::Integer] - # 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. - # @!attribute [rw] end_hour_of_day - # @return [::Integer] - # 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. - class BackupWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `WeekDayOfMonth` defines the week day of the month on which the backups will - # run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values - # like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. - # @!attribute [rw] week_of_month - # @return [::Google::Cloud::BackupDR::V1::WeekDayOfMonth::WeekOfMonth] - # Required. Specifies the week of the month. - # @!attribute [rw] day_of_week - # @return [::Google::Type::DayOfWeek] - # Required. Specifies the day of the week. - class WeekDayOfMonth - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, - # third, or last week of the month. - module WeekOfMonth - # The zero value. Do not use. - WEEK_OF_MONTH_UNSPECIFIED = 0 - - # The first week of the month. - FIRST = 1 - - # The second week of the month. - SECOND = 2 - - # The third week of the month. - THIRD = 3 - - # The fourth week of the month. - FOURTH = 4 - - # The last week of the month. - LAST = 5 - end - end - - # The request message for creating a `BackupPlan`. - # @!attribute [rw] parent - # @return [::String] - # 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**. - # @!attribute [rw] backup_plan_id - # @return [::String] - # 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}/. - # @!attribute [rw] backup_plan - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # Required. The `BackupPlan` resource object to create. - # @!attribute [rw] request_id - # @return [::String] - # 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). - class CreateBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a list `BackupPlan`. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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 - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListBackupPlansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for getting a list of `BackupPlan`. - # @!attribute [rw] backup_plans - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlan>] - # 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 - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest#page_token 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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlansResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a `BackupPlan`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlan` to retrieve. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - class GetBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for deleting a `BackupPlan`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlan` to delete. - # - # Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # @!attribute [rw] request_id - # @return [::String] - # 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). - class DeleteBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a backup plan. - # @!attribute [rw] backup_plan - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # Required. The resource being updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlan resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently, these fields are supported in update: description, schedules, - # retention period, adding and removing Backup Rules. - # @!attribute [rw] request_id - # @return [::String] - # 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). - class UpdateBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in - # time. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - # @!attribute [r] revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision::State] - # Output only. Resource State - # @!attribute [rw] backup_plan_snapshot - # @return [::Google::Cloud::BackupDR::V1::BackupPlan] - # The Backup Plan being encompassed by this revision. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp that the revision was created. - class BackupPlanRevision - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the `BackupPlanRevision`. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - end - end - - # The request message for getting a `BackupPlanRevision`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the `BackupPlanRevision` to retrieve. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` - class GetBackupPlanRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for getting a list of `BackupPlanRevision`. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve - # `BackupPlanRevisions` information. Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In - # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. - # @!attribute [rw] page_size - # @return [::Integer] - # 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 - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token 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. - class ListBackupPlanRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for getting a list of `BackupPlanRevision`. - # @!attribute [rw] backup_plan_revisions - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanRevision>] - # The list of `BackupPlanRevisions` in the project for the specified - # location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of resources from all locations. In case any location is unreachable, - # the response will only return backup plans in reachable locations and - # the 'unreachable' field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest#page_token page_token} - # in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlanRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb deleted file mode 100644 index 3b29f911fbf2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb +++ /dev/null @@ -1,381 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # A BackupPlanAssociation represents a single BackupPlanAssociation which - # contains details like workload, backup plan etc - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of BackupPlanAssociation in - # below format Format : - # projects/\\{project}/locations/\\{location}/backupPlanAssociations/\\{backupPlanAssociationId} - # @!attribute [rw] resource_type - # @return [::String] - # Required. Immutable. Resource type of workload on which backupplan is - # applied - # @!attribute [rw] resource - # @return [::String] - # Required. Immutable. Resource name of workload on which the backup plan is - # applied. - # - # The format can either be the resource name (e.g., - # "projects/my-project/zones/us-central1-a/instances/my-instance") or the - # full resource URI (e.g., - # "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). - # @!attribute [rw] backup_plan - # @return [::String] - # Required. Resource name of backup plan which needs to be applied on - # workload. Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation::State] - # Output only. The BackupPlanAssociation resource state. - # @!attribute [r] rules_config_info - # @return [::Array<::Google::Cloud::BackupDR::V1::RuleConfigInfo>] - # Output only. The config info related to backup rules. - # @!attribute [r] data_source - # @return [::String] - # 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} - # @!attribute [r] cloud_sql_instance_backup_plan_association_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupPlanAssociationProperties] - # Output only. Cloud SQL instance's backup plan association properties. - # @!attribute [r] backup_plan_revision_id - # @return [::String] - # Output only. The user friendly revision ID of the `BackupPlanRevision`. - # - # Example: v0, v1, v2, etc. - # @!attribute [r] backup_plan_revision_name - # @return [::String] - # Output only. The resource id of the `BackupPlanRevision`. - # - # Format: - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` - class BackupPlanAssociation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for State of BackupPlan Association - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The resource is being created. - CREATING = 1 - - # The resource has been created and is fully usable. - ACTIVE = 2 - - # The resource is being deleted. - DELETING = 3 - - # The resource has been created but is not usable. - INACTIVE = 4 - - # The resource is being updated. - UPDATING = 5 - end - end - - # Message for rules config info. - # @!attribute [r] rule_id - # @return [::String] - # Output only. Backup Rule id fetched from backup plan. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::RuleConfigInfo::LastBackupState] - # Output only. The last backup state for rule. - # @!attribute [r] last_backup_error - # @return [::Google::Rpc::Status] - # Output only. google.rpc.Status object to store the last backup error. - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The point in time when the last successful backup was captured - # from the source. - class RuleConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for LastBackupState - module LastBackupState - # State not set. - LAST_BACKUP_STATE_UNSPECIFIED = 0 - - # The first backup is pending. - FIRST_BACKUP_PENDING = 1 - - # The most recent backup could not be run/failed because of the lack of - # permissions. - PERMISSION_DENIED = 2 - - # The last backup operation succeeded. - SUCCEEDED = 3 - - # The last backup operation failed. - FAILED = 4 - end - end - - # Request message for creating a backup plan. - # @!attribute [rw] parent - # @return [::String] - # 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**. - # @!attribute [rw] backup_plan_association_id - # @return [::String] - # Required. The name of the backup plan association to create. The name must - # be unique for the specified project and location. - # @!attribute [rw] backup_plan_association - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # Required. The resource being created - # @!attribute [rw] request_id - # @return [::String] - # 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). - class CreateBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for List BackupPlanAssociation - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - class ListBackupPlanAssociationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for List BackupPlanAssociation - # @!attribute [rw] backup_plan_associations - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # 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. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlanAssociationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchBackupPlanAssociationsForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of BackupPlanAssociations to return. The - # service may return fewer than this value. If unspecified, at most 50 - # BackupPlanAssociations will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupPlanAssociationsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupPlanAssociationsForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * resource - # * backup_plan - # * state - # * data_source - # * cloud_sql_instance_backup_plan_association_properties.instance_create_time - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - class FetchBackupPlanAssociationsForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchBackupPlanAssociationsForResourceType method. - # @!attribute [r] backup_plan_associations - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>] - # Output only. The BackupPlanAssociations from the specified parent. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. A token, which can be sent as `page_token` to retrieve the - # next page. If this field is omitted, there are no subsequent pages. - class FetchBackupPlanAssociationsForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a BackupPlanAssociation resource. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - class GetBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a backup plan association. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @!attribute [rw] request_id - # @return [::String] - # 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). - class DeleteBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a backup plan association. - # @!attribute [rw] backup_plan_association - # @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation] - # Required. The resource being updated - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # Field mask is used to specify the fields to be overwritten in the - # BackupPlanAssociation resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then the request will fail. - # Currently backup_plan_association.backup_plan is the only supported field. - # @!attribute [rw] request_id - # @return [::String] - # 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). - class UpdateBackupPlanAssociationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for triggering a backup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup plan association resource, in the format - # `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - # @!attribute [rw] rule_id - # @return [::String] - # Required. backup rule_id for which a backup needs to be triggered. - # @!attribute [rw] request_id - # @return [::String] - # 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). - class TriggerBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb deleted file mode 100644 index 829dd30b930f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault.rb +++ /dev/null @@ -1,1355 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # Message describing a BackupVault object. - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the BackupVault instance (2048 characters or - # less). - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined: - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] backup_minimum_enforced_retention_duration - # @return [::Google::Protobuf::Duration] - # Required. The default and minimum enforced retention for each backup within - # the backup vault. The enforced retention for each backup can be extended. - # @!attribute [rw] backup_retention_inheritance - # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] - # Optional. Setting for how a backup's enforced retention end time is - # inherited. - # @!attribute [r] deletable - # @return [::Boolean] - # Output only. Set to true when there are no backups nested under this - # resource. - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag for the backup vault resource to - # prevent simultaneous updates from overwiting each other. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::BackupVault::State] - # Output only. The BackupVault resource instance state. - # @!attribute [rw] effective_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time after which the BackupVault resource is locked. - # @!attribute [r] backup_count - # @return [::Integer] - # Output only. The number of backups in this backup vault. - # @!attribute [r] service_account - # @return [::String] - # 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. - # @!attribute [r] total_stored_bytes - # @return [::Integer] - # Output only. Total size of the storage used by all backup resources. - # @!attribute [r] uid - # @return [::String] - # Output only. Immutable after resource creation until resource deletion. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User annotations. See https://google.aip.dev/128#annotations - # Stores small amounts of arbitrary data. - # @!attribute [rw] access_restriction - # @return [::Google::Cloud::BackupDR::V1::BackupVault::AccessRestriction] - # Optional. Note: This field is added for future use case and will not be - # supported in the current release. - # - # Access restriction for the backup vault. - # Default value is WITHIN_ORGANIZATION if not provided during creation. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::BackupDR::V1::BackupVault::EncryptionConfig] - # Optional. The encryption config of the backup vault. - class BackupVault - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message describing the EncryptionConfig of backup vault. - # This determines how data within the vault is encrypted at rest. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The Cloud KMS key name to encrypt backups in this backup vault. - # Must be in the same region as the vault. Some workload backups like - # compute disk backups may use their inherited source key instead. Format: - # projects/\\{project}/locations/\\{location}/keyRings/\\{ring}/cryptoKeys/\\{key} - class EncryptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How a backup's enforced retention end time is inherited. - module BackupRetentionInheritance - # Inheritance behavior not set. This will default to - # `INHERIT_VAULT_RETENTION`. - BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0 - - # The enforced retention end time of a backup will be inherited from the - # backup vault's `backup_minimum_enforced_retention_duration` field. - # - # This is the default behavior. - INHERIT_VAULT_RETENTION = 1 - - # The enforced retention end time of a backup will always match the expire - # time of the backup. - # - # If this is set, the backup's enforced retention end time will be set to - # match the expire time during creation of the backup. When updating, the - # ERET and expire time must be updated together and have the same value. - # Invalid update requests will be rejected by the server. - MATCH_BACKUP_EXPIRE_TIME = 2 - end - - # Holds the state of the backup vault resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The backup vault is being created. - CREATING = 1 - - # The backup vault has been created and is fully usable. - ACTIVE = 2 - - # The backup vault is being deleted. - DELETING = 3 - - # The backup vault is experiencing an issue and might be unusable. - ERROR = 4 - - # The backup vault is being updated. - UPDATING = 5 - end - - # Holds the access restriction for the backup vault. - module AccessRestriction - # Access restriction not set. If user does not provide any value or pass - # this value, it will be changed to WITHIN_ORGANIZATION. - ACCESS_RESTRICTION_UNSPECIFIED = 0 - - # Access to or from resources outside your current project will be denied. - WITHIN_PROJECT = 1 - - # Access to or from resources outside your current organization will be - # denied. - WITHIN_ORGANIZATION = 2 - - # No access restriction. - UNRESTRICTED = 3 - - # Access to or from resources outside your current organization will be - # denied except for backup appliance. - WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4 - end - end - - # Message describing a DataSource object. - # Datasource object used to represent Datasource details for both admin and - # basic view. - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::DataSource::State] - # Output only. The DataSource resource instance state. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined: - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] backup_count - # @return [::Integer] - # Number of backups in the data source. - # @!attribute [rw] etag - # @return [::String] - # Server specified ETag for the ManagementServer resource to prevent - # simultaneous updates from overwiting each other. - # @!attribute [rw] total_stored_bytes - # @return [::Integer] - # The number of bytes (metadata and data) stored in this datasource. - # @!attribute [r] config_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] - # Output only. The backup configuration state. - # @!attribute [r] backup_config_info - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo] - # Output only. Details of how the resource is configured for backup. - # @!attribute [rw] data_source_gcp_resource - # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResource] - # 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. - # - # Note: The following fields are mutually exclusive: `data_source_gcp_resource`, `data_source_backup_appliance_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_source_backup_appliance_application - # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupApplianceApplication] - # The backed up resource is a backup appliance application. - # - # Note: The following fields are mutually exclusive: `data_source_backup_appliance_application`, `data_source_gcp_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_blocked_by_vault_access_restriction - # @return [::Boolean] - # Output only. This field is set to true if the backup is blocked by vault - # access restriction. - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds the state of the data source resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The data source is being created. - CREATING = 1 - - # The data source has been created and is fully usable. - ACTIVE = 2 - - # The data source is being deleted. - DELETING = 3 - - # The data source is experiencing an issue and might be unusable. - ERROR = 4 - end - end - - # BackupConfigInfo has information about how the resource is configured - # for Backup and about the most recent backup to this vault. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] - # Output only. The status of the last backup to this BackupVault - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. If the last backup were successful, this field has the - # consistency date. - # @!attribute [r] last_backup_error - # @return [::Google::Rpc::Status] - # Output only. If the last backup failed, this field has the error message. - # @!attribute [rw] gcp_backup_config - # @return [::Google::Cloud::BackupDR::V1::GcpBackupConfig] - # Configuration for a Google Cloud resource. - # - # Note: The following fields are mutually exclusive: `gcp_backup_config`, `backup_appliance_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] backup_appliance_backup_config - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupConfig] - # Configuration for an application backed up by a Backup Appliance. - # - # Note: The following fields are mutually exclusive: `backup_appliance_backup_config`, `gcp_backup_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # LastBackupstate tracks whether the last backup was not yet started, - # successful, failed, or could not be run because of the lack of permissions. - module LastBackupState - # Status not set. - LAST_BACKUP_STATE_UNSPECIFIED = 0 - - # The first backup has not yet completed - FIRST_BACKUP_PENDING = 1 - - # The most recent backup was successful - SUCCEEDED = 2 - - # The most recent backup failed - FAILED = 3 - - # The most recent backup could not be run/failed because of the lack of - # permissions - PERMISSION_DENIED = 4 - end - end - - # GcpBackupConfig captures the Backup configuration details for Google Cloud - # resources. All Google Cloud resources regardless of type are protected with - # backup plan associations. - # @!attribute [rw] backup_plan - # @return [::String] - # The name of the backup plan. - # @!attribute [rw] backup_plan_description - # @return [::String] - # The description of the backup plan. - # @!attribute [rw] backup_plan_association - # @return [::String] - # The name of the backup plan association. - # @!attribute [rw] backup_plan_rules - # @return [::Array<::String>] - # The names of the backup plan rules which point to this backupvault - # @!attribute [rw] backup_plan_revision_name - # @return [::String] - # The name of the backup plan revision. - # @!attribute [rw] backup_plan_revision_id - # @return [::String] - # The user friendly id of the backup plan revision. - # E.g. v0, v1 etc. - class GcpBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceBackupConfig captures the backup configuration for - # applications that are protected by Backup Appliances. - # @!attribute [rw] backup_appliance_name - # @return [::String] - # The name of the backup appliance. - # @!attribute [rw] backup_appliance_id - # @return [::Integer] - # The ID of the backup appliance. - # @!attribute [rw] sla_id - # @return [::Integer] - # The ID of the SLA of this application. - # @!attribute [rw] application_name - # @return [::String] - # The name of the application. - # @!attribute [rw] host_name - # @return [::String] - # The name of the host where the application is running. - # @!attribute [rw] slt_name - # @return [::String] - # The name of the SLT associated with the application. - # @!attribute [rw] slp_name - # @return [::String] - # The name of the SLP associated with the application. - class BackupApplianceBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataSourceGcpResource is used for protected resources that are Google Cloud - # Resources. This name is easeier to understand than GcpResourceDataSource or - # GcpDataSourceResource - # @!attribute [r] gcp_resourcename - # @return [::String] - # Output only. Full resource pathname URL of the source Google Cloud - # resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # The type of the Google Cloud resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - # @!attribute [rw] compute_instance_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceDataSourceProperties] - # ComputeInstanceDataSourceProperties has a subset of Compute Instance - # properties that are useful at the Datasource level. - # - # Note: The following fields are mutually exclusive: `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] cloud_sql_instance_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceProperties] - # Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud - # SQL Instance properties that are useful at the Datasource level. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance_datasource_properties`, `compute_instance_datasource_properties`, `disk_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_datasource_properties - # @return [::Google::Cloud::BackupDR::V1::DiskDataSourceProperties] - # DiskDataSourceProperties has a subset of Disk properties that are useful - # at the Datasource level. - # - # Note: The following fields are mutually exclusive: `disk_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataSourceGcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceApplication describes a Source Resource when it is an - # application backed up by a BackupAppliance. - # @!attribute [rw] application_name - # @return [::String] - # The name of the Application as known to the Backup Appliance. - # @!attribute [rw] backup_appliance - # @return [::String] - # Appliance name. - # @!attribute [rw] appliance_id - # @return [::Integer] - # Appliance Id of the Backup Appliance. - # @!attribute [rw] type - # @return [::String] - # The type of the application. e.g. VMBackup - # @!attribute [rw] application_id - # @return [::Integer] - # The appid field of the application within the Backup Appliance. - # @!attribute [rw] hostname - # @return [::String] - # Hostname of the host where the application is running. - # @!attribute [rw] host_id - # @return [::Integer] - # Hostid of the application host. - class DataSourceBackupApplianceApplication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ServiceLockInfo represents the details of a lock taken by the service on a - # Backup resource. - # @!attribute [r] operation - # @return [::String] - # Output only. The name of the operation that created this lock. - # The lock will automatically be released when the operation completes. - class ServiceLockInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupApplianceLockInfo contains metadata about the backupappliance that - # created the lock. - # @!attribute [rw] backup_appliance_id - # @return [::Integer] - # Required. The ID of the backup/recovery appliance that created this lock. - # @!attribute [rw] backup_appliance_name - # @return [::String] - # Required. The name of the backup/recovery appliance that created this lock. - # @!attribute [rw] lock_reason - # @return [::String] - # 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. - # @!attribute [rw] job_name - # @return [::String] - # The job name on the backup/recovery appliance that created this lock. - # - # Note: The following fields are mutually exclusive: `job_name`, `backup_image`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] backup_image - # @return [::String] - # The image name that depends on this Backup. - # - # Note: The following fields are mutually exclusive: `backup_image`, `job_name`, `sla_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sla_id - # @return [::Integer] - # The SLA on the backup/recovery appliance that owns the lock. - # - # Note: The following fields are mutually exclusive: `sla_id`, `job_name`, `backup_image`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupApplianceLockInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupLock represents a single lock on a Backup resource. An unexpired - # lock on a Backup prevents the Backup from being deleted. - # @!attribute [rw] lock_until_time - # @return [::Google::Protobuf::Timestamp] - # Required. The time after which this lock is not considered valid and will - # no longer protect the Backup from deletion. - # @!attribute [rw] backup_appliance_lock_info - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo] - # If the client is a backup and recovery appliance, this - # contains metadata about why the lock exists. - # - # Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] service_lock_info - # @return [::Google::Cloud::BackupDR::V1::ServiceLockInfo] - # Output only. Contains metadata about the lock exist for Google Cloud - # native backups. - # - # Note: The following fields are mutually exclusive: `service_lock_info`, `backup_appliance_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupLock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message describing a Backup object. - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the Backup instance (2048 characters or - # less). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user provided metadata. - # No labels currently defined. - # @!attribute [rw] enforced_retention_end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The backup can not be deleted before this time. - # @!attribute [r] backup_retention_inheritance - # @return [::Google::Cloud::BackupDR::V1::BackupVault::BackupRetentionInheritance] - # Output only. Setting for how the enforced retention end time is inherited. - # This value is copied from this backup's BackupVault. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Optional. When this backup is automatically expired. - # @!attribute [r] consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The point in time when this backup was captured from the - # source. - # @!attribute [rw] etag - # @return [::String] - # Optional. Server specified ETag to prevent updates from overwriting each - # other. - # @!attribute [r] state - # @return [::Google::Cloud::BackupDR::V1::Backup::State] - # Output only. The Backup resource instance state. - # @!attribute [r] service_locks - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] - # Output only. The list of BackupLocks taken by the service to prevent the - # deletion of the backup. - # @!attribute [rw] backup_appliance_locks - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupLock>] - # Optional. The list of BackupLocks taken by the accessor Backup Appliance. - # @!attribute [r] compute_instance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties] - # Output only. Compute Engine specific backup properties. - # - # Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] cloud_sql_instance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties] - # Output only. Cloud SQL specific backup properties. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_appliance_backup_properties - # @return [::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties] - # Output only. Backup Appliance specific backup properties. - # - # Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] disk_backup_properties - # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties] - # Output only. Disk specific backup properties. - # - # Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] backup_type - # @return [::Google::Cloud::BackupDR::V1::Backup::BackupType] - # Output only. Type of the backup, unspecified, scheduled or ondemand. - # @!attribute [r] gcp_backup_plan_info - # @return [::Google::Cloud::BackupDR::V1::Backup::GCPBackupPlanInfo] - # Output only. Configuration for a Google Cloud resource. - # @!attribute [r] resource_size_bytes - # @return [::Integer] - # Output only. source resource size in bytes at the time of the backup. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Optional. Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Optional. Output only. Reserved for future use. - # @!attribute [r] gcp_resource - # @return [::Google::Cloud::BackupDR::V1::BackupGcpResource] - # Output only. Unique identifier of the GCP resource that is being backed - # up. - # @!attribute [r] kms_key_versions - # @return [::Array<::String>] - # Optional. Output only. The list of KMS key versions used to encrypt the - # backup. - class Backup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # GCPBackupPlanInfo captures the plan configuration details of Google Cloud - # resources at the time of backup. - # @!attribute [rw] backup_plan - # @return [::String] - # Resource name of backup plan by which workload is protected at the time - # of the backup. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId} - # @!attribute [rw] backup_plan_rule_id - # @return [::String] - # The rule id of the backup plan which triggered this backup in case of - # scheduled backup or used for - # @!attribute [rw] backup_plan_revision_name - # @return [::String] - # Resource name of the backup plan revision which triggered this backup in - # case of scheduled backup or used for on demand backup. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backupPlanId}/revisions/\\{revisionId} - # @!attribute [rw] backup_plan_revision_id - # @return [::String] - # The user friendly id of the backup plan revision which triggered this - # backup in case of scheduled backup or used for on demand backup. - class GCPBackupPlanInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds the state of the backup resource. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The backup is being created. - CREATING = 1 - - # The backup has been created and is fully usable. - ACTIVE = 2 - - # The backup is being deleted. - DELETING = 3 - - # The backup is experiencing an issue and might be unusable. - ERROR = 4 - - # The backup is being uploaded. - UPLOADING = 5 - end - - # Type of the backup, scheduled or ondemand. - module BackupType - # Backup type is unspecified. - BACKUP_TYPE_UNSPECIFIED = 0 - - # Scheduled backup. - SCHEDULED = 1 - - # On demand backup. - ON_DEMAND = 2 - - # Operational backup. - ON_DEMAND_OPERATIONAL = 3 - end - end - - # Message for creating a BackupVault. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] backup_vault_id - # @return [::String] - # 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 - # @!attribute [rw] backup_vault - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # Required. The resource being created - # @!attribute [rw] request_id - # @return [::String] - # 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - class CreateBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing backupvault stores. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault. - class ListBackupVaultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing BackupVaults. - # @!attribute [rw] backup_vaults - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] - # 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. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupVaultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for fetching usable BackupVaults. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class FetchUsableBackupVaultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for fetching usable BackupVaults. - # @!attribute [rw] backup_vaults - # @return [::Array<::Google::Cloud::BackupDR::V1::BackupVault>] - # 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. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class FetchUsableBackupVaultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchBackupsForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. Datasources are the parent resource for the backups. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVaultId}/dataSources/\\{datasourceId} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sqladmin.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of Backups to return. The service may - # return fewer than this value. If unspecified, at most 50 - # Backups will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchBackupsForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchBackupsForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. This parameter is used to specify the view of the backup. - # If not specified, the default view is BASIC. - class FetchBackupsForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchBackupsForResourceType method. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] - # The Backups from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class FetchBackupsForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a BackupVault. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backupvault store resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}' - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupVaultView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # Vault - class GetBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a BackupVault. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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. - # @!attribute [rw] backup_vault - # @return [::Google::Cloud::BackupDR::V1::BackupVault] - # Required. The resource being updated - # @!attribute [rw] request_id - # @return [::String] - # 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). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, will not check plan duration against backup vault - # enforcement duration. - # @!attribute [rw] force_update_access_restriction - # @return [::Boolean] - # Optional. If set to true, we will force update access restriction even if - # some non compliant data sources are present. The default is 'false'. - class UpdateBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a BackupVault. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # 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). - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any data source from this backup vault will also - # be deleted. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is 'false'. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If true and the BackupVault is not found, the request will - # succeed but no action will be taken. - # @!attribute [rw] ignore_backup_plan_references - # @return [::Boolean] - # Optional. If set to true, backupvault deletion will proceed even if there - # are backup plans referencing the backupvault. The default is 'false'. - class DeleteBackupVaultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing DataSources. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing DataSources. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSource>] - # 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. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a DataSource instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}' - class GetDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a data source instance. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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. - # @!attribute [rw] data_source - # @return [::Google::Cloud::BackupDR::V1::DataSource] - # Required. The resource being updated - # @!attribute [rw] request_id - # @return [::String] - # 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). - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. Enable upsert. - class UpdateDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing Backups. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - class ListBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing Backups. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::BackupDR::V1::Backup>] - # 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. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a Backup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the data source resource name, in the format - # 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}' - # @!attribute [rw] view - # @return [::Google::Cloud::BackupDR::V1::BackupView] - # Optional. Reserved for future use to provide a BASIC & FULL view of Backup - # resource. - class GetBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a Backup. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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. - # @!attribute [rw] backup - # @return [::Google::Cloud::BackupDR::V1::Backup] - # Required. The resource being updated - # @!attribute [rw] request_id - # @return [::String] - # 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). - class UpdateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a Backup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # 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). - class DeleteBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for restoring from a Backup. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Backup instance, in the format - # 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - # @!attribute [rw] request_id - # @return [::String] - # 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). - # @!attribute [rw] compute_instance_target_environment - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment] - # Compute Engine target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_target_environment - # @return [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment] - # Disk target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] region_disk_target_environment - # @return [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment] - # Region disk target environment to be used during restore. - # - # Note: The following fields are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] compute_instance_restore_properties - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties] - # Compute Engine instance properties to be overridden during restore. - # - # Note: The following fields are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disk_restore_properties - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties] - # Disk properties to be overridden during restore. - # - # Note: The following fields are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] clear_overrides_field_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. A field mask used to clear server-side default values - # for fields within the `instance_properties` oneof. - # - # When a field in this mask is cleared, the server will not apply its - # default logic (like inheriting a value from the source) for that field. - # - # The most common current use case is clearing default encryption keys. - # - # Examples of field mask paths: - # - Compute Instance Disks: - # `compute_instance_restore_properties.disks.*.disk_encryption_key` - # - Single Disk: `disk_restore_properties.disk_encryption_key` - class RestoreBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for restoring from a Backup. - # @!attribute [rw] target_resource - # @return [::Google::Cloud::BackupDR::V1::TargetResource] - # Details of the target resource created/modified as part of restore. - class RestoreBackupResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of the target resource created/modified as part of restore. - # @!attribute [rw] gcp_resource - # @return [::Google::Cloud::BackupDR::V1::GcpResource] - # Details of the native Google Cloud resource created as part of restore. - class TargetResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Minimum details to identify a Google Cloud resource - # @!attribute [rw] gcp_resourcename - # @return [::String] - # Name of the Google Cloud resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # Type of the resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - class GcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Minimum details to identify a Google Cloud resource for a backup. - # @!attribute [rw] gcp_resourcename - # @return [::String] - # Name of the Google Cloud resource. - # @!attribute [rw] location - # @return [::String] - # Location of the resource: //"global"/"unspecified". - # @!attribute [rw] type - # @return [::String] - # Type of the resource. Use the Unified Resource Type, - # eg. compute.googleapis.com/Instance. - class BackupGcpResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Backup configuration state. Is the resource configured for backup? - module BackupConfigState - # The possible states of backup configuration. - # Status not set. - BACKUP_CONFIG_STATE_UNSPECIFIED = 0 - - # The data source is actively protected (i.e. there is a - # BackupPlanAssociation or Appliance SLA pointing to it) - ACTIVE = 1 - - # The data source is no longer protected (but may have backups under it) - PASSIVE = 2 - end - - # BackupView contains enum options for Partial and Full view. - module BackupView - # If the value is not set, the default 'FULL' view is used. - BACKUP_VIEW_UNSPECIFIED = 0 - - # Includes basic data about the Backup, but not the full contents. - BACKUP_VIEW_BASIC = 1 - - # Includes all data about the Backup. - # This is the default value (for both ListBackups and GetBackup). - BACKUP_VIEW_FULL = 2 - end - - # BackupVaultView contains enum options for Partial and Full view. - module BackupVaultView - # If the value is not set, the default 'FULL' view is used. - BACKUP_VAULT_VIEW_UNSPECIFIED = 0 - - # Includes basic data about the Backup Vault, but not the full contents. - BACKUP_VAULT_VIEW_BASIC = 1 - - # Includes all data about the Backup Vault. - # This is the default value (for both ListBackupVaults and GetBackupVault). - BACKUP_VAULT_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb deleted file mode 100644 index 787b36f74c08..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # BackupApplianceBackupProperties represents BackupDR backup appliance's - # properties. - # @!attribute [r] generation_id - # @return [::Integer] - # Output only. The numeric generation ID of the backup (monotonically - # increasing). - # @!attribute [r] finalize_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when this backup object was finalized (if none, - # backup is not finalized). - # @!attribute [rw] recovery_range_start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The earliest timestamp of data available in this Backup. - # @!attribute [rw] recovery_range_end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The latest timestamp of data available in this Backup. - class BackupApplianceBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb deleted file mode 100644 index c11daec87a93..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # CloudSqlInstanceDataSourceProperties represents the properties of a - # Cloud SQL resource that are stored in the DataSource. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the Cloud SQL instance backed up by the datasource. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - class CloudSqlInstanceDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceBackupProperties represents Cloud SQL Instance - # Backup properties. - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance - # when the backup was taken. - # @!attribute [r] final_backup - # @return [::Boolean] - # Output only. Whether the backup is a final backup. - # @!attribute [r] source_instance - # @return [::String] - # Output only. The source instance of the backup. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - # @!attribute [r] instance_delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance delete timestamp. - class CloudSqlInstanceBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceDataSourceReferenceProperties represents the properties of a - # Cloud SQL resource that are stored in the DataSourceReference. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the Cloud SQL instance backed up by the datasource. - # Format: - # projects/\\{project}/instances/\\{instance} - # @!attribute [r] database_installed_version - # @return [::String] - # Output only. The installed database version of the Cloud SQL instance. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The instance creation timestamp. - # @!attribute [r] instance_tier - # @return [::String] - # Output only. The tier (or machine type) for this instance. Example: - # `db-custom-1-3840` - class CloudSqlInstanceDataSourceReferenceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CloudSqlInstanceInitializationConfig contains the configuration for - # initializing a Cloud SQL instance. - # @!attribute [rw] edition - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig::Edition] - # Required. The edition of the Cloud SQL instance. - class CloudSqlInstanceInitializationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The edition of the Cloud SQL instance. For details, see - # https://cloud.google.com/sql/docs/editions-intro. - module Edition - # Unspecified edition. - EDITION_UNSPECIFIED = 0 - - # Enterprise edition. - ENTERPRISE = 1 - - # Enterprise Plus edition. - ENTERPRISE_PLUS = 2 - end - end - - # Cloud SQL instance's BPA properties. - # @!attribute [r] instance_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - class CloudSqlInstanceBackupPlanAssociationProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb deleted file mode 100644 index d5590a9a587f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb +++ /dev/null @@ -1,241 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # DiskTargetEnvironment represents the target environment for the disk. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the disk. - # @!attribute [rw] zone - # @return [::String] - # Required. Target zone for the disk. - class DiskTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RegionDiskTargetEnvironment represents the target environment for the disk. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the disk. - # @!attribute [rw] region - # @return [::String] - # Required. Target region for the disk. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # Required. Target URLs of the replica zones for the disk. - class RegionDiskTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DiskRestoreProperties represents the properties of a Disk restore. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the disk. - # @!attribute [rw] description - # @return [::String] - # Optional. An optional description of this resource. Provide this property - # when you create the resource. - # @!attribute [rw] size_gb - # @return [::Integer] - # Required. The size of the disk in GB. - # @!attribute [rw] licenses - # @return [::Array<::String>] - # Optional. A list of publicly available licenses that are applicable to this - # backup. This is applicable if the original image had licenses attached, - # e.g. Windows image - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # Optional. A list of features to enable in the guest operating system. This - # is applicable only for bootable images. - # @!attribute [rw] disk_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts the disk using a - # customer-supplied encryption key or a customer-managed encryption key. - # @!attribute [rw] physical_block_size_bytes - # @return [::Integer] - # Optional. Physical block size of the persistent disk, in bytes. - # If not present in a request, a default value is used. - # Currently, the supported size is 4096. - # @!attribute [rw] provisioned_iops - # @return [::Integer] - # Optional. Indicates how many IOPS to provision for the disk. This sets the - # number of I/O operations per second that the disk can handle. - # @!attribute [rw] provisioned_throughput - # @return [::Integer] - # Optional. Indicates how much throughput to provision for the disk. This - # sets the number of throughput MB per second that the disk can handle. - # @!attribute [rw] enable_confidential_compute - # @return [::Boolean] - # Optional. Indicates whether this disk is using confidential compute mode. - # Encryption with a Cloud KMS key is required to enable this option. - # @!attribute [rw] storage_pool - # @return [::String] - # Optional. The storage pool in which the new disk is created. You can - # provide this as a partial or full URL to the resource. - # @!attribute [rw] access_mode - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::AccessMode] - # Optional. The access mode of the disk. - # @!attribute [rw] architecture - # @return [::Google::Cloud::BackupDR::V1::DiskRestoreProperties::Architecture] - # Optional. The architecture of the source disk. Valid values are - # ARM64 or X86_64. - # @!attribute [rw] resource_policy - # @return [::Array<::String>] - # Optional. Resource policies applied to this disk. - # @!attribute [rw] type - # @return [::String] - # Required. URL of the disk type resource describing which disk type to use - # to create the disk. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels to apply to this disk. These can be modified later using - # setLabels method. Label values can be empty. - # @!attribute [rw] resource_manager_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to the disk. - class DiskRestoreProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceManagerTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The supported access modes of the disk. - module AccessMode - # The default AccessMode, means the disk can be attached to single instance - # in RW mode. - READ_WRITE_SINGLE = 0 - - # The AccessMode means the disk can be attached to multiple instances in RW - # mode. - READ_WRITE_MANY = 1 - - # The AccessMode means the disk can be attached to multiple instances in RO - # mode. - READ_ONLY_MANY = 2 - end - - # Architecture of the source disk. - module Architecture - # Default value. This value is unused. - ARCHITECTURE_UNSPECIFIED = 0 - - # Disks with architecture X86_64 - X86_64 = 1 - - # Disks with architecture ARM64 - ARM64 = 2 - end - end - - # DiskBackupProperties represents the properties of a Disk backup. - # @!attribute [rw] description - # @return [::String] - # A description of the source disk. - # @!attribute [rw] licenses - # @return [::Array<::String>] - # A list of publicly available licenses that are applicable to this backup. - # This is applicable if the original image had licenses attached, e.g. - # Windows image. - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # A list of guest OS features that are applicable to this backup. - # @!attribute [rw] architecture - # @return [::Google::Cloud::BackupDR::V1::DiskBackupProperties::Architecture] - # The architecture of the source disk. Valid values are - # ARM64 or X86_64. - # @!attribute [rw] type - # @return [::String] - # The URL of the type of the disk. - # @!attribute [rw] size_gb - # @return [::Integer] - # Size(in GB) of the source disk. - # @!attribute [rw] region - # @return [::String] - # Region and zone are mutually exclusive fields. - # The URL of the region of the source disk. - # @!attribute [rw] zone - # @return [::String] - # The URL of the Zone where the source disk. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # The URL of the Zones where the source disk should be replicated. - # @!attribute [rw] source_disk - # @return [::String] - # The source disk used to create this backup. - class DiskBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Architecture of the source disk. - module Architecture - # Default value. This value is unused. - ARCHITECTURE_UNSPECIFIED = 0 - - # Disks with architecture X86_64 - X86_64 = 1 - - # Disks with architecture ARM64 - ARM64 = 2 - end - end - - # DiskDataSourceProperties represents the properties of a - # Disk resource that are stored in the DataSource. - # . - # @!attribute [rw] name - # @return [::String] - # Name of the disk backed up by the datasource. - # @!attribute [rw] description - # @return [::String] - # The description of the disk. - # @!attribute [rw] type - # @return [::String] - # The type of the disk. - # @!attribute [rw] size_gb - # @return [::Integer] - # The size of the disk in GB. - class DiskDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb deleted file mode 100644 index bc9fe21300c3..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb +++ /dev/null @@ -1,1001 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # ComputeInstanceBackupProperties represents Compute Engine instance backup - # properties. - # @!attribute [rw] description - # @return [::String] - # An optional text description for the instances that are created from these - # properties. - # @!attribute [rw] tags - # @return [::Google::Cloud::BackupDR::V1::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). - # @!attribute [rw] machine_type - # @return [::String] - # The machine type to use for instances that are created from these - # properties. - # @!attribute [rw] can_ip_forward - # @return [::Boolean] - # 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. - # @!attribute [rw] network_interface - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] - # An array of network access configurations for this interface. - # @!attribute [rw] disk - # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] - # An array of disks that are associated with the instances that are created - # from these properties. - # @!attribute [rw] metadata - # @return [::Google::Cloud::BackupDR::V1::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. - # @!attribute [rw] service_account - # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] - # A list of service accounts with specified scopes. Access tokens for these - # service accounts are available to the instances that are created from - # these properties. Use metadata queries to obtain the access tokens for - # these instances. - # @!attribute [rw] scheduling - # @return [::Google::Cloud::BackupDR::V1::Scheduling] - # Specifies the scheduling options for the instances that are created from - # these properties. - # @!attribute [rw] guest_accelerator - # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] - # A list of guest accelerator cards' type and count to use for instances - # created from these properties. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # 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. - # @!attribute [rw] key_revocation_action_type - # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] - # KeyRevocationActionType of the instance. Supported options are "STOP" and - # "NONE". The default value is "NONE" if it is not specified. - # @!attribute [rw] source_instance - # @return [::String] - # 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 - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels to apply to instances that are created from these properties. - class ComputeInstanceBackupProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # ComputeInstanceRestoreProperties represents Compute Engine instance - # properties to be overridden during restore. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the compute instance. - # @!attribute [rw] advanced_machine_features - # @return [::Google::Cloud::BackupDR::V1::AdvancedMachineFeatures] - # Optional. Controls for advanced machine-related behavior features. - # @!attribute [rw] can_ip_forward - # @return [::Boolean] - # Optional. Allows this instance to send and receive packets with - # non-matching destination or source IPs. - # @!attribute [rw] confidential_instance_config - # @return [::Google::Cloud::BackupDR::V1::ConfidentialInstanceConfig] - # Optional. Controls Confidential compute options on the instance - # @!attribute [rw] deletion_protection - # @return [::Boolean] - # Optional. Whether the resource should be protected against deletion. - # @!attribute [rw] description - # @return [::String] - # Optional. An optional description of this resource. Provide this property - # when you create the resource. - # @!attribute [rw] disks - # @return [::Array<::Google::Cloud::BackupDR::V1::AttachedDisk>] - # Optional. Array of disks associated with this instance. Persistent disks - # must be created before you can assign them. Source regional persistent - # disks will be restored with default replica zones if not specified. - # @!attribute [rw] display_device - # @return [::Google::Cloud::BackupDR::V1::DisplayDevice] - # Optional. Enables display device for the instance. - # @!attribute [rw] guest_accelerators - # @return [::Array<::Google::Cloud::BackupDR::V1::AcceleratorConfig>] - # Optional. A list of the type and count of accelerator cards attached to the - # instance. - # @!attribute [rw] hostname - # @return [::String] - # 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. - # @!attribute [rw] instance_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts suspended data for an instance with a - # customer-managed encryption key. - # @!attribute [rw] key_revocation_action_type - # @return [::Google::Cloud::BackupDR::V1::KeyRevocationActionType] - # Optional. KeyRevocationActionType of the instance. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels to apply to this instance. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. Full or partial URL of the machine type resource to use for this - # instance. - # @!attribute [rw] metadata - # @return [::Google::Cloud::BackupDR::V1::Metadata] - # Optional. This includes custom metadata and predefined keys. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # Optional. Minimum CPU platform to use for this instance. - # @!attribute [rw] network_interfaces - # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkInterface>] - # Optional. An array of network configurations for this instance. These - # specify how interfaces are configured to interact with other network - # services, such as connecting to the internet. Multiple interfaces are - # supported per instance. Required to restore in different project or region. - # @!attribute [rw] network_performance_config - # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig] - # Optional. Configure network performance such as egress bandwidth tier. - # @!attribute [rw] params - # @return [::Google::Cloud::BackupDR::V1::InstanceParams] - # Input only. Additional params passed with the request, but not persisted - # as part of resource payload. - # @!attribute [rw] private_ipv6_google_access - # @return [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties::InstancePrivateIpv6GoogleAccess] - # Optional. The private IPv6 google access type for the VM. - # If not specified, use INHERIT_FROM_SUBNETWORK as default. - # @!attribute [rw] allocation_affinity - # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity] - # Optional. Specifies the reservations that this instance can consume from. - # @!attribute [rw] resource_policies - # @return [::Array<::String>] - # Optional. Resource policies applied to this instance. - # By default, no resource policies will be applied. - # @!attribute [rw] scheduling - # @return [::Google::Cloud::BackupDR::V1::Scheduling] - # Optional. Sets the scheduling options for this instance. - # @!attribute [rw] service_accounts - # @return [::Array<::Google::Cloud::BackupDR::V1::ServiceAccount>] - # Optional. A list of service accounts, with their specified scopes, - # authorized for this instance. Only one service account per VM instance is - # supported. - # @!attribute [rw] tags - # @return [::Google::Cloud::BackupDR::V1::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. - class ComputeInstanceRestoreProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The private IPv6 google access type for the VMs. - module InstancePrivateIpv6GoogleAccess - # Default value. This value is unused. - INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0 - - # Each network interface inherits PrivateIpv6GoogleAccess from its - # subnetwork. - INHERIT_FROM_SUBNETWORK = 1 - - # Outbound private IPv6 access from VMs in this subnet to Google services. - # If specified, the subnetwork who is attached to the instance's default - # network interface will be assigned an internal IPv6 prefix if it doesn't - # have before. - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2 - - # Bidirectional private IPv6 access to/from Google services. If - # specified, the subnetwork who is attached to the instance's default - # network interface will be assigned an internal IPv6 prefix if it doesn't - # have before. - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 - end - end - - # ComputeInstanceTargetEnvironment represents Compute Engine target - # environment to be used during restore. - # @!attribute [rw] project - # @return [::String] - # Required. Target project for the Compute Engine instance. - # @!attribute [rw] zone - # @return [::String] - # Required. The zone of the Compute Engine instance. - class ComputeInstanceTargetEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ComputeInstanceDataSourceProperties represents the properties of a - # ComputeEngine resource that are stored in the DataSource. - # @!attribute [rw] name - # @return [::String] - # Name of the compute instance backed up by the datasource. - # @!attribute [rw] description - # @return [::String] - # The description of the Compute Engine instance. - # @!attribute [rw] machine_type - # @return [::String] - # The machine type of the instance. - # @!attribute [rw] total_disk_count - # @return [::Integer] - # The total number of disks attached to the Instance. - # @!attribute [rw] total_disk_size_gb - # @return [::Integer] - # The sum of all the disk sizes. - class ComputeInstanceDataSourceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies options for controlling advanced machine features. - # @!attribute [rw] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization or not (default is - # false). - # @!attribute [rw] threads_per_core - # @return [::Integer] - # 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. - # @!attribute [rw] visible_core_count - # @return [::Integer] - # 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. - # @!attribute [rw] enable_uefi_networking - # @return [::Boolean] - # Optional. Whether to enable UEFI networking for instance creation. - class AdvancedMachineFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of Confidential Instance options. - # @!attribute [rw] enable_confidential_compute - # @return [::Boolean] - # Optional. Defines whether the instance should have confidential compute - # enabled. - class ConfidentialInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of Display Device options - # @!attribute [rw] enable_display - # @return [::Boolean] - # Optional. Enables display for the Compute Engine VM - class DisplayDevice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A specification of the type and number of accelerator cards attached to the - # instance. - # @!attribute [rw] accelerator_type - # @return [::String] - # Optional. Full or partial URL of the accelerator type resource to attach to - # this instance. - # @!attribute [rw] accelerator_count - # @return [::Integer] - # Optional. The number of the guest accelerator cards exposed to this - # instance. - class AcceleratorConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A customer-supplied encryption key. - # @!attribute [rw] raw_key - # @return [::String] - # Optional. Specifies a 256-bit customer-supplied - # encryption key. - # - # Note: The following fields are mutually exclusive: `raw_key`, `rsa_encrypted_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] rsa_encrypted_key - # @return [::String] - # Optional. RSA-wrapped 2048-bit - # customer-supplied encryption key to either encrypt or decrypt this - # resource. - # - # Note: The following fields are mutually exclusive: `rsa_encrypted_key`, `raw_key`, `kms_key_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The name of the encryption key that is stored in Google Cloud - # KMS. - # - # Note: The following fields are mutually exclusive: `kms_key_name`, `raw_key`, `rsa_encrypted_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kms_key_service_account - # @return [::String] - # 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. - class CustomerEncryptionKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A key/value pair to be used for storing metadata. - # @!attribute [rw] key - # @return [::String] - # Optional. Key for the metadata entry. - # @!attribute [rw] value - # @return [::String] - # 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). - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A metadata key/value entry. - # @!attribute [rw] items - # @return [::Array<::Google::Cloud::BackupDR::V1::Entry>] - # Optional. Array of key/value pairs. The total size of all keys and values - # must be less than 512 KB. - class Metadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A network interface resource attached to an instance. - # s - # @!attribute [rw] network - # @return [::String] - # Optional. URL of the VPC network resource for this instance. - # @!attribute [rw] subnetwork - # @return [::String] - # Optional. The URL of the Subnetwork resource for this instance. - # @!attribute [rw] ip_address - # @return [::String] - # 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. - # @!attribute [rw] ipv6_address - # @return [::String] - # 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. - # @!attribute [rw] internal_ipv6_prefix_length - # @return [::Integer] - # Optional. The prefix length of the primary internal IPv6 range. - # @!attribute [r] name - # @return [::String] - # Output only. [Output Only] The name of the network interface, which is - # generated by the server. - # @!attribute [rw] access_configs - # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] - # 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. - # @!attribute [rw] ipv6_access_configs - # @return [::Array<::Google::Cloud::BackupDR::V1::AccessConfig>] - # 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. - # @!attribute [rw] alias_ip_ranges - # @return [::Array<::Google::Cloud::BackupDR::V1::AliasIpRange>] - # Optional. An array of alias IP ranges for this network interface. - # You can only specify this field for network interfaces in VPC networks. - # @!attribute [rw] stack_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::StackType] - # The stack type for this network interface. - # @!attribute [rw] ipv6_access_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::Ipv6AccessType] - # Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the - # IP can be accessed from the Internet. This field is always inherited from - # its subnetwork. - # @!attribute [rw] queue_count - # @return [::Integer] - # 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. - # @!attribute [rw] nic_type - # @return [::Google::Cloud::BackupDR::V1::NetworkInterface::NicType] - # Optional. The type of vNIC to be used on this interface. This may be gVNIC - # or VirtioNet. - # @!attribute [rw] network_attachment - # @return [::String] - # 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}. - class NetworkInterface - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stack type for this network interface. - module StackType - # Default should be STACK_TYPE_UNSPECIFIED. - STACK_TYPE_UNSPECIFIED = 0 - - # The network interface will be assigned IPv4 address. - IPV4_ONLY = 1 - - # The network interface can have both IPv4 and IPv6 addresses. - IPV4_IPV6 = 2 - end - - # IPv6 access type for this network interface. - module Ipv6AccessType - # IPv6 access type not set. Means this network interface hasn't been - # turned on IPv6 yet. - UNSPECIFIED_IPV6_ACCESS_TYPE = 0 - - # This network interface can have internal IPv6. - INTERNAL = 1 - - # This network interface can have external IPv6. - EXTERNAL = 2 - end - - # Nic type for this network interface. - module NicType - # Default should be NIC_TYPE_UNSPECIFIED. - NIC_TYPE_UNSPECIFIED = 0 - - # VIRTIO - VIRTIO_NET = 1 - - # GVNIC - GVNIC = 2 - end - end - - # Network performance configuration. - # @!attribute [rw] total_egress_bandwidth_tier - # @return [::Google::Cloud::BackupDR::V1::NetworkPerformanceConfig::Tier] - # Optional. The tier of the total egress bandwidth. - class NetworkPerformanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Network performance tier. - module Tier - # This value is unused. - TIER_UNSPECIFIED = 0 - - # Default network performance config. - DEFAULT = 1 - - # Tier 1 network performance config. - TIER_1 = 2 - end - end - - # An access configuration attached to an instance's network interface. - # Only one access config per instance is supported. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::AccessConfig::AccessType] - # Optional. In accessConfigs (IPv4), the - # default and only option is ONE_TO_ONE_NAT. In - # ipv6AccessConfigs, the default and only option is - # DIRECT_IPV6. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of this access configuration. - # @!attribute [rw] external_ip - # @return [::String] - # Optional. The external IP address of this access configuration. - # @!attribute [rw] external_ipv6 - # @return [::String] - # Optional. The external IPv6 address of this access configuration. - # @!attribute [rw] external_ipv6_prefix_length - # @return [::Integer] - # Optional. The prefix length of the external IPv6 range. - # @!attribute [rw] set_public_ptr - # @return [::Boolean] - # 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. - # @!attribute [rw] public_ptr_domain_name - # @return [::String] - # Optional. The DNS domain name for the public PTR record. - # @!attribute [rw] network_tier - # @return [::Google::Cloud::BackupDR::V1::AccessConfig::NetworkTier] - # Optional. This signifies the networking tier used for configuring this - # access - class AccessConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of configuration. - module AccessType - # Default value. This value is unused. - ACCESS_TYPE_UNSPECIFIED = 0 - - # ONE_TO_ONE_NAT - ONE_TO_ONE_NAT = 1 - - # Direct IPv6 access. - DIRECT_IPV6 = 2 - end - - # Network tier property used by addresses, instances and forwarding rules. - module NetworkTier - # Default value. This value is unused. - NETWORK_TIER_UNSPECIFIED = 0 - - # High quality, Google-grade network tier, support for all networking - # products. - PREMIUM = 1 - - # Public internet quality, only limited support for other networking - # products. - STANDARD = 2 - end - end - - # An alias IP range attached to an instance's network interface. - # @!attribute [rw] ip_cidr_range - # @return [::String] - # Optional. The IP alias ranges to allocate for this interface. - # @!attribute [rw] subnetwork_range_name - # @return [::String] - # 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. - class AliasIpRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional instance params. - # @!attribute [rw] resource_manager_tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource manager tags to be bound to the instance. - class InstanceParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceManagerTagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifies the reservations that this instance can consume from. - # @!attribute [rw] consume_allocation_type - # @return [::Google::Cloud::BackupDR::V1::AllocationAffinity::Type] - # Optional. Specifies the type of reservation from which this instance can - # consume - # @!attribute [rw] key - # @return [::String] - # Optional. Corresponds to the label key of a reservation resource. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Corresponds to the label values of a reservation resource. - class AllocationAffinity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates whether to consume from a reservation or not. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # Do not consume from any allocated capacity. - NO_RESERVATION = 1 - - # Consume any allocation available. - ANY_RESERVATION = 2 - - # Must consume from a specific reservation. Must specify key value fields - # for specifying the reservations. - SPECIFIC_RESERVATION = 3 - end - end - - # Sets the scheduling options for an Instance. - # @!attribute [rw] on_host_maintenance - # @return [::Google::Cloud::BackupDR::V1::Scheduling::OnHostMaintenance] - # Optional. Defines the maintenance behavior for this instance. - # @!attribute [rw] automatic_restart - # @return [::Boolean] - # Optional. Specifies whether the instance should be automatically restarted - # if it is terminated by Compute Engine (not terminated by a user). - # @!attribute [rw] preemptible - # @return [::Boolean] - # Optional. Defines whether the instance is preemptible. - # @!attribute [rw] node_affinities - # @return [::Array<::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity>] - # Optional. A set of node affinity and anti-affinity configurations. - # Overrides reservationAffinity. - # @!attribute [rw] min_node_cpus - # @return [::Integer] - # Optional. The minimum number of virtual CPUs this instance will consume - # when running on a sole-tenant node. - # @!attribute [rw] provisioning_model - # @return [::Google::Cloud::BackupDR::V1::Scheduling::ProvisioningModel] - # Optional. Specifies the provisioning model of the instance. - # @!attribute [rw] instance_termination_action - # @return [::Google::Cloud::BackupDR::V1::Scheduling::InstanceTerminationAction] - # Optional. Specifies the termination action for the instance. - # @!attribute [rw] local_ssd_recovery_timeout - # @return [::Google::Cloud::BackupDR::V1::SchedulingDuration] - # 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. - class Scheduling - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Node Affinity: the configuration of desired nodes onto which this Instance - # could be scheduled. - # @!attribute [rw] key - # @return [::String] - # Optional. Corresponds to the label key of Node resource. - # @!attribute [rw] operator - # @return [::Google::Cloud::BackupDR::V1::Scheduling::NodeAffinity::Operator] - # Optional. Defines the operation of node selection. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Corresponds to the label values of Node resource. - class NodeAffinity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the type of node selections. - module Operator - # Default value. This value is unused. - OPERATOR_UNSPECIFIED = 0 - - # Requires Compute Engine to seek for matched nodes. - IN = 1 - - # Requires Compute Engine to avoid certain nodes. - NOT_IN = 2 - end - end - - # Defines the maintenance behavior for this instance= - module OnHostMaintenance - # Default value. This value is unused. - ON_HOST_MAINTENANCE_UNSPECIFIED = 0 - - # Tells Compute Engine to terminate and (optionally) restart the instance - # away from the maintenance activity. - TERMINATE = 1 - - # Default, Allows Compute Engine to automatically migrate instances - # out of the way of maintenance events. - MIGRATE = 1000 - end - - # Defines the provisioning model for an instance. - module ProvisioningModel - # Default value. This value is not used. - PROVISIONING_MODEL_UNSPECIFIED = 0 - - # Standard provisioning with user controlled runtime, no discounts. - STANDARD = 1 - - # Heavily discounted, no guaranteed runtime. - SPOT = 2 - end - - # Defines the supported termination actions for an instance. - module InstanceTerminationAction - # Default value. This value is unused. - INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0 - - # Delete the VM. - DELETE = 1 - - # Stop the VM without storing in-memory content. default action. - STOP = 2 - end - end - - # A SchedulingDuration represents a fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". Range is approximately 10,000 years. - # @!attribute [rw] seconds - # @return [::Integer] - # Optional. Span of time at a resolution of a second. - # @!attribute [rw] nanos - # @return [::Integer] - # Optional. Span of time that's a fraction of a second at nanosecond - # resolution. - class SchedulingDuration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A service account. - # @!attribute [rw] email - # @return [::String] - # Optional. Email address of the service account. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Optional. The list of scopes to be made available for this service account. - class ServiceAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of instance tags. - # @!attribute [rw] items - # @return [::Array<::String>] - # Optional. An array of tags. Each tag must be 1-63 characters long, and - # comply with RFC1035. - class Tags - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An instance-attached disk resource. - # @!attribute [rw] initialize_params - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::InitializeParams] - # Optional. Specifies the parameters to initialize this disk. - # @!attribute [rw] device_name - # @return [::String] - # 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) - # @!attribute [rw] kind - # @return [::String] - # Optional. Type of the resource. - # @!attribute [rw] disk_type_deprecated - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] - # Specifies the type of the disk. - # @!attribute [rw] mode - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskMode] - # Optional. The mode in which to attach this disk. - # @!attribute [rw] source - # @return [::String] - # Optional. Specifies a valid partial or full URL to an existing Persistent - # Disk resource. - # @!attribute [rw] index - # @return [::Integer] - # Optional. A zero-based index to this disk, where 0 is reserved for the - # boot disk. - # @!attribute [rw] boot - # @return [::Boolean] - # Optional. Indicates that this is a boot disk. The virtual machine will use - # the first partition of the disk for its root filesystem. - # @!attribute [rw] auto_delete - # @return [::Boolean] - # Optional. Specifies whether the disk will be auto-deleted when the instance - # is deleted (but not when the disk is detached from the instance). - # @!attribute [rw] license - # @return [::Array<::String>] - # Optional. Any valid publicly visible licenses. - # @!attribute [rw] disk_interface - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskInterface] - # Optional. Specifies the disk interface to use for attaching this disk. - # @!attribute [rw] guest_os_feature - # @return [::Array<::Google::Cloud::BackupDR::V1::GuestOsFeature>] - # Optional. A list of features to enable on the guest operating system. - # Applicable only for bootable images. - # @!attribute [rw] disk_encryption_key - # @return [::Google::Cloud::BackupDR::V1::CustomerEncryptionKey] - # Optional. Encrypts or decrypts a disk using a customer-supplied - # encryption key. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Optional. The size of the disk in GB. - # @!attribute [r] saved_state - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskSavedState] - # Optional. Output only. The state of the disk. - # @!attribute [r] disk_type - # @return [::String] - # Optional. Output only. The URI of the disk type resource. For example: - # projects/project/zones/zone/diskTypes/pd-standard or pd-ssd - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::AttachedDisk::DiskType] - # Optional. Specifies the type of the disk. - class AttachedDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the parameters to initialize this disk. - # @!attribute [rw] disk_name - # @return [::String] - # Optional. Specifies the disk name. If not specified, the default is to - # use the name of the instance. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # Optional. URL of the zone where the disk should be created. - # Required for each regional disk associated with the instance. - class InitializeParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of the Disk Types. - module DiskType - # Default value, which is unused. - DISK_TYPE_UNSPECIFIED = 0 - - # A scratch disk type. - SCRATCH = 1 - - # A persistent disk type. - PERSISTENT = 2 - end - - # List of the Disk Modes. - module DiskMode - # Default value, which is unused. - DISK_MODE_UNSPECIFIED = 0 - - # Attaches this disk in read-write mode. Only one - # virtual machine at a time can be attached to a disk in read-write mode. - READ_WRITE = 1 - - # Attaches this disk in read-only mode. Multiple virtual machines can use - # a disk in read-only mode at a time. - READ_ONLY = 2 - - # The disk is locked for administrative reasons. Nobody else - # can use the disk. This mode is used (for example) when taking - # a snapshot of a disk to prevent mounting the disk while it is - # being snapshotted. - LOCKED = 3 - end - - # List of the Disk Interfaces. - module DiskInterface - # Default value, which is unused. - DISK_INTERFACE_UNSPECIFIED = 0 - - # SCSI Disk Interface. - SCSI = 1 - - # NVME Disk Interface. - NVME = 2 - - # NVDIMM Disk Interface. - NVDIMM = 3 - - # ISCSI Disk Interface. - ISCSI = 4 - end - - # List of the states of the Disk. - module DiskSavedState - # Default Disk state has not been preserved. - DISK_SAVED_STATE_UNSPECIFIED = 0 - - # Disk state has been preserved. - PRESERVED = 1 - end - end - - # Feature type of the Guest OS. - # @!attribute [rw] type - # @return [::Google::Cloud::BackupDR::V1::GuestOsFeature::FeatureType] - # The ID of a supported feature. - class GuestOsFeature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # List of the Feature Types. - module FeatureType - # Default value, which is unused. - FEATURE_TYPE_UNSPECIFIED = 0 - - # VIRTIO_SCSI_MULTIQUEUE feature type. - VIRTIO_SCSI_MULTIQUEUE = 1 - - # WINDOWS feature type. - WINDOWS = 2 - - # MULTI_IP_SUBNET feature type. - MULTI_IP_SUBNET = 3 - - # UEFI_COMPATIBLE feature type. - UEFI_COMPATIBLE = 4 - - # SECURE_BOOT feature type. - SECURE_BOOT = 5 - - # GVNIC feature type. - GVNIC = 6 - - # SEV_CAPABLE feature type. - SEV_CAPABLE = 7 - - # BARE_METAL_LINUX_COMPATIBLE feature type. - BARE_METAL_LINUX_COMPATIBLE = 8 - - # SUSPEND_RESUME_COMPATIBLE feature type. - SUSPEND_RESUME_COMPATIBLE = 9 - - # SEV_LIVE_MIGRATABLE feature type. - SEV_LIVE_MIGRATABLE = 10 - - # SEV_SNP_CAPABLE feature type. - SEV_SNP_CAPABLE = 11 - - # TDX_CAPABLE feature type. - TDX_CAPABLE = 12 - - # IDPF feature type. - IDPF = 13 - - # SEV_LIVE_MIGRATABLE_V2 feature type. - SEV_LIVE_MIGRATABLE_V2 = 14 - end - end - - # Specifies whether the virtual machine instance will be shut down on key - # revocation. It is currently used in instance, instance properties and GMI - # protos - module KeyRevocationActionType - # Default value. This value is unused. - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0 - - # Indicates user chose no operation. - NONE = 1 - - # Indicates user chose to opt for VM shutdown on key revocation. - STOP = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb deleted file mode 100644 index d6e8a8da44c0..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/cloud/backupdr/v1/datasourcereference.rb +++ /dev/null @@ -1,228 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BackupDR - module V1 - # DataSourceReference is a reference to a DataSource resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the DataSourceReference. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - # @!attribute [r] data_source - # @return [::String] - # Output only. The resource name of the DataSource. - # Format: - # projects/\\{project}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{dataSource} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataSourceReference was created. - # @!attribute [r] data_source_backup_config_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigState] - # Output only. The backup configuration state of the DataSource. - # @!attribute [r] data_source_backup_count - # @return [::Integer] - # Output only. Number of backups in the DataSource. - # @!attribute [r] data_source_backup_config_info - # @return [::Google::Cloud::BackupDR::V1::DataSourceBackupConfigInfo] - # Output only. Information of backup configuration on the DataSource. - # @!attribute [r] data_source_gcp_resource_info - # @return [::Google::Cloud::BackupDR::V1::DataSourceGcpResourceInfo] - # Output only. The GCP resource that the DataSource is associated with. - # @!attribute [r] total_stored_bytes - # @return [::Integer] - # Output only. Total size of the storage used by all backup resources for the - # referenced datasource. - class DataSourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information of backup configuration on the DataSource. - # @!attribute [r] last_backup_state - # @return [::Google::Cloud::BackupDR::V1::BackupConfigInfo::LastBackupState] - # Output only. The status of the last backup in this DataSource - # @!attribute [r] last_successful_backup_consistency_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the last successful backup to this DataSource. - class DataSourceBackupConfigInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The GCP resource that the DataSource is associated with. - # @!attribute [r] gcp_resourcename - # @return [::String] - # Output only. The resource name of the GCP resource. - # Ex: projects/\\{project}/zones/\\{zone}/instances/\\{instance} - # @!attribute [r] type - # @return [::String] - # Output only. The type of the GCP resource. - # Ex: compute.googleapis.com/Instance - # @!attribute [r] location - # @return [::String] - # Output only. The location of the GCP resource. - # Ex: //"global"/"unspecified" - # @!attribute [r] cloud_sql_instance_properties - # @return [::Google::Cloud::BackupDR::V1::CloudSqlInstanceDataSourceReferenceProperties] - # Output only. The properties of the Cloud SQL instance. - class DataSourceGcpResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the GetDataSourceReference method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the DataSourceReference to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference} - class GetDataSourceReferenceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the ListDataSourceReferences method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataSourceReferences` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDataSourceReferences` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results listed in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. - # - # The following field and operator combinations are supported: - # - # * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` - # * data_source_gcp_resource_info.type with `=`, `!=` - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - class ListDataSourceReferencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the ListDataSourceReferences method. - # @!attribute [rw] data_source_references - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # The DataSourceReferences from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataSourceReferencesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the FetchDataSourceReferencesForResourceType method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the GCP resource. - # Ex: sql.googleapis.com/Instance - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of DataSourceReferences to return. The service - # may return fewer than this value. If unspecified, at most 50 - # DataSourceReferences will be returned. The maximum value is 100; values - # above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous call of - # `FetchDataSourceReferencesForResourceType`. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `FetchDataSourceReferencesForResourceType` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters the results fetched in the - # response. The expression must specify the field name, a comparison - # operator, and the value that you want to use for filtering. Supported - # fields: - # * data_source - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_backup_config_state - # * data_source_backup_count - # * data_source_backup_config_info.last_backup_state - # * data_source_gcp_resource_info.gcp_resourcename - # * data_source_gcp_resource_info.type - # * data_source_gcp_resource_info.location - # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time - # @!attribute [rw] order_by - # @return [::String] - # Optional. A comma-separated list of fields to order by, sorted in ascending - # order. Use "desc" after a field name for descending. - # - # Supported fields: - # * name - class FetchDataSourceReferencesForResourceTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the FetchDataSourceReferencesForResourceType method. - # @!attribute [rw] data_source_references - # @return [::Array<::Google::Cloud::BackupDR::V1::DataSourceReference>] - # The DataSourceReferences from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class FetchDataSourceReferencesForResourceTypeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 1b485b0c3456..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/dayofweek.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb b/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb deleted file mode 100644 index 3e27c902551d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/proto_docs/google/type/month.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a month in the Gregorian calendar. - module Month - # The unspecified month. - MONTH_UNSPECIFIED = 0 - - # The month of January. - JANUARY = 1 - - # The month of February. - FEBRUARY = 2 - - # The month of March. - MARCH = 3 - - # The month of April. - APRIL = 4 - - # The month of May. - MAY = 5 - - # The month of June. - JUNE = 6 - - # The month of July. - JULY = 7 - - # The month of August. - AUGUST = 8 - - # The month of September. - SEPTEMBER = 9 - - # The month of October. - OCTOBER = 10 - - # The month of November. - NOVEMBER = 11 - - # The month of December. - DECEMBER = 12 - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile deleted file mode 100644 index 4febd3ff4e67..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-backupdr-v1", path: "../" -else - gem "google-cloud-backupdr-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb deleted file mode 100644 index e5b889a4dfa1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan. -# -def create_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new - - # Call the create_backup_plan method. - result = client.create_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb deleted file mode 100644 index 628c925da9e2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_plan_association.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association. -# -def create_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new - - # Call the create_backup_plan_association method. - result = client.create_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb deleted file mode 100644 index 30f7bcaa3098..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_backup_vault.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_CreateBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault. -# -def create_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new - - # Call the create_backup_vault method. - result = client.create_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb deleted file mode 100644 index 8eb6c732f376..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/create_management_server.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_CreateManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the create_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server. -# -def create_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new - - # Call the create_management_server method. - result = client.create_management_server request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_CreateManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb deleted file mode 100644 index d920bccbb83b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup. -# -def delete_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new - - # Call the delete_backup method. - result = client.delete_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb deleted file mode 100644 index a1585e7a803b..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan. -# -def delete_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new - - # Call the delete_backup_plan method. - result = client.delete_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb deleted file mode 100644 index 68037dc3c1c4..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_plan_association.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association. -# -def delete_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new - - # Call the delete_backup_plan_association method. - result = client.delete_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb deleted file mode 100644 index bfc3d415812f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_backup_vault.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault. -# -def delete_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new - - # Call the delete_backup_vault method. - result = client.delete_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb deleted file mode 100644 index 6e0a6c8cea65..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/delete_management_server.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the delete_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server. -# -def delete_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new - - # Call the delete_management_server method. - result = client.delete_management_server request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_DeleteManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb deleted file mode 100644 index 0caa4cac2125..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backup_plan_associations_for_resource_type.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type. -# -def fetch_backup_plan_associations_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new - - # Call the fetch_backup_plan_associations_for_resource_type method. - result = client.fetch_backup_plan_associations_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb deleted file mode 100644 index 8cd5de148567..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_backups_for_resource_type.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_backups_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type. -# -def fetch_backups_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new - - # Call the fetch_backups_for_resource_type method. - result = client.fetch_backups_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb deleted file mode 100644 index dfcab2575125..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_data_source_references_for_resource_type.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type. -# -def fetch_data_source_references_for_resource_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new - - # Call the fetch_data_source_references_for_resource_type method. - result = client.fetch_data_source_references_for_resource_type request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb deleted file mode 100644 index a69bc309bc34..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/fetch_usable_backup_vaults.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the fetch_usable_backup_vaults call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults. -# -def fetch_usable_backup_vaults - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new - - # Call the fetch_usable_backup_vaults method. - result = client.fetch_usable_backup_vaults request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - p item - end -end -# [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb deleted file mode 100644 index 657958fff3c2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup. -# -def get_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupRequest.new - - # Call the get_backup method. - result = client.get_backup request - - # The returned object is of type Google::Cloud::BackupDR::V1::Backup. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb deleted file mode 100644 index 7f12d19c6466..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan. -# -def get_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new - - # Call the get_backup_plan method. - result = client.get_backup_plan request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb deleted file mode 100644 index 95a3715c6d53..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_association.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association. -# -def get_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new - - # Call the get_backup_plan_association method. - result = client.get_backup_plan_association request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb deleted file mode 100644 index d9bdfc3ff576..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_plan_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_plan_revision call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision. -# -def get_backup_plan_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new - - # Call the get_backup_plan_revision method. - result = client.get_backup_plan_revision request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb deleted file mode 100644 index b42028f7c351..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_backup_vault.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault. -# -def get_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new - - # Call the get_backup_vault method. - result = client.get_backup_vault request - - # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. - p result -end -# [END backupdr_v1_generated_BackupDR_GetBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb deleted file mode 100644 index d86a885d8a7f..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetDataSource_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_data_source call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source. -# -def get_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new - - # Call the get_data_source method. - result = client.get_data_source request - - # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. - p result -end -# [END backupdr_v1_generated_BackupDR_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb deleted file mode 100644 index 789a665be9b7..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_data_source_reference.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_data_source_reference call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference. -# -def get_data_source_reference - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new - - # Call the get_data_source_reference method. - result = client.get_data_source_reference request - - # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference. - p result -end -# [END backupdr_v1_generated_BackupDR_GetDataSourceReference_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb deleted file mode 100644 index 0ab70b155c06..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/get_management_server.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_GetManagementServer_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the get_management_server call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server. -# -def get_management_server - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new - - # Call the get_management_server method. - result = client.get_management_server request - - # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. - p result -end -# [END backupdr_v1_generated_BackupDR_GetManagementServer_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb deleted file mode 100644 index 1a6248e10433..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/initialize_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_InitializeService_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the initialize_service call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service. -# -def initialize_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::InitializeServiceRequest.new - - # Call the initialize_service method. - result = client.initialize_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_InitializeService_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb deleted file mode 100644 index 1be14c9502b1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_associations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plan_associations call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations. -# -def list_backup_plan_associations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new - - # Call the list_backup_plan_associations method. - result = client.list_backup_plan_associations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb deleted file mode 100644 index 523bdada0405..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plan_revisions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plan_revisions call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions. -# -def list_backup_plan_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new - - # Call the list_backup_plan_revisions method. - result = client.list_backup_plan_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb deleted file mode 100644 index 68a2931714bf..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_plans.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupPlans_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_plans call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans. -# -def list_backup_plans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new - - # Call the list_backup_plans method. - result = client.list_backup_plans request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupPlans_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb deleted file mode 100644 index bd68d0f95f72..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backup_vaults.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackupVaults_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backup_vaults call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults. -# -def list_backup_vaults - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new - - # Call the list_backup_vaults method. - result = client.list_backup_vaults request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackupVaults_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb deleted file mode 100644 index 865ebe38ae19..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_backups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListBackups_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_backups call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups. -# -def list_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new - - # Call the list_backups method. - result = client.list_backups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::Backup. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb deleted file mode 100644 index c0cbb790e2d0..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_source_references.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_data_source_references call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references. -# -def list_data_source_references - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new - - # Call the list_data_source_references method. - result = client.list_data_source_references request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb deleted file mode 100644 index 5607c9beb443..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_data_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListDataSources_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_data_sources call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources. -# -def list_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new - - # Call the list_data_sources method. - result = client.list_data_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb deleted file mode 100644 index c026e846fb03..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/list_management_servers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_ListManagementServers_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the list_management_servers call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers. -# -def list_management_servers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new - - # Call the list_management_servers method. - result = client.list_management_servers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. - p item - end -end -# [END backupdr_v1_generated_BackupDR_ListManagementServers_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb deleted file mode 100644 index 0f57a119d916..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/restore_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_RestoreBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the restore_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup. -# -def restore_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new - - # Call the restore_backup method. - result = client.restore_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_RestoreBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb deleted file mode 100644 index d5b2a0664bef..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/trigger_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_TriggerBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the trigger_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup. -# -def trigger_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new - - # Call the trigger_backup method. - result = client.trigger_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_TriggerBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb deleted file mode 100644 index 90ba04ae397e..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateBackup_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup. -# -def update_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new - - # Call the update_backup method. - result = client.update_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb deleted file mode 100644 index f2bdd1d70e64..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_plan call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan. -# -def update_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new - - # Call the update_backup_plan method. - result = client.update_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb deleted file mode 100644 index eaf3f010e273..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_plan_association.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_plan_association call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association. -# -def update_backup_plan_association - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new - - # Call the update_backup_plan_association method. - result = client.update_backup_plan_association request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb deleted file mode 100644 index 5b0d5a057c05..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_backup_vault.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_backup_vault call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault. -# -def update_backup_vault - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new - - # Call the update_backup_vault method. - result = client.update_backup_vault request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateBackupVault_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb b/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb deleted file mode 100644 index 1167757bc2d9..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/backupdr/update_data_source.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START backupdr_v1_generated_BackupDR_UpdateDataSource_sync] -require "google/cloud/backupdr/v1" - -## -# Snippet for the update_data_source call in the BackupDR service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source. -# -def update_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BackupDR::V1::BackupDR::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new - - # Call the update_data_source method. - result = client.update_data_source request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END backupdr_v1_generated_BackupDR_UpdateDataSource_sync] diff --git a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json deleted file mode 100644 index fa4385c64a8c..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/snippets/snippet_metadata_google.cloud.backupdr.v1.json +++ /dev/null @@ -1,1535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-backupdr-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.backupdr.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "backupdr_v1_generated_BackupDR_ListManagementServers_sync", - "title": "Snippet for the list_management_servers call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers.", - "file": "backupdr/list_management_servers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_management_servers", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_management_servers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListManagementServersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListManagementServersResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListManagementServers", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetManagementServer_sync", - "title": "Snippet for the get_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server.", - "file": "backupdr/get_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ManagementServer", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateManagementServer_sync", - "title": "Snippet for the create_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server.", - "file": "backupdr/create_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_sync", - "title": "Snippet for the delete_management_server call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server.", - "file": "backupdr/delete_management_server.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_management_server", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_management_server", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteManagementServer", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupVault_sync", - "title": "Snippet for the create_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault.", - "file": "backupdr/create_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupVaults_sync", - "title": "Snippet for the list_backup_vaults call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults.", - "file": "backupdr/list_backup_vaults.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_vaults", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_vaults", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupVaults", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_sync", - "title": "Snippet for the fetch_usable_backup_vaults call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults.", - "file": "backupdr/fetch_usable_backup_vaults.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_usable_backup_vaults", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_usable_backup_vaults", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchUsableBackupVaults", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupVault_sync", - "title": "Snippet for the get_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault.", - "file": "backupdr/get_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupVault", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_sync", - "title": "Snippet for the update_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault.", - "file": "backupdr/update_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_sync", - "title": "Snippet for the delete_backup_vault call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault.", - "file": "backupdr/delete_backup_vault.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_vault", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_vault", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupVault", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListDataSources_sync", - "title": "Snippet for the list_data_sources call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources.", - "file": "backupdr/list_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_sources", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourcesResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListDataSources", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetDataSource_sync", - "title": "Snippet for the get_data_source call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source.", - "file": "backupdr/get_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::DataSource", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetDataSource", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateDataSource_sync", - "title": "Snippet for the update_data_source call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source.", - "file": "backupdr/update_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_source", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateDataSource", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackups_sync", - "title": "Snippet for the list_backups call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups.", - "file": "backupdr/list_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backups", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackups", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupsForResourceType_sync", - "title": "Snippet for the fetch_backups_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type.", - "file": "backupdr/fetch_backups_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_backups_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backups_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchBackupsForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupsForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackup_sync", - "title": "Snippet for the get_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup.", - "file": "backupdr/get_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::Backup", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackup_sync", - "title": "Snippet for the update_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup.", - "file": "backupdr/update_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackup_sync", - "title": "Snippet for the delete_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup.", - "file": "backupdr/delete_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_RestoreBackup_sync", - "title": "Snippet for the restore_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup.", - "file": "backupdr/restore_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#restore_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::RestoreBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "RestoreBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_sync", - "title": "Snippet for the create_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan.", - "file": "backupdr/create_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlan_sync", - "title": "Snippet for the update_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan.", - "file": "backupdr/update_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlan_sync", - "title": "Snippet for the get_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan.", - "file": "backupdr/get_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlan", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlans_sync", - "title": "Snippet for the list_backup_plans call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans.", - "file": "backupdr/list_backup_plans.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plans", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlansRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlansResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlans", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_sync", - "title": "Snippet for the delete_backup_plan call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan.", - "file": "backupdr/delete_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_plan", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupPlan", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanRevision_sync", - "title": "Snippet for the get_backup_plan_revision call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision.", - "file": "backupdr/get_backup_plan_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan_revision", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanRevision", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlanRevision", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanRevision", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanRevisions_sync", - "title": "Snippet for the list_backup_plan_revisions call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions.", - "file": "backupdr/list_backup_plan_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plan_revisions", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlanRevisions", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanRevisions", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_sync", - "title": "Snippet for the create_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association.", - "file": "backupdr/create_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#create_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "CreateBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_UpdateBackupPlanAssociation_sync", - "title": "Snippet for the update_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association.", - "file": "backupdr/update_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#update_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "UpdateBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.UpdateBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_sync", - "title": "Snippet for the get_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association.", - "file": "backupdr/get_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::BackupPlanAssociation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_sync", - "title": "Snippet for the list_backup_plan_associations call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations.", - "file": "backupdr/list_backup_plan_associations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plan_associations", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_backup_plan_associations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListBackupPlanAssociations", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync", - "title": "Snippet for the fetch_backup_plan_associations_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type.", - "file": "backupdr/fetch_backup_plan_associations_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_backup_plan_associations_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_backup_plan_associations_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchBackupPlanAssociationsForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchBackupPlanAssociationsForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_sync", - "title": "Snippet for the delete_backup_plan_association call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association.", - "file": "backupdr/delete_backup_plan_association.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_plan_association", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#delete_backup_plan_association", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "DeleteBackupPlanAssociation", - "full_name": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_TriggerBackup_sync", - "title": "Snippet for the trigger_backup call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup.", - "file": "backupdr/trigger_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "trigger_backup", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#trigger_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::TriggerBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "TriggerBackup", - "full_name": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_GetDataSourceReference_sync", - "title": "Snippet for the get_data_source_reference call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference.", - "file": "backupdr/get_data_source_reference.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source_reference", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#get_data_source_reference", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::DataSourceReference", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "GetDataSourceReference", - "full_name": "google.cloud.backupdr.v1.BackupDR.GetDataSourceReference", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_ListDataSourceReferences_sync", - "title": "Snippet for the list_data_source_references call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references.", - "file": "backupdr/list_data_source_references.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_source_references", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#list_data_source_references", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "ListDataSourceReferences", - "full_name": "google.cloud.backupdr.v1.BackupDR.ListDataSourceReferences", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync", - "title": "Snippet for the fetch_data_source_references_for_resource_type call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type.", - "file": "backupdr/fetch_data_source_references_for_resource_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_data_source_references_for_resource_type", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#fetch_data_source_references_for_resource_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "FetchDataSourceReferencesForResourceType", - "full_name": "google.cloud.backupdr.v1.BackupDR.FetchDataSourceReferencesForResourceType", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDR_InitializeService_sync", - "title": "Snippet for the initialize_service call in the BackupDR service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service.", - "file": "backupdr/initialize_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "initialize_service", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client#initialize_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::InitializeServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupDR::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDR::Client" - }, - "method": { - "short_name": "InitializeService", - "full_name": "google.cloud.backupdr.v1.BackupDR.InitializeService", - "service": { - "short_name": "BackupDR", - "full_name": "google.cloud.backupdr.v1.BackupDR" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "backupdr_v1_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync", - "title": "Snippet for the list_resource_backup_configs call in the BackupDrProtectionSummary service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs.", - "file": "backup_dr_protection_summary/list_resource_backup_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_resource_backup_configs", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client#list_resource_backup_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsResponse", - "client": { - "short_name": "BackupDrProtectionSummary::Client", - "full_name": "::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client" - }, - "method": { - "short_name": "ListResourceBackupConfigs", - "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary.ListResourceBackupConfigs", - "service": { - "short_name": "BackupDrProtectionSummary", - "full_name": "google.cloud.backupdr.v1.BackupDrProtectionSummary" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb deleted file mode 100644 index 93faecb1e332..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr_services_pb" -require "google/cloud/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb deleted file mode 100644 index 889ee8ed12b1..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_paths_test.rb +++ /dev/null @@ -1,199 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_backup_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3", backup: "value4" - assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3/backups/value4", path - end - end - - def test_backup_plan_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_path project: "value0", location: "value1", backup_plan: "value2" - assert_equal "projects/value0/locations/value1/backupPlans/value2", path - end - end - - def test_backup_plan_association_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_association_path project: "value0", location: "value1", backup_plan_association: "value2" - assert_equal "projects/value0/locations/value1/backupPlanAssociations/value2", path - end - end - - def test_backup_plan_revision_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_revision_path project: "value0", location: "value1", backup_plan: "value2", revision: "value3" - assert_equal "projects/value0/locations/value1/backupPlans/value2/revisions/value3", path - end - end - - def test_backup_vault_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_vault_path project: "value0", location: "value1", backupvault: "value2" - assert_equal "projects/value0/locations/value1/backupVaults/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", ring: "value2", key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_crypto_key_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path - end - end - - def test_data_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_path project: "value0", location: "value1", backupvault: "value2", datasource: "value3" - assert_equal "projects/value0/locations/value1/backupVaults/value2/dataSources/value3", path - end - end - - def test_data_source_reference_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_reference_path project: "value0", location: "value1", data_source_reference: "value2" - assert_equal "projects/value0/locations/value1/dataSourceReferences/value2", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", instance: "value1" - assert_equal "projects/value0/instances/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_management_server_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.management_server_path project: "value0", location: "value1", managementserver: "value2" - assert_equal "projects/value0/locations/value1/managementServers/value2", path - end - end - - def test_storage_pool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.storage_pool_path project: "value0", zone: "value1", storage_pool: "value2" - assert_equal "projects/value0/zones/value1/storagePools/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb deleted file mode 100644 index 4e67aa6b660d..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_rest_test.rb +++ /dev/null @@ -1,2196 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr/rest" - - -class ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_management_servers - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_management_servers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_management_servers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_management_servers_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_management_servers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_management_servers_client_stub.call_count - end - end - end - - def test_get_management_server - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ManagementServer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_management_server({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_management_server name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_management_server({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_management_server_client_stub.call_count - end - end - end - - def test_create_management_server - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - management_server_id = "hello world" - management_server = {} - request_id = "hello world" - - create_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_management_server_client_stub.call_count - end - end - end - - def test_delete_management_server - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_management_server_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_management_server_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_management_server({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_management_server name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_management_server({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_management_server_client_stub.call_count - end - end - end - - def test_create_backup_vault - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_vault_id = "hello world" - backup_vault = {} - request_id = "hello world" - validate_only = true - - create_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_vault_client_stub.call_count - end - end - end - - def test_list_backup_vaults - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - list_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_vaults_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_vaults_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_vaults_client_stub.call_count - end - end - end - - def test_fetch_usable_backup_vaults - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_usable_backup_vaults_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_usable_backup_vaults_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_usable_backup_vaults_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_usable_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_usable_backup_vaults_client_stub.call_count - end - end - end - - def test_get_backup_vault - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupVault.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - get_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_vault({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_vault name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_vault({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_vault_client_stub.call_count - end - end - end - - def test_update_backup_vault - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - backup_vault = {} - request_id = "hello world" - validate_only = true - force = true - force_update_access_restriction = true - - update_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_vault_client_stub.call_count - end - end - end - - def test_delete_backup_vault - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - etag = "hello world" - validate_only = true - allow_missing = true - ignore_backup_plan_references = true - - delete_backup_vault_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_vault_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_vault_client_stub.call_count - end - end - end - - def test_list_data_sources - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_sources parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_sources_client_stub.call_count - end - end - end - - def test_get_data_source - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_count - end - end - end - - def test_update_data_source - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_source = {} - request_id = "hello world" - allow_missing = true - - update_data_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_source_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_source_client_stub.call_count - end - end - end - - def test_list_backups - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_count - end - end - end - - def test_fetch_backups_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - fetch_backups_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backups_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_backups_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_backups_for_resource_type_client_stub.call_count - end - end - end - - def test_get_backup - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_count - end - end - end - - def test_update_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - backup = {} - request_id = "hello world" - - update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_client_stub.call_count - end - end - end - - def test_delete_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_count - end - end - end - - def test_restore_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - compute_instance_target_environment = {} - compute_instance_restore_properties = {} - clear_overrides_field_mask = {} - - restore_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_restore_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_backup_client_stub.call_count - end - end - end - - def test_create_backup_plan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan_id = "hello world" - backup_plan = {} - request_id = "hello world" - - create_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_plan_client_stub.call_count - end - end - end - - def test_update_backup_plan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup_plan = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_plan_client_stub.call_count - end - end - end - - def test_get_backup_plan - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlan.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_plan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_plan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_plan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_client_stub.call_count - end - end - end - - def test_list_backup_plans - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_backup_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plans_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_plans_client_stub.call_count - end - end - end - - def test_delete_backup_plan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_plan({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_plan name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_plan({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_plan_client_stub.call_count - end - end - end - - def test_get_backup_plan_revision - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_revision_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_plan_revision({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_plan_revision name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_plan_revision({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_revision_client_stub.call_count - end - end - end - - def test_list_backup_plan_revisions - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_backup_plan_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plan_revisions_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_plan_revisions_client_stub.call_count - end - end - end - - def test_create_backup_plan_association - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan_association_id = "hello world" - backup_plan_association = {} - request_id = "hello world" - - create_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_create_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_plan_association_client_stub.call_count - end - end - end - - def test_update_backup_plan_association - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup_plan_association = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_update_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_plan_association_client_stub.call_count - end - end - end - - def test_get_backup_plan_association - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_plan_association({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_plan_association name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_plan_association({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_association_client_stub.call_count - end - end - end - - def test_list_backup_plan_associations - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_backup_plan_associations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_backup_plan_associations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plan_associations_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_plan_associations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_plan_associations_client_stub.call_count - end - end - end - - def test_fetch_backup_plan_associations_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_backup_plan_associations_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_count - end - end - end - - def test_delete_backup_plan_association - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_plan_association_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_delete_backup_plan_association_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_plan_association({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_plan_association name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_plan_association({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_plan_association_client_stub.call_count - end - end - end - - def test_trigger_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - rule_id = "hello world" - request_id = "hello world" - - trigger_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_trigger_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, trigger_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, trigger_backup_client_stub.call_count - end - end - end - - def test_get_data_source_reference - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::DataSourceReference.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_reference_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_get_data_source_reference_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_reference_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_source_reference({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_source_reference name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_source_reference({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_reference_client_stub.call_count - end - end - end - - def test_list_data_source_references - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_source_references_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_list_data_source_references_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_source_references_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_source_references parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_source_references_client_stub.call_count - end - end - end - - def test_fetch_data_source_references_for_resource_type - # Create test objects. - client_result = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_data_source_references_for_resource_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_fetch_data_source_references_for_resource_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_count - end - end - end - - def test_initialize_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - resource_type = "hello world" - request_id = "hello world" - cloud_sql_instance_initialization_config = {} - - initialize_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BackupDR::V1::BackupDR::Rest::ServiceStub.stub :transcode_initialize_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, initialize_service_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, initialize_service_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb deleted file mode 100644 index 0e7a35ab8959..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/google/cloud/backupdr/v1/backupdr_test.rb +++ /dev/null @@ -1,2613 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/backupdr/v1/backupdr_pb" -require "google/cloud/backupdr/v1/backupdr" - -class ::Google::Cloud::BackupDR::V1::BackupDR::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_management_servers - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListManagementServersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_management_servers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_management_servers, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListManagementServersRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert request.has_filter? - assert_equal "hello world", request["order_by"] - assert request.has_order_by? - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_management_servers_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_management_servers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_management_servers ::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_management_servers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_management_servers(::Google::Cloud::BackupDR::V1::ListManagementServersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_management_servers_client_stub.call_rpc_count - end - end - - def test_get_management_server - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ManagementServer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetManagementServerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_management_server({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_management_server name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_management_server ::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_management_server({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_management_server(::Google::Cloud::BackupDR::V1::GetManagementServerRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_management_server_client_stub.call_rpc_count - end - end - - def test_create_management_server - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - management_server_id = "hello world" - management_server = {} - request_id = "hello world" - - create_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["management_server_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ManagementServer), request["management_server"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_management_server parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_management_server ::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_management_server({ parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_management_server(::Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new(parent: parent, management_server_id: management_server_id, management_server: management_server, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_management_server_client_stub.call_rpc_count - end - end - - def test_delete_management_server - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_management_server_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_management_server, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_management_server_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_management_server({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_management_server name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_management_server ::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_management_server({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_management_server(::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_management_server_client_stub.call_rpc_count - end - end - - def test_create_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_vault_id = "hello world" - backup_vault = {} - request_id = "hello world" - validate_only = true - - create_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_vault_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_backup_vault parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_backup_vault ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_backup_vault({ parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_backup_vault(::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new(parent: parent, backup_vault_id: backup_vault_id, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_vault_client_stub.call_rpc_count - end - end - - def test_list_backup_vaults - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - list_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_vaults, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_vaults_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_vaults ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_vaults(::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_vaults_client_stub.call_rpc_count - end - end - - def test_fetch_usable_backup_vaults - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_usable_backup_vaults_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_usable_backup_vaults, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_usable_backup_vaults_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_usable_backup_vaults parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_usable_backup_vaults ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_usable_backup_vaults({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_usable_backup_vaults(::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_usable_backup_vaults_client_stub.call_rpc_count - end - end - - def test_get_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupVault.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VAULT_VIEW_UNSPECIFIED - - get_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, request - assert_equal "hello world", request["name"] - assert_equal :BACKUP_VAULT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_vault({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_vault name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_vault ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_vault({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_vault(::Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_vault_client_stub.call_rpc_count - end - end - - def test_update_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - backup_vault = {} - request_id = "hello world" - validate_only = true - force = true - force_update_access_restriction = true - - update_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupVault), request["backup_vault"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal true, request["force"] - assert_equal true, request["force_update_access_restriction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup_vault update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup_vault ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_backup_vault({ update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_backup_vault(::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new(update_mask: update_mask, backup_vault: backup_vault, request_id: request_id, validate_only: validate_only, force: force, force_update_access_restriction: force_update_access_restriction), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_vault_client_stub.call_rpc_count - end - end - - def test_delete_backup_vault - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - etag = "hello world" - validate_only = true - allow_missing = true - ignore_backup_plan_references = true - - delete_backup_vault_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_vault, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["force"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - assert_equal true, request["ignore_backup_plan_references"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_vault_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup_vault name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup_vault ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup_vault({ name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_backup_vault(::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new(name: name, request_id: request_id, force: force, etag: etag, validate_only: validate_only, allow_missing: allow_missing, ignore_backup_plan_references: ignore_backup_plan_references), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_vault_client_stub.call_rpc_count - end - end - - def test_list_data_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_sources, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_sources_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_sources parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_sources ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_sources({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_sources(::Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_sources_client_stub.call_rpc_count - end - end - - def test_get_data_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::DataSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_source ::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_source(::Google::Cloud::BackupDR::V1::GetDataSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_rpc_count - end - end - - def test_update_data_source - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_source = {} - request_id = "hello world" - allow_missing = true - - update_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_source, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::DataSource), request["data_source"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_source_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_source update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_source ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_source({ update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_source(::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new(update_mask: update_mask, data_source: data_source, request_id: request_id, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_source_client_stub.call_rpc_count - end - end - - def test_list_backups - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backups, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backups ::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backups(::Google::Cloud::BackupDR::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_rpc_count - end - end - - def test_fetch_backups_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - fetch_backups_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_backups_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_backups_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_backups_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_backups_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_backups_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_backups_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_backups_for_resource_type_client_stub.call_rpc_count - end - end - - def test_get_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::Backup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BACKUP_VIEW_UNSPECIFIED - - get_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal :BACKUP_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup ::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup(::Google::Cloud::BackupDR::V1::GetBackupRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_rpc_count - end - end - - def test_update_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - backup = {} - request_id = "hello world" - - update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::Backup), request["backup"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup update_mask: update_mask, backup: backup, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup ::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_backup({ update_mask: update_mask, backup: backup, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_backup(::Google::Cloud::BackupDR::V1::UpdateBackupRequest.new(update_mask: update_mask, backup: backup, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_client_stub.call_rpc_count - end - end - - def test_delete_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_backup(::Google::Cloud::BackupDR::V1::DeleteBackupRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_rpc_count - end - end - - def test_restore_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - compute_instance_target_environment = {} - compute_instance_restore_properties = {} - clear_overrides_field_mask = {} - - restore_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::RestoreBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment), request["compute_instance_target_environment"] - assert_equal :compute_instance_target_environment, request.target_environment - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties), request["compute_instance_restore_properties"] - assert_equal :compute_instance_restore_properties, request.instance_properties - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["clear_overrides_field_mask"] - assert request.has_clear_overrides_field_mask? - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.restore_backup name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.restore_backup ::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.restore_backup({ name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.restore_backup(::Google::Cloud::BackupDR::V1::RestoreBackupRequest.new(name: name, request_id: request_id, compute_instance_target_environment: compute_instance_target_environment, compute_instance_restore_properties: compute_instance_restore_properties, clear_overrides_field_mask: clear_overrides_field_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restore_backup_client_stub.call_rpc_count - end - end - - def test_create_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan_id = "hello world" - backup_plan = {} - request_id = "hello world" - - create_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_plan_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_backup_plan parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_backup_plan ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_backup_plan({ parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_backup_plan(::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan_id: backup_plan_id, backup_plan: backup_plan, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_plan_client_stub.call_rpc_count - end - end - - def test_update_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup_plan = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlan), request["backup_plan"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup_plan ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_backup_plan(::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_plan_client_stub.call_rpc_count - end - end - - def test_get_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlan.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_plan({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_plan name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_plan ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_plan({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_plan(::Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_plan_client_stub.call_rpc_count - end - end - - def test_list_backup_plans - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlansResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_backup_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plans, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_plans_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_plans ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_plans(::Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_plans_client_stub.call_rpc_count - end - end - - def test_delete_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_plan, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_plan({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup_plan name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup_plan ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup_plan({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_backup_plan(::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_plan_client_stub.call_rpc_count - end - end - - def test_get_backup_plan_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanRevision.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan_revision, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_revision_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_plan_revision({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_plan_revision name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_plan_revision ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_plan_revision({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_plan_revision(::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_plan_revision_client_stub.call_rpc_count - end - end - - def test_list_backup_plan_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_backup_plan_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plan_revisions, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_plan_revisions_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_plan_revisions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_plan_revisions ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_plan_revisions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_plan_revisions(::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_plan_revisions_client_stub.call_rpc_count - end - end - - def test_create_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan_association_id = "hello world" - backup_plan_association = {} - request_id = "hello world" - - create_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_plan_association_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_backup_plan_association parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_backup_plan_association ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_backup_plan_association({ parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_backup_plan_association(::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new(parent: parent, backup_plan_association_id: backup_plan_association_id, backup_plan_association: backup_plan_association, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_update_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup_plan_association = {} - update_mask = {} - request_id = "hello world" - - update_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::BackupPlanAssociation), request["backup_plan_association"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup_plan_association backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup_plan_association ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_backup_plan_association({ backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_backup_plan_association(::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new(backup_plan_association: backup_plan_association, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_get_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_plan_association({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_plan_association name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_plan_association ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_plan_association({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_plan_association(::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_list_backup_plan_associations - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_backup_plan_associations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plan_associations, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_plan_associations_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_plan_associations parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_plan_associations ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_plan_associations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_plan_associations(::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_plan_associations_client_stub.call_rpc_count - end - end - - def test_fetch_backup_plan_associations_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_backup_plan_associations_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_backup_plan_associations_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_backup_plan_associations_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_backup_plan_associations_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_backup_plan_associations_for_resource_type ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_backup_plan_associations_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_backup_plan_associations_for_resource_type(::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_backup_plan_associations_for_resource_type_client_stub.call_rpc_count - end - end - - def test_delete_backup_plan_association - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backup_plan_association_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_plan_association, name - assert_kind_of ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_plan_association_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_plan_association({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup_plan_association name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup_plan_association ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup_plan_association({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_backup_plan_association(::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_plan_association_client_stub.call_rpc_count - end - end - - def test_trigger_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - rule_id = "hello world" - request_id = "hello world" - - trigger_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :trigger_backup, name - assert_kind_of ::Google::Cloud::BackupDR::V1::TriggerBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["rule_id"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, trigger_backup_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.trigger_backup name: name, rule_id: rule_id, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.trigger_backup ::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.trigger_backup({ name: name, rule_id: rule_id, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.trigger_backup(::Google::Cloud::BackupDR::V1::TriggerBackupRequest.new(name: name, rule_id: rule_id, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, trigger_backup_client_stub.call_rpc_count - end - end - - def test_get_data_source_reference - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::DataSourceReference.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_reference_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source_reference, name - assert_kind_of ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_reference_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_source_reference({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_source_reference name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_source_reference ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_source_reference({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_source_reference(::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_source_reference_client_stub.call_rpc_count - end - end - - def test_list_data_source_references - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_source_references_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_source_references, name - assert_kind_of ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_source_references_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_source_references parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_source_references ::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_source_references({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_source_references(::Google::Cloud::BackupDR::V1::ListDataSourceReferencesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_source_references_client_stub.call_rpc_count - end - end - - def test_fetch_data_source_references_for_resource_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource_type = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - fetch_data_source_references_for_resource_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_data_source_references_for_resource_type, name - assert_kind_of ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_data_source_references_for_resource_type_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_data_source_references_for_resource_type parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_data_source_references_for_resource_type ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_data_source_references_for_resource_type({ parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_data_source_references_for_resource_type(::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new(parent: parent, resource_type: resource_type, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_data_source_references_for_resource_type_client_stub.call_rpc_count - end - end - - def test_initialize_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - resource_type = "hello world" - request_id = "hello world" - cloud_sql_instance_initialization_config = {} - - initialize_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :initialize_service, name - assert_kind_of ::Google::Cloud::BackupDR::V1::InitializeServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["resource_type"] - assert_equal "hello world", request["request_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig), request["cloud_sql_instance_initialization_config"] - assert_equal :cloud_sql_instance_initialization_config, request.initialization_config - refute_nil options - end - - Gapic::ServiceStub.stub :new, initialize_service_client_stub do - # Create client - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.initialize_service name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.initialize_service ::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.initialize_service({ name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.initialize_service(::Google::Cloud::BackupDR::V1::InitializeServiceRequest.new(name: name, resource_type: resource_type, request_id: request_id, cloud_sql_instance_initialization_config: cloud_sql_instance_initialization_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, initialize_service_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::BackupDR::V1::BackupDR::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb b/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-backupdr-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct"