google-cloud-advisory_notifications 1.2.0 → 1.3.1

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: 540479fa481e05db21702df12a0f9e0e195208f88c4dcd329e74aa78f627835a
4
- data.tar.gz: 88e11bb527dadf523d9f79c6e2fdeb054a3d27a8b0a09b3eb2b463755a498a10
3
+ metadata.gz: 6da718ecfe6a14ab75860e4151c7055b8bf8e77eafa7a27e4cfbe44329952787
4
+ data.tar.gz: 1c5c83c3c3882253dcd875b941302744bcfd0b5b5fb18c73f97dbbc0f6503d94
5
5
  SHA512:
6
- metadata.gz: 922f336e689c7af4060c31c87860fa114286b865aaf3f07928162a5707ca733ef4ecab4307183f71b82cfee505902ea4c26823f19912a45db47f3186f4d01517
7
- data.tar.gz: 43d67ec28af8fd1816f3244d0455756f88186483849cf488662317174d42c9067ad3a9c8702dee81d69fdceccf11a6845814b820d27c33339d1b1ae0f1dfd827
6
+ metadata.gz: 0e05d411afb724ccdc7babf865d6aa49d846bd0a98c7b0452d9b055cfd26efe2c1c7429b6097f68b16ab3b29e6f1989a4a032d08c478a12ae2a61ab056a46352
7
+ data.tar.gz: eba492ea67b2640198fd0eeeb972d1d4a75f550c43c5b8fb7f4482d98362659fe65458b666954d91c5393d26184769085949b23d04de354face80837a9bf09fc
data/README.md CHANGED
@@ -2,12 +2,11 @@
2
2
 
3
3
  An API for accessing Advisory Notifications in Google Cloud.
4
4
 
5
- An API for accessing Advisory Notifications in Google Cloud.
6
5
 
7
6
  Actual client classes for the various versions of this API are defined in
8
7
  _versioned_ client gems, with names of the form `google-cloud-advisory_notifications-v*`.
9
8
  The gem `google-cloud-advisory_notifications` is the main client library that brings the
10
- verisoned gems in as dependencies, and provides high-level methods for
9
+ versioned gems in as dependencies, and provides high-level methods for
11
10
  constructing clients. More information on versioned clients can be found below
12
11
  in the section titled *Which client should I use?*.
13
12
 
@@ -34,9 +33,39 @@ In order to use this library, you first need to go through the following steps:
34
33
  1. [Enable the API.](https://console.cloud.google.com/apis/library/advisorynotifications.googleapis.com)
35
34
  1. {file:AUTHENTICATION.md Set up authentication.}
36
35
 
36
+ ## Debug Logging
37
+
38
+ This library comes with opt-in Debug Logging that can help you troubleshoot
39
+ your application's integration with the API. When logging is activated, key
40
+ events such as requests and responses, along with data payloads and metadata
41
+ such as headers and client configuration, are logged to the standard error
42
+ stream.
43
+
44
+ **WARNING:** Client Library Debug Logging includes your data payloads in
45
+ plaintext, which could include sensitive data such as PII for yourself or your
46
+ customers, private keys, or other security data that could be compromising if
47
+ leaked. Always practice good data hygiene with your application logs, and follow
48
+ the principle of least access. Google also recommends that Client Library Debug
49
+ Logging be enabled only temporarily during active debugging, and not used
50
+ permanently in production.
51
+
52
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
53
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
54
+ list of client library gem names. This will select the default logging behavior,
55
+ which writes logs to the standard error stream. On a local workstation, this may
56
+ result in logs appearing on the console. When running on a Google Cloud hosting
57
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
58
+ results in logs appearing alongside your application logs in the
59
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
60
+
61
+ Debug logging also requires that the versioned clients for this service be
62
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
63
+ working, try updating the versioned clients in your bundle or installed gems:
64
+ [google-cloud-advisory_notifications-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-advisory_notifications-v1/latest).
65
+
37
66
  ## Supported Ruby Versions
38
67
 
39
- This library is supported on Ruby 2.7+.
68
+ This library is supported on Ruby 3.0+.
40
69
 
41
70
  Google provides official support for Ruby versions that are actively supported
42
71
  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 AdvisoryNotifications
23
- VERSION = "1.2.0"
23
+ VERSION = "1.3.1"
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 AdvisoryNotificationsService service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::AdvisoryNotifications.advisory_notifications_service_available?}.
65
+ #
61
66
  # ## About AdvisoryNotificationsService
62
67
  #
63
68
  # Service to manage Security and Privacy Notifications.
@@ -79,6 +84,37 @@ module Google
79
84
  service_module.const_get(:Client).new(&block)
80
85
  end
81
86
 
87
+ ##
88
+ # Determines whether the AdvisoryNotificationsService service is supported by the current client.
89
+ # If true, you can retrieve a client object by calling {Google::Cloud::AdvisoryNotifications.advisory_notifications_service}.
90
+ # If false, that method will raise an exception. This could happen if the given
91
+ # API version does not exist or does not support the AdvisoryNotificationsService service,
92
+ # or if the versioned client gem needs an update to support the AdvisoryNotificationsService service.
93
+ #
94
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
95
+ # Defaults to `:v1`.
96
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
97
+ # @return [boolean] Whether the service is available.
98
+ #
99
+ def self.advisory_notifications_service_available? version: :v1, transport: :grpc
100
+ require "google/cloud/advisory_notifications/#{version.to_s.downcase}"
101
+ package_name = Google::Cloud::AdvisoryNotifications
102
+ .constants
103
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
104
+ .first
105
+ return false unless package_name
106
+ service_module = Google::Cloud::AdvisoryNotifications.const_get package_name
107
+ return false unless service_module.const_defined? :AdvisoryNotificationsService
108
+ service_module = service_module.const_get :AdvisoryNotificationsService
109
+ if transport == :rest
110
+ return false unless service_module.const_defined? :Rest
111
+ service_module = service_module.const_get :Rest
112
+ end
113
+ service_module.const_defined? :Client
114
+ rescue ::LoadError
115
+ false
116
+ end
117
+
82
118
  ##
83
119
  # Configure the google-cloud-advisory_notifications library.
84
120
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-advisory_notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-advisory_notifications-v1
@@ -61,7 +60,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
61
60
  licenses:
62
61
  - Apache-2.0
63
62
  metadata: {}
64
- post_install_message:
65
63
  rdoc_options: []
66
64
  require_paths:
67
65
  - lib
@@ -69,15 +67,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
67
  requirements:
70
68
  - - ">="
71
69
  - !ruby/object:Gem::Version
72
- version: '2.7'
70
+ version: '3.0'
73
71
  required_rubygems_version: !ruby/object:Gem::Requirement
74
72
  requirements:
75
73
  - - ">="
76
74
  - !ruby/object:Gem::Version
77
75
  version: '0'
78
76
  requirements: []
79
- rubygems_version: 3.5.6
80
- signing_key:
77
+ rubygems_version: 3.6.8
81
78
  specification_version: 4
82
79
  summary: An API for accessing Advisory Notifications in Google Cloud.
83
80
  test_files: []