google-apis-advisorynotifications_v1 0.5.0 → 0.7.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: 959f5610303c5b620c63d1c72c2c905a9d0d6cdc918e889eabee21ffff44f300
4
- data.tar.gz: 885a8feb4aa2efacb6a059c88377c2de6cfb02c2f0d6f0bda8c6cb87e3f1e610
3
+ metadata.gz: c7f677cb73501371ba782e4de4f5019195235f88e06680f28962b9c307de674a
4
+ data.tar.gz: 71d2f6cdc4ff8003dbf356753150e783e82b946ed1c64dfcc64088affa0ca43d
5
5
  SHA512:
6
- metadata.gz: 91e89947a91b289cb5cf60f86a012404b718164bbd2d6831b7dced968e83c3e0648351f5a0741ae0643eb748decf34317d14a407136d04cd967c63a4bcda94b9
7
- data.tar.gz: 3c6e8a8087932b05162e1b0944dda0aefc67ec123d90db01482d4df7cbc8e31f9a71a5fe838ce3122daffdc686a27716a8a754932b8d2619c0c41067cf3672ad
6
+ metadata.gz: 056d0b2c629485320867132ee3d911e5ced8c10096c8960d990183145bcd1ddbbf5b9295e28790d5eb846a964d419b8e34a3eedec84e68c87ea03840f6bce0c6
7
+ data.tar.gz: a7f0391c56380b52a542fb85dcae576f74ac49a198e0302c34aed1fb619be553531e4d36248a6758489a2ec26157af76e22926362187c9253376b16e31215d8a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release history for google-apis-advisorynotifications_v1
2
2
 
3
+ ### v0.7.0 (2023-12-10)
4
+
5
+ * Regenerated from discovery document revision 20231203
6
+
7
+ ### v0.6.0 (2023-09-17)
8
+
9
+ * Regenerated from discovery document revision 20230912
10
+
3
11
  ### v0.5.0 (2023-08-13)
4
12
 
5
13
  * Regenerated from discovery document revision 20230806
@@ -199,6 +199,7 @@ module Google
199
199
  attr_accessor :messages
200
200
 
201
201
  # The resource name of the notification. Format: organizations/`organization`/
202
+ # locations/`location`/notifications/`notification` or projects/`project`/
202
203
  # locations/`location`/notifications/`notification`.
203
204
  # Corresponds to the JSON property `name`
204
205
  # @return [String]
@@ -228,6 +229,63 @@ module Google
228
229
  end
229
230
  end
230
231
 
232
+ # Settings for each NotificationType.
233
+ class GoogleCloudAdvisorynotificationsV1NotificationSettings
234
+ include Google::Apis::Core::Hashable
235
+
236
+ # Whether the associated NotificationType is enabled.
237
+ # Corresponds to the JSON property `enabled`
238
+ # @return [Boolean]
239
+ attr_accessor :enabled
240
+ alias_method :enabled?, :enabled
241
+
242
+ def initialize(**args)
243
+ update!(**args)
244
+ end
245
+
246
+ # Update properties of this object
247
+ def update!(**args)
248
+ @enabled = args[:enabled] if args.key?(:enabled)
249
+ end
250
+ end
251
+
252
+ # Settings for Advisory Notifications.
253
+ class GoogleCloudAdvisorynotificationsV1Settings
254
+ include Google::Apis::Core::Hashable
255
+
256
+ # Required. Fingerprint for optimistic concurrency returned in Get requests.
257
+ # Must be provided for Update requests. If the value provided does not match the
258
+ # value known to the server, ABORTED will be thrown, and the client should retry
259
+ # the read-modify-write cycle.
260
+ # Corresponds to the JSON property `etag`
261
+ # @return [String]
262
+ attr_accessor :etag
263
+
264
+ # Identifier. The resource name of the settings to retrieve. Format:
265
+ # organizations/`organization`/locations/`location`/settings.
266
+ # Corresponds to the JSON property `name`
267
+ # @return [String]
268
+ attr_accessor :name
269
+
270
+ # Required. Map of each notification type and its settings to get/set all
271
+ # settings at once. The server will validate the value for each notification
272
+ # type.
273
+ # Corresponds to the JSON property `notificationSettings`
274
+ # @return [Hash<String,Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1NotificationSettings>]
275
+ attr_accessor :notification_settings
276
+
277
+ def initialize(**args)
278
+ update!(**args)
279
+ end
280
+
281
+ # Update properties of this object
282
+ def update!(**args)
283
+ @etag = args[:etag] if args.key?(:etag)
284
+ @name = args[:name] if args.key?(:name)
285
+ @notification_settings = args[:notification_settings] if args.key?(:notification_settings)
286
+ end
287
+ end
288
+
231
289
  # A subject line of a notification.
232
290
  class GoogleCloudAdvisorynotificationsV1Subject
