google-cloud-network_management 1.4.1 → 2.0.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: 19dca58f195f39843489428fc327a49dffdc7f3654b0a103e25fec4ece1adf05
4
- data.tar.gz: 42e537f446069f50fc4760dae11ff09c95fbf81bc3bcc9c0de48e3f682473e1d
3
+ metadata.gz: d0e8e7248936189cdfd693cfa10b95cc2e298951a670809202cd21ddfd9b61ae
4
+ data.tar.gz: 609cfbd54ecc2215401a2ddc6918c09cccfbe96599410262e6de227b08edf4a9
5
5
  SHA512:
6
- metadata.gz: d0234b370ef9db2f7a712be05797812e20a9146d114a8bf64910715e317e3179eef329cb7d8aaaa80afb30d9e67d5882a703779f5462356d4fbfbe344659a840
7
- data.tar.gz: c6a8ece0d8da47e685b2682ea109d1800dd02aff0e17a835bf4353a98ddd540394e0c6ea4d87371a2216578a07b3bde9cba8a1414f12e5423bfdb9aae9be4e55
6
+ metadata.gz: f3bd4500fab020dd9773fcf753261c438e9c0b49a9055916104178afcdd355a01ff7958636e4eb7d89ae5468acf94e9bd21cbd250d3c71dbf7ac37df2680966b
7
+ data.tar.gz: edc3a990041e7be653065b2fe5d7976e8415cfec65f541444d5bd4e5278eeca9ea98c8a126e79ada2bd2ac5d15a22d1b889d1b65045592d4951439280f9e6c31
data/README.md CHANGED
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/networkmanagement.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-network_management-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-network_management-v1/latest).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module NetworkManagement
23
- VERSION = "1.4.1"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the ReachabilityService service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::NetworkManagement.reachability_service_available?}.
65
+ #
61
66
  # ## About ReachabilityService
62
67
  #
63
68
  # The Reachability service in the Google Cloud Network Management API provides
@@ -86,6 +91,109 @@ module Google
86
91
  service_module.const_get(:Client).new(&block)
87
92
  end
88
93
 
