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: 7f309b3e708b0eccc9a8a758b34eef72f8059662b1f61e7fd0a2f1d586ec1470
4
- data.tar.gz: 5afe8b85570a6ab2f26f696e7cd31e4179475caac490e3e709d0f871ee7289a1
3
+ metadata.gz: c8deec0e067f082e7b9f17c2d0754db5213ebcb5e6312c189860ccf44e50828f
4
+ data.tar.gz: 3ea813c0848367788d392f698f5d0d37ccafc181b828e54153cb75b32dd03d3d
5
5
  SHA512:
6
- metadata.gz: 4f71bfa003130617422806b50cf07feec464347d325b943ea693a9bee499cfc02ee655ef8e89670472e2e04a2ba178eb9d22c522ac73e076277b4d91220e0c9f
7
- data.tar.gz: 7e5e4f4f05768b3386847404c9bef6623385975db9faf72002481d3e7d22b734468babaaccc528f535d36d4b20f80cecd959e28d077657f814d007f7b9bc207f
6
+ metadata.gz: 5afa6e5e6c155ff1a29a635b40e42d473d0b01a1638bf792799c22e37c4bf1970fbd9a567269431deb41b6d451bc508226f269bd3e01a06b42c09bf0a78365c9
7
+ data.tar.gz: ce3414fe3a139dc58692a88acab7bd3b0215aeb0cd4b391210118d6e9dfcaa239b504b42b5d7c1b3a62f61218e135e39a3e67d4702573e21b7545a6c2e3b0122
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module NetworkConnectivity
23
- VERSION = "2.1.1"
23
+ VERSION = "2.2.0"
24
24
  end
25
25
  end
26
26
  end
@@ -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.1.1
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.8
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: []