233
291
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module AdvisorynotificationsV1
18
18
  # Version of the google-apis-advisorynotifications_v1 gem
19
- GEM_VERSION = "0.5.0"
19
+ GEM_VERSION = "0.7.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.12.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20230806"
25
+ REVISION = "20231203"
26
26
  end
27
27
  end
28
28
  end
@@ -64,6 +64,18 @@ module Google
64
64
  include Google::Apis::Core::JsonObjectSupport
65
65
  end
66
66
 
67
+ class GoogleCloudAdvisorynotificationsV1NotificationSettings
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class GoogleCloudAdvisorynotificationsV1Settings
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
67
79
  class GoogleCloudAdvisorynotificationsV1Subject
68
80
  class Representation < Google::Apis::Core::JsonRepresentation; end
69
81
 
@@ -144,6 +156,23 @@ module Google
144
156
  end
145
157
  end
146
158
 
159
+ class GoogleCloudAdvisorynotificationsV1NotificationSettings
160
+ # @private
161
+ class Representation < Google::Apis::Core::JsonRepresentation
162
+ property :enabled, as: 'enabled'
163
+ end
164
+ end
165
+
166
+ class GoogleCloudAdvisorynotificationsV1Settings
167
+ # @private
168
+ class Representation < Google::Apis::Core::JsonRepresentation
169
+ property :etag, as: 'etag'
170
+ property :name, as: 'name'
171
+ hash :notification_settings, as: 'notificationSettings', class: Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1NotificationSettings, decorator: Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1NotificationSettings::Representation
172
+
173
+ end
174
+ end
175
+
147
176
  class GoogleCloudAdvisorynotificationsV1Subject
148
177
  # @private
149
178
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -49,10 +49,76 @@ module Google
49
49
  @batch_path = 'batch'
50
50
  end
51
51
 
52
+ # Get notification settings.
53
+ # @param [String] name
54
+ # Required. The resource name of the settings to retrieve. Format: organizations/
55
+ # `organization`/locations/`location`/settings.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_organization_location_settings(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1/{+name}', options)
75
+ command.response_representation = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings::Representation
76
+ command.response_class = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Update notification settings.
84
+ # @param [String] name
85
+ # Identifier. The resource name of the settings to retrieve. Format:
86
+ # organizations/`organization`/locations/`location`/settings.
87
+ # @param [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings] google_cloud_advisorynotifications_v1_settings_object
88
+ # @param [String] fields
89
+ # Selector specifying which fields to include in a partial response.
90
+ # @param [String] quota_user
91
+ # Available to use for quota purposes for server-side applications. Can be any
92
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
93
+ # @param [Google::Apis::RequestOptions] options
94
+ # Request-specific options
95
+ #
96
+ # @yield [result, err] Result & error if block supplied
97
+ # @yieldparam result [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings] parsed result object
98
+ # @yieldparam err [StandardError] error object if request failed
99
+ #
100
+ # @return [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings]
101
+ #
102
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
103
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
104
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
105
+ def update_organization_location_settings(name, google_cloud_advisorynotifications_v1_settings_object = nil, fields: nil, quota_user: nil, options: nil, &block)
106
+ command = make_simple_command(:patch, 'v1/{+name}', options)
107
+ command.request_representation = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings::Representation
108
+ command.request_object = google_cloud_advisorynotifications_v1_settings_object
109
+ command.response_representation = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings::Representation
110
+ command.response_class = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Settings
111
+ command.params['name'] = name unless name.nil?
112
+ command.query['fields'] = fields unless fields.nil?
113
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
114
+ execute_or_queue_command(command, &block)
115
+ end
116
+
52
117
  # Gets a notification.
53
118
  # @param [String] name
54
119
  # Required. A name of the notification to retrieve. Format: organizations/`
55
- # organization`/locations/`location`/notifications/`notification`.
120
+ # organization`/locations/`location`/notifications/`notification` or projects/`
121
+ # projects`/locations/`location`/notifications/`notification`.
56
122
  # @param [String] language_code
57
123
  # ISO code for requested localization language. If unset, will be interpereted
58
124
  # as "en". If the requested language is valid, but not supported for this
@@ -90,7 +156,8 @@ module Google
90
156
  # Lists notifications under a given parent.
91
157
  # @param [String] parent
92
158
  # Required. The parent, which owns this collection of notifications. Must be of
93
- # the form "organizations/`organization`/locations/`location`"
159
+ # the form "organizations/`organization`/locations/`location`" or "projects/`
160
+ # project`/locations/`location`"
94
161
  # @param [String] language_code
95
162
  # ISO code for requested localization language. If unset, will be interpereted
96
163
  # as "en". If the requested language is valid, but not supported for this
@@ -138,6 +205,98 @@ module Google
138
205
  command.query['quotaUser'] = quota_user unless quota_user.nil?