94
+ ##
95
+ # Determines whether the ReachabilityService service is supported by the current client.
96
+ # If true, you can retrieve a client object by calling {Google::Cloud::NetworkManagement.reachability_service}.
97
+ # If false, that method will raise an exception. This could happen if the given
98
+ # API version does not exist or does not support the ReachabilityService service,
99
+ # or if the versioned client gem needs an update to support the ReachabilityService service.
100
+ #
101
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
102
+ # Defaults to `:v1`.
103
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
104
+ # @return [boolean] Whether the service is available.
105
+ #
106
+ def self.reachability_service_available? version: :v1, transport: :grpc
107
+ require "google/cloud/network_management/#{version.to_s.downcase}"
108
+ package_name = Google::Cloud::NetworkManagement
109
+ .constants
110
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
111
+ .first
112
+ return false unless package_name
113
+ service_module = Google::Cloud::NetworkManagement.const_get package_name
114
+ return false unless service_module.const_defined? :ReachabilityService
115
+ service_module = service_module.const_get :ReachabilityService
116
+ if transport == :rest
117
+ return false unless service_module.const_defined? :Rest
118
+ service_module = service_module.const_get :Rest
119
+ end
120
+ service_module.const_defined? :Client
121
+ rescue ::LoadError
122
+ false
123
+ end
124
+
125
+ ##
126
+ # Create a new client object for VpcFlowLogsService.
127
+ #
128
+ # By default, this returns an instance of
129
+ # [Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_management-v1/latest/Google-Cloud-NetworkManagement-V1-VpcFlowLogsService-Client)
130
+ # for a gRPC client for version V1 of the API.
131
+ # However, you can specify a different API version by passing it in the
132
+ # `version` parameter. If the VpcFlowLogsService service is
133
+ # supported by that API version, and the corresponding gem is available, the
134
+ # appropriate versioned client will be returned.
135
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
136
+ # the `transport` parameter.
137
+ #
138
+ # Raises an exception if the currently installed versioned client gem for the
139
+ # given API version does not support the given transport of the VpcFlowLogsService service.
140
+ # You can determine whether the method will succeed by calling
141
+ # {Google::Cloud::NetworkManagement.vpc_flow_logs_service_available?}.
142
+ #
143
+ # ## About VpcFlowLogsService
144
+ #
145
+ # The VPC Flow Logs service in the Google Cloud Network Management API provides
146
+ # configurations that generate Flow Logs. The service and the configuration
147
+ # resources created using this service are global.
148
+ #
149
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
150
+ # Defaults to `:v1`.
151
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
152
+ # @return [::Object] A client object for the specified version.
153
+ #
154
+ def self.vpc_flow_logs_service version: :v1, transport: :grpc, &block
155
+ require "google/cloud/network_management/#{version.to_s.downcase}"
156
+
157
+ package_name = Google::Cloud::NetworkManagement
158
+ .constants
159
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
160
+ .first
161
+ service_module = Google::Cloud::NetworkManagement.const_get(package_name).const_get(:VpcFlowLogsService)
162
+ service_module = service_module.const_get(:Rest) if transport == :rest
163
+ service_module.const_get(:Client).new(&block)
164
+ end
165
+
166
+ ##
167
+ # Determines whether the VpcFlowLogsService service is supported by the current client.
168
+ # If true, you can retrieve a client object by calling {Google::Cloud::NetworkManagement.vpc_flow_logs_service}.
169
+ # If false, that method will raise an exception. This could happen if the given
170
+ # API version does not exist or does not support the VpcFlowLogsService service,
171
+ # or if the versioned client gem needs an update to support the VpcFlowLogsService service.
172
+ #
173
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
174
+ # Defaults to `:v1`.
175
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
176
+ # @return [boolean] Whether the service is available.
177
+ #
178
+ def self.vpc_flow_logs_service_available? version: :v1, transport: :grpc
179
+ require "google/cloud/network_management/#{version.to_s.downcase}"
180
+ package_name = Google::Cloud::NetworkManagement
181
+ .constants
182
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
183
+ .first
184
+ return false unless package_name
185
+ service_module = Google::Cloud::NetworkManagement.const_get package_name
186
+ return false unless service_module.const_defined? :VpcFlowLogsService
187
+ service_module = service_module.const_get :VpcFlowLogsService
188
+ if transport == :rest
189
+ return false unless service_module.const_defined? :Rest
190
+ service_module = service_module.const_get :Rest
191
+ end
192
+ service_module.const_defined? :Client
193
+ rescue ::LoadError
194
+ false
195
+ end
196
+
89
197
  ##
90
198
  # Configure the google-cloud-network_management library.
91
199
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-network_management
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-09 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -28,22 +27,16 @@ dependencies:
28
27
  name: google-cloud-network_management-v1
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0.10'
34
- - - "<"
30
+ - - "~>"
35
31
  - !ruby/object:Gem::Version
36
- version: 2.a
32
+ version: '2.0'
37
33
  type: :runtime
38
34
  prerelease: false
39
35
  version_requirements: !ruby/object:Gem::Requirement
40
36
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '0.10'
44
- - - "<"
37
+ - - "~>"
45
38
  - !ruby/object:Gem::Version
46
- version: 2.a
39
+ version: '2.0'
47
40
  description: The Network Management API provides a collection of network performance
48
41
  monitoring and diagnostic capabilities.
49
42
  email: googleapis-packages@google.com
@@ -62,7 +55,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
62
55
  licenses:
63
56
  - Apache-2.0
64
57
  metadata: {}
65
- post_install_message:
66
58
  rdoc_options: []
67
59
  require_paths:
68
60
  - lib
@@ -70,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
62
  requirements:
71
63
  - - ">="
72
64
  - !ruby/object:Gem::Version
73
- version: '2.7'
65
+ version: '3.0'
74
66
  required_rubygems_version: !ruby/object:Gem::Requirement
75
67
  requirements:
76
68
  - - ">="
77
69
  - !ruby/object:Gem::Version
78
70
  version: '0'
79
71
  requirements: []
80
- rubygems_version: 3.5.6
81
- signing_key:
72
+ rubygems_version: 3.6.3
82
73
  specification_version: 4
83
74
  summary: API Client library for the Network Management API
84
75
  test_files: []