google-cloud-network_connectivity 2.1.1 → 2.2.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8deec0e067f082e7b9f17c2d0754db5213ebcb5e6312c189860ccf44e50828f
|
4
|
+
data.tar.gz: 3ea813c0848367788d392f698f5d0d37ccafc181b828e54153cb75b32dd03d3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5afa6e5e6c155ff1a29a635b40e42d473d0b01a1638bf792799c22e37c4bf1970fbd9a567269431deb41b6d451bc508226f269bd3e01a06b42c09bf0a78365c9
|
7
|
+
data.tar.gz: ce3414fe3a139dc58692a88acab7bd3b0215aeb0cd4b391210118d6e9dfcaa239b504b42b5d7c1b3a62f61218e135e39a3e67d4702573e21b7545a6c2e3b0122
|
@@ -169,6 +169,68 @@ module Google
|
|
169
169
|
false
|
170
170
|
end
|
171
171
|
|
172
|
+
##
|
173
|
+
# Create a new client object for InternalRangeService.
|
174
|
+
#
|
175
|
+
# By default, this returns an instance of
|
176
|
+
# [Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client)
|
177
|
+
# for a gRPC client for version V1 of the API.
|
178
|
+
# However, you can specify a different API version by passing it in the
|
179
|
+
# `version` parameter. If the InternalRangeService service is
|
180
|
+
# supported by that API version, and the corresponding gem is available, the
|
181
|
+
# appropriate versioned client will be returned.
|
182
|
+
#
|
183
|
+
# Raises an exception if the currently installed versioned client gem for the
|
184
|
+
# given API version does not support the InternalRangeService service.
|
185
|
+
# You can determine whether the method will succeed by calling
|
186
|
+
# {Google::Cloud::NetworkConnectivity.internal_range_service_available?}.
|
187
|
+
#
|
188
|
+
# ## About InternalRangeService
|
189
|
+
#
|
190
|
+
# The CLH-based service for internal range resources used to perform IPAM
|
191
|
+
# operations within a VPC network.
|
192
|
+
#
|
193
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
194
|
+
# Defaults to `:v1`.
|
195
|
+
# @return [::Object] A client object for the specified version.
|
196
|
+
#
|
197
|
+
def self.internal_range_service version: :v1, &block
|
198
|
+
require "google/cloud/network_connectivity/#{version.to_s.downcase}"
|
199
|
+
|
200
|
+
package_name = Google::Cloud::NetworkConnectivity
|
201
|
+
.constants
|
202
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
203
|
+
.first
|
204
|
+
service_module = Google::Cloud::NetworkConnectivity.const_get(package_name).const_get(:InternalRangeService)
|
205
|
+
service_module.const_get(:Client).new(&block)
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# Determines whether the InternalRangeService service is supported by the current client.
|
210
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::NetworkConnectivity.internal_range_service}.
|
211
|
+
# If false, that method will raise an exception. This could happen if the given
|
212
|
+
# API version does not exist or does not support the InternalRangeService service,
|
213
|
+
# or if the versioned client gem needs an update to support the InternalRangeService service.
|
214
|
+
#
|
215
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
216
|
+
# Defaults to `:v1`.
|
217
|
+
# @return [boolean] Whether the service is available.
|
218
|
+
#
|
219
|
+
def self.internal_range_service_available? version: :v1
|
220
|
+
require "google/cloud/network_connectivity/#{version.to_s.downcase}"
|
221
|
+
package_name = Google::Cloud::NetworkConnectivity
|
222
|
+
.constants
|
223
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
224
|
+
.first
|
225
|
+
return false unless package_name
|
226
|
+
service_module = Google::Cloud::NetworkConnectivity.const_get package_name
|
227
|
+
return false unless service_module.const_defined? :InternalRangeService
|
228
|
+
service_module = service_module.const_get :InternalRangeService
|
229
|
+
service_module.const_defined? :Client
|
230
|
+
rescue ::LoadError
|
231
|
+
false
|
232
|
+
end
|
233
|
+
|
172
234
|
##
|
173
235
|
# Create a new client object for PolicyBasedRoutingService.
|
174
236
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-network_connectivity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
|
-
rubygems_version: 3.6.
|
73
|
+
rubygems_version: 3.6.9
|
74
74
|
specification_version: 4
|
75
75
|
summary: API Client library for the Network Connectivity API
|
76
76
|
test_files: []
|