139
206
  execute_or_queue_command(command, &block)
140
207
  end
208
+
209
+ # Gets a notification.
210
+ # @param [String] name
211
+ # Required. A name of the notification to retrieve. Format: organizations/`
212
+ # organization`/locations/`location`/notifications/`notification` or projects/`
213
+ # projects`/locations/`location`/notifications/`notification`.
214
+ # @param [String] language_code
215
+ # ISO code for requested localization language. If unset, will be interpereted
216
+ # as "en". If the requested language is valid, but not supported for this
217
+ # notification, English will be returned with an "Not applicable"
218
+ # LocalizationState. If the ISO code is invalid (i.e. not a real language), this
219
+ # RPC will throw an error.
220
+ # @param [String] fields
221
+ # Selector specifying which fields to include in a partial response.
222
+ # @param [String] quota_user
223
+ # Available to use for quota purposes for server-side applications. Can be any
224
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
225
+ # @param [Google::Apis::RequestOptions] options
226
+ # Request-specific options
227
+ #
228
+ # @yield [result, err] Result & error if block supplied
229
+ # @yieldparam result [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Notification] parsed result object
230
+ # @yieldparam err [StandardError] error object if request failed
231
+ #
232
+ # @return [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Notification]
233
+ #
234
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
235
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
236
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
237
+ def get_project_location_notification(name, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
238
+ command = make_simple_command(:get, 'v1/{+name}', options)
239
+ command.response_representation = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Notification::Representation
240
+ command.response_class = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1Notification
241
+ command.params['name'] = name unless name.nil?
242
+ command.query['languageCode'] = language_code unless language_code.nil?
243
+ command.query['fields'] = fields unless fields.nil?
244
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
245
+ execute_or_queue_command(command, &block)
246
+ end
247
+
248
+ # Lists notifications under a given parent.
249
+ # @param [String] parent
250
+ # Required. The parent, which owns this collection of notifications. Must be of
251
+ # the form "organizations/`organization`/locations/`location`" or "projects/`
252
+ # project`/locations/`location`"
253
+ # @param [String] language_code
254
+ # ISO code for requested localization language. If unset, will be interpereted
255
+ # as "en". If the requested language is valid, but not supported for this
256
+ # notification, English will be returned with an "Not applicable"
257
+ # LocalizationState. If the ISO code is invalid (i.e. not a real language), this
258
+ # RPC will throw an error.
259
+ # @param [Fixnum] page_size
260
+ # The maximum number of notifications to return. The service may return fewer
261
+ # than this value. If unspecified or equal to 0, at most 50 notifications will
262
+ # be returned. The maximum value is 50; values above 50 will be coerced to 50.
263
+ # @param [String] page_token
264
+ # A page token returned from a previous request. When paginating, all other
265
+ # parameters provided in the request must match the call that returned the page
266
+ # token.
267
+ # @param [String] view
268
+ # Specifies which parts of the notification resource should be returned in the
269
+ # response.
270
+ # @param [String] fields
271
+ # Selector specifying which fields to include in a partial response.
272
+ # @param [String] quota_user
273
+ # Available to use for quota purposes for server-side applications. Can be any
274
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
275
+ # @param [Google::Apis::RequestOptions] options
276
+ # Request-specific options
277
+ #
278
+ # @yield [result, err] Result & error if block supplied
279
+ # @yieldparam result [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1ListNotificationsResponse] parsed result object
280
+ # @yieldparam err [StandardError] error object if request failed
281
+ #
282
+ # @return [Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1ListNotificationsResponse]
283
+ #
284
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
285
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
286
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
287
+ def list_project_location_notifications(parent, language_code: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
288
+ command = make_simple_command(:get, 'v1/{+parent}/notifications', options)
289
+ command.response_representation = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1ListNotificationsResponse::Representation
290
+ command.response_class = Google::Apis::AdvisorynotificationsV1::GoogleCloudAdvisorynotificationsV1ListNotificationsResponse
291
+ command.params['parent'] = parent unless parent.nil?
292
+ command.query['languageCode'] = language_code unless language_code.nil?
293
+ command.query['pageSize'] = page_size unless page_size.nil?
294
+ command.query['pageToken'] = page_token unless page_token.nil?
295
+ command.query['view'] = view unless view.nil?
296
+ command.query['fields'] = fields unless fields.nil?
297
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
298
+ execute_or_queue_command(command, &block)
299
+ end
141
300
 
142
301
  protected
143
302
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-advisorynotifications_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-20 00:00:00.000000000 Z
11
+ date: 2023-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-advisorynotifications_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-advisorynotifications_v1/v0.5.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-advisorynotifications_v1/v0.7.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-advisorynotifications_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.4.2
78
+ rubygems_version: 3.4.19
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Advisory Notifications API V1