google-cloud-network_management 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ca183dbea7e4e5067f6f498cbba443859c8da5b2b5afb43037ff9497515ba87
4
- data.tar.gz: 61c5fffac7122d9bc6864e9ab82c625b372ac4666ee4f958110dd7a084602b20
3
+ metadata.gz: af1ae71a58c9f5f7081c05c252e7f653d3e51d66188a6559b9d7301f0351a5ce
4
+ data.tar.gz: 341b8e53c07bc69714bd289152c6d899f98d83888b48310fe9b19781ee350441
5
5
  SHA512:
6
- metadata.gz: 1d0a7085e82da7b1170c820e9996a25b45b516873f0a37010c5bb7b250aaf8d6ba73e6ad97740ea2af7e7b9eb5c0f0ade27480053d51af5b38133926d2a0deb1
7
- data.tar.gz: a8c9bc233309f90c8ad8279314cc66ec919b507529d21409157d1037208aaa250e91d75758d42e073ee06b37b1f113d3d5f9bf96c887f8f0f28385d6275d5d51
6
+ metadata.gz: 70428920c1995fdd040db1409e53b605a18ca8478f76e8e4e8d9537a6b6f39e26a30746f456d0aa2c6a53cafb996b5152a4fc3ae49ca6c2726b518f887212d80
7
+ data.tar.gz: e5e22dc4dd2f39672664ae40b2e9a89947b9467045e1a716836f755f7d6110995eae62a022329dcb69f3d2fc2ca89ebc34652c38af19a014d20546f607833585
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module NetworkManagement
23
- VERSION = "2.0.2"
23
+ VERSION = "2.1.0"
24
24
  end
25
25
  end
26
26
  end
@@ -194,6 +194,79 @@ module Google
194
194
  false
195
195
  end
196
196
 
197
+ ##
198
+ # Create a new client object for OrganizationVpcFlowLogsService.
199
+ #
200
+ # By default, this returns an instance of
201
+ # [Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_management-v1/latest/Google-Cloud-NetworkManagement-V1-OrganizationVpcFlowLogsService-Client)
202
+ # for a gRPC client for version V1 of the API.
203
+ # However, you can specify a different API version by passing it in the
204
+ # `version` parameter. If the OrganizationVpcFlowLogsService service is
205
+ # supported by that API version, and the corresponding gem is available, the
206
+ # appropriate versioned client will be returned.
207
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
208
+ # the `transport` parameter.
209
+ #
210
+ # Raises an exception if the currently installed versioned client gem for the
211
+ # given API version does not support the given transport of the OrganizationVpcFlowLogsService service.
212
+ # You can determine whether the method will succeed by calling
213
+ # {Google::Cloud::NetworkManagement.organization_vpc_flow_logs_service_available?}.
214
+ #
215
+ # ## About OrganizationVpcFlowLogsService
216
+ #
217
+ # The VPC Flow Logs organization service in the Google Cloud Network Management
218
+ # API provides organization level configurations that generate Flow Logs. The
219
+ # service and the configuration resources created using this service are
220
+ # global.
221
+ #
222
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
223
+ # Defaults to `:v1`.
224
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
225
+ # @return [::Object] A client object for the specified version.
226
+ #
227
+ def self.organization_vpc_flow_logs_service version: :v1, transport: :grpc, &block
228
+ require "google/cloud/network_management/#{version.to_s.downcase}"
229
+
230
+ package_name = Google::Cloud::NetworkManagement
231
+ .constants
232
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
233
+ .first
234
+ service_module = Google::Cloud::NetworkManagement.const_get(package_name).const_get(:OrganizationVpcFlowLogsService)
235
+ service_module = service_module.const_get(:Rest) if transport == :rest
236
+ service_module.const_get(:Client).new(&block)
237
+ end
238
+
239
+ ##
240
+ # Determines whether the OrganizationVpcFlowLogsService service is supported by the current client.
241
+ # If true, you can retrieve a client object by calling {Google::Cloud::NetworkManagement.organization_vpc_flow_logs_service}.
242
+ # If false, that method will raise an exception. This could happen if the given
243
+ # API version does not exist or does not support the OrganizationVpcFlowLogsService service,
244
+ # or if the versioned client gem needs an update to support the OrganizationVpcFlowLogsService service.
245
+ #
246
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
247
+ # Defaults to `:v1`.
248
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
249
+ # @return [boolean] Whether the service is available.
250
+ #
251
+ def self.organization_vpc_flow_logs_service_available? version: :v1, transport: :grpc
252
+ require "google/cloud/network_management/#{version.to_s.downcase}"
253
+ package_name = Google::Cloud::NetworkManagement
254
+ .constants
255
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
256
+ .first
257
+ return false unless package_name
258
+ service_module = Google::Cloud::NetworkManagement.const_get package_name
259
+ return false unless service_module.const_defined? :OrganizationVpcFlowLogsService
260
+ service_module = service_module.const_get :OrganizationVpcFlowLogsService
261
+ if transport == :rest
262
+ return false unless service_module.const_defined? :Rest
263
+ service_module = service_module.const_get :Rest
264
+ end
265
+ service_module.const_defined? :Client
266
+ rescue ::LoadError
267
+ false
268
+ end
269
+
197
270
  ##
198
271
  # Configure the google-cloud-network_management library.
199
272
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-network_management
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC