google-cloud-backupdr 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/backupdr/version.rb +1 -1
- data/lib/google/cloud/backupdr.rb +70 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9bcd0d7e6079f0ddc6b220d6ab5b9242d4755cf31c37e78249e64493f2eb4ec
|
|
4
|
+
data.tar.gz: 6ebe5b1d72d9d8ca454c88bab671d4affc3ec8860a4a2caad8c8180e65fb44bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9c6f25d17337de8a550674e6bdd13eec44db0bc00deb4b1105d098a4bdba3f222a5555f30c6209d99589fd1e2d6b731da389eb55f718f334f79e00634f6d211
|
|
7
|
+
data.tar.gz: e1e188d940bd76cc2e8515417ef6a48d5dd8642970cc8c93bbccdef04e3d12256096cba166014876abe35aa3f942f1ed9ed78112a5c7702dfc5265eb60820984
|
|
@@ -115,6 +115,76 @@ module Google
|
|
|
115
115
|
false
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
+
##
|
|
119
|
+
# Create a new client object for BackupDrProtectionSummary.
|
|
120
|
+
#
|
|
121
|
+
# By default, this returns an instance of
|
|
122
|
+
# [Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-BackupDrProtectionSummary-Client)
|
|
123
|
+
# for a gRPC client for version V1 of the API.
|
|
124
|
+
# However, you can specify a different API version by passing it in the
|
|
125
|
+
# `version` parameter. If the BackupDrProtectionSummary service is
|
|
126
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
127
|
+
# appropriate versioned client will be returned.
|
|
128
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
129
|
+
# the `transport` parameter.
|
|
130
|
+
#
|
|
131
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
132
|
+
# given API version does not support the given transport of the BackupDrProtectionSummary service.
|
|
133
|
+
# You can determine whether the method will succeed by calling
|
|
134
|
+
# {Google::Cloud::BackupDR.backup_dr_protection_summary_available?}.
|
|
135
|
+
#
|
|
136
|
+
# ## About BackupDrProtectionSummary
|
|
137
|
+
#
|
|
138
|
+
# The Protection Summary service.
|
|
139
|
+
#
|
|
140
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
141
|
+
# Defaults to `:v1`.
|
|
142
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
143
|
+
# @return [::Object] A client object for the specified version.
|
|
144
|
+
#
|
|
145
|
+
def self.backup_dr_protection_summary version: :v1, transport: :grpc, &block
|
|
146
|
+
require "google/cloud/backupdr/#{version.to_s.downcase}"
|
|
147
|
+
|
|
148
|
+
package_name = Google::Cloud::BackupDR
|
|
149
|
+
.constants
|
|
150
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
151
|
+
.first
|
|
152
|
+
service_module = Google::Cloud::BackupDR.const_get(package_name).const_get(:BackupDrProtectionSummary)
|
|
153
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
154
|
+
service_module.const_get(:Client).new(&block)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
##
|
|
158
|
+
# Determines whether the BackupDrProtectionSummary service is supported by the current client.
|
|
159
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::BackupDR.backup_dr_protection_summary}.
|
|
160
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
161
|
+
# API version does not exist or does not support the BackupDrProtectionSummary service,
|
|
162
|
+
# or if the versioned client gem needs an update to support the BackupDrProtectionSummary service.
|
|
163
|
+
#
|
|
164
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
165
|
+
# Defaults to `:v1`.
|
|
166
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
167
|
+
# @return [boolean] Whether the service is available.
|
|
168
|
+
#
|
|
169
|
+
def self.backup_dr_protection_summary_available? version: :v1, transport: :grpc
|
|
170
|
+
require "google/cloud/backupdr/#{version.to_s.downcase}"
|
|
171
|
+
package_name = Google::Cloud::BackupDR
|
|
172
|
+
.constants
|
|
173
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
174
|
+
.first
|
|
175
|
+
return false unless package_name
|
|
176
|
+
service_module = Google::Cloud::BackupDR.const_get package_name
|
|
177
|
+
return false unless service_module.const_defined? :BackupDrProtectionSummary
|
|
178
|
+
service_module = service_module.const_get :BackupDrProtectionSummary
|
|
179
|
+
if transport == :rest
|
|
180
|
+
return false unless service_module.const_defined? :Rest
|
|
181
|
+
service_module = service_module.const_get :Rest
|
|
182
|
+
end
|
|
183
|
+
service_module.const_defined? :Client
|
|
184
|
+
rescue ::LoadError
|
|
185
|
+
false
|
|
186
|
+
end
|
|
187
|
+
|
|
118
188
|
##
|
|
119
189
|
# Configure the google-cloud-backupdr library.
|
|
120
190
|
#
|