Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions google-cloud-backupdr-v1/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"lib/google/cloud/backupdr/v1/backupdr_services_pb.rb",
"lib/google/cloud/backupdr/v1/backupplan_pb.rb",
"lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb",
"lib/google/cloud/backupdr/v1/backupvault_alloydb_pb.rb",
"lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb",
"lib/google/cloud/backupdr/v1/backupvault_cloudsql_pb.rb",
"lib/google/cloud/backupdr/v1/backupvault_disk_pb.rb",
Expand All @@ -56,6 +57,7 @@
"proto_docs/google/cloud/backupdr/v1/backupplan.rb",
"proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb",
"proto_docs/google/cloud/backupdr/v1/backupvault.rb",
"proto_docs/google/cloud/backupdr/v1/backupvault_alloydb.rb",
"proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb",
"proto_docs/google/cloud/backupdr/v1/backupvault_cloudsql.rb",
"proto_docs/google/cloud/backupdr/v1/backupvault_disk.rb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,25 @@ def backup_vault_path project:, location:, backupvault:
"projects/#{project}/locations/#{location}/backupVaults/#{backupvault}"
end

##
# Create a fully-qualified Cluster resource string.
#
# The resource will be in the following format:
#
# `projects/{project}/locations/{location}/clusters/{cluster}`
#
# @param project [String]
# @param location [String]
# @param cluster [String]
#
# @return [::String]
def cluster_path project:, location:, cluster:
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

"projects/#{project}/locations/#{location}/clusters/#{cluster}"
end

##
# Create a fully-qualified CryptoKey resource string.
#
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module V1
# Vault Service Account.
# @!attribute [rw] log_retention_days
# @return [::Integer]
# Optional. Applicable only for CloudSQL resource_type.
# Optional. Applicable only for CloudSQL and AlloyDB 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,19 +402,25 @@ class BackupApplianceBackupConfig
# 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.
# Note: The following fields are mutually exclusive: `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_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.
# Note: The following fields are mutually exclusive: `cloud_sql_instance_datasource_properties`, `compute_instance_datasource_properties`, `alloy_db_cluster_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] alloy_db_cluster_datasource_properties
# @return [::Google::Cloud::BackupDR::V1::AlloyDBClusterDataSourceProperties]
# Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
# cluster properties that are useful at the Datasource level.
#
# Note: The following fields are mutually exclusive: `alloy_db_cluster_datasource_properties`, `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 [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.
# Note: The following fields are mutually exclusive: `disk_datasource_properties`, `compute_instance_datasource_properties`, `cloud_sql_instance_datasource_properties`, `alloy_db_cluster_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
Expand Down Expand Up @@ -568,22 +574,27 @@ class BackupLock
# @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.
# Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_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.
# Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_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.
# Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `alloy_db_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] alloy_db_backup_properties
# @return [::Google::Cloud::BackupDR::V1::AlloyDbClusterBackupProperties]
# Output only. AlloyDB specific backup properties.
#
# Note: The following fields are mutually exclusive: `alloy_db_backup_properties`, `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] 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.
# Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `alloy_db_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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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
# AlloyDBClusterDataSourceProperties represents the properties of a
# AlloyDB cluster resource that are stored in the DataSource.
# .
# @!attribute [r] name
# @return [::String]
# Output only. Name of the AlloyDB cluster backed up by the datasource.
class AlloyDBClusterDataSourceProperties
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end

# AlloyDbClusterBackupProperties represents AlloyDB cluster
# backup properties.
# .
# @!attribute [rw] description
# @return [::String]
# An optional text description for the backup.
# @!attribute [r] stored_bytes
# @return [::Integer]
# Output only. Storage usage of this particular backup
# @!attribute [r] chain_id
# @return [::String]
# Output only. The chain id of this backup. Backups belonging to the same
# chain are sharing the same chain id. This property is calculated and
# maintained by BackupDR.
# @!attribute [r] database_version
# @return [::String]
# Output only. The PostgreSQL major version of the AlloyDB cluster when the
# backup was taken.
class AlloyDbClusterBackupProperties
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ def test_backup_vault_path
end
end

def test_cluster_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.cluster_path project: "value0", location: "value1", cluster: "value2"
assert_equal "projects/value0/locations/value1/clusters/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
Expand Down
Loading