google-cloud-advisory_notifications-v1 0.5.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/advisory_notifications/v1/advisory_notifications_service/client.rb +190 -2
- data/lib/google/cloud/advisory_notifications/v1/advisory_notifications_service/paths.rb +75 -12
- data/lib/google/cloud/advisory_notifications/v1/advisory_notifications_service/rest/client.rb +176 -2
- data/lib/google/cloud/advisory_notifications/v1/advisory_notifications_service/rest/service_stub.rb +133 -0
- data/lib/google/cloud/advisory_notifications/v1/version.rb +1 -1
- data/lib/google/cloud/advisorynotifications/v1/service_pb.rb +5 -1
- data/lib/google/cloud/advisorynotifications/v1/service_services_pb.rb +4 -0
- data/proto_docs/google/api/client.rb +13 -0
- data/proto_docs/google/cloud/advisorynotifications/v1/service.rb +66 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '086f26f7c99e3186e3b289c3e60bc873401218a5f4c09823418818b30914fe35'
|
4
|
+
data.tar.gz: ef739413ece3e51cd2b8a9305afc34551081302749fa0cf808a99638e5009533
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 597fde2c784bf0716c90c08c11c8ceb19ba6d2cd3c4713a5a9467e3b5fa007e0828d6abeaddca49dd605d1fefe1279c093a17a10d79cfa479bde5aba33db440a
|
7
|
+
data.tar.gz: 6020bf190dc18c11d17b432c71da9f94e9e1b8c779c6554aa3fbb9bba3d698c3019e810c66b64afa3ad4bd6fee6f2f374b91ad87678d7a81986d1d45dec67550
|
@@ -175,7 +175,8 @@ module Google
|
|
175
175
|
#
|
176
176
|
# @param parent [::String]
|
177
177
|
# Required. The parent, which owns this collection of notifications.
|
178
|
-
# Must be of the form "organizations/\\{organization}/locations/\\{location}"
|
178
|
+
# Must be of the form "organizations/\\{organization}/locations/\\{location}"
|
179
|
+
# or "projects/\\{project}/locations/\\{location}"
|
179
180
|
# @param page_size [::Integer]
|
180
181
|
# The maximum number of notifications to return. The service may return
|
181
182
|
# fewer than this value. If unspecified or equal to 0, at most 50
|
@@ -285,7 +286,8 @@ module Google
|
|
285
286
|
# @param name [::String]
|
286
287
|
# Required. A name of the notification to retrieve.
|
287
288
|
# Format:
|
288
|
-
# organizations/\\{organization}/locations/\\{location}/notifications/\\{notification}
|
289
|
+
# organizations/\\{organization}/locations/\\{location}/notifications/\\{notification}
|
290
|
+
# or projects/\\{projects}/locations/\\{location}/notifications/\\{notification}.
|
289
291
|
# @param language_code [::String]
|
290
292
|
# ISO code for requested localization language. If unset, will be
|
291
293
|
# interpereted as "en". If the requested language is valid, but not supported
|
@@ -357,6 +359,178 @@ module Google
|
|
357
359
|
raise ::Google::Cloud::Error.from_error(e)
|
358
360
|
end
|
359
361
|
|
362
|
+
##
|
363
|
+
# Get notification settings.
|
364
|
+
#
|
365
|
+
# @overload get_settings(request, options = nil)
|
366
|
+
# Pass arguments to `get_settings` via a request object, either of type
|
367
|
+
# {::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest} or an equivalent Hash.
|
368
|
+
#
|
369
|
+
# @param request [::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest, ::Hash]
|
370
|
+
# A request object representing the call parameters. Required. To specify no
|
371
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
372
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
373
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
374
|
+
#
|
375
|
+
# @overload get_settings(name: nil)
|
376
|
+
# Pass arguments to `get_settings` via keyword arguments. Note that at
|
377
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
378
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
379
|
+
#
|
380
|
+
# @param name [::String]
|
381
|
+
# Required. The resource name of the settings to retrieve.
|
382
|
+
# Format:
|
383
|
+
# organizations/\\{organization}/locations/\\{location}/settings.
|
384
|
+
#
|
385
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
386
|
+
# @yieldparam response [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
387
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
388
|
+
#
|
389
|
+
# @return [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
390
|
+
#
|
391
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
392
|
+
#
|
393
|
+
# @example Basic example
|
394
|
+
# require "google/cloud/advisory_notifications/v1"
|
395
|
+
#
|
396
|
+
# # Create a client object. The client can be reused for multiple calls.
|
397
|
+
# client = Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Client.new
|
398
|
+
#
|
399
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
400
|
+
# request = Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest.new
|
401
|
+
#
|
402
|
+
# # Call the get_settings method.
|
403
|
+
# result = client.get_settings request
|
404
|
+
#
|
405
|
+
# # The returned object is of type Google::Cloud::AdvisoryNotifications::V1::Settings.
|
406
|
+
# p result
|
407
|
+
#
|
408
|
+
def get_settings request, options = nil
|
409
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
410
|
+
|
411
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest
|
412
|
+
|
413
|
+
# Converts hash and nil to an options object
|
414
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
415
|
+
|
416
|
+
# Customize the options with defaults
|
417
|
+
metadata = @config.rpcs.get_settings.metadata.to_h
|
418
|
+
|
419
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
420
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
421
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
422
|
+
gapic_version: ::Google::Cloud::AdvisoryNotifications::V1::VERSION
|
423
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
424
|
+
|
425
|
+
header_params = {}
|
426
|
+
if request.name
|
427
|
+
header_params["name"] = request.name
|
428
|
+
end
|
429
|
+
|
430
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
431
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
432
|
+
|
433
|
+
options.apply_defaults timeout: @config.rpcs.get_settings.timeout,
|
434
|
+
metadata: metadata,
|
435
|
+
retry_policy: @config.rpcs.get_settings.retry_policy
|
436
|
+
|
437
|
+
options.apply_defaults timeout: @config.timeout,
|
438
|
+
metadata: @config.metadata,
|
439
|
+
retry_policy: @config.retry_policy
|
440
|
+
|
441
|
+
@advisory_notifications_service_stub.call_rpc :get_settings, request, options: options do |response, operation|
|
442
|
+
yield response, operation if block_given?
|
443
|
+
return response
|
444
|
+
end
|
445
|
+
rescue ::GRPC::BadStatus => e
|
446
|
+
raise ::Google::Cloud::Error.from_error(e)
|
447
|
+
end
|
448
|
+
|
449
|
+
##
|
450
|
+
# Update notification settings.
|
451
|
+
#
|
452
|
+
# @overload update_settings(request, options = nil)
|
453
|
+
# Pass arguments to `update_settings` via a request object, either of type
|
454
|
+
# {::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest} or an equivalent Hash.
|
455
|
+
#
|
456
|
+
# @param request [::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest, ::Hash]
|
457
|
+
# A request object representing the call parameters. Required. To specify no
|
458
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
459
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
460
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
461
|
+
#
|
462
|
+
# @overload update_settings(settings: nil)
|
463
|
+
# Pass arguments to `update_settings` via keyword arguments. Note that at
|
464
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
465
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
466
|
+
#
|
467
|
+
# @param settings [::Google::Cloud::AdvisoryNotifications::V1::Settings, ::Hash]
|
468
|
+
# Required. New settings.
|
469
|
+
#
|
470
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
471
|
+
# @yieldparam response [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
472
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
473
|
+
#
|
474
|
+
# @return [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
475
|
+
#
|
476
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
477
|
+
#
|
478
|
+
# @example Basic example
|
479
|
+
# require "google/cloud/advisory_notifications/v1"
|
480
|
+
#
|
481
|
+
# # Create a client object. The client can be reused for multiple calls.
|
482
|
+
# client = Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Client.new
|
483
|
+
#
|
484
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
485
|
+
# request = Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest.new
|
486
|
+
#
|
487
|
+
# # Call the update_settings method.
|
488
|
+
# result = client.update_settings request
|
489
|
+
#
|
490
|
+
# # The returned object is of type Google::Cloud::AdvisoryNotifications::V1::Settings.
|
491
|
+
# p result
|
492
|
+
#
|
493
|
+
def update_settings request, options = nil
|
494
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
495
|
+
|
496
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest
|
497
|
+
|
498
|
+
# Converts hash and nil to an options object
|
499
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
500
|
+
|
501
|
+
# Customize the options with defaults
|
502
|
+
metadata = @config.rpcs.update_settings.metadata.to_h
|
503
|
+
|
504
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
505
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
506
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
507
|
+
gapic_version: ::Google::Cloud::AdvisoryNotifications::V1::VERSION
|
508
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
509
|
+
|
510
|
+
header_params = {}
|
511
|
+
if request.settings&.name
|
512
|
+
header_params["settings.name"] = request.settings.name
|
513
|
+
end
|
514
|
+
|
515
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
516
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
517
|
+
|
518
|
+
options.apply_defaults timeout: @config.rpcs.update_settings.timeout,
|
519
|
+
metadata: metadata,
|
520
|
+
retry_policy: @config.rpcs.update_settings.retry_policy
|
521
|
+
|
522
|
+
options.apply_defaults timeout: @config.timeout,
|
523
|
+
metadata: @config.metadata,
|
524
|
+
retry_policy: @config.retry_policy
|
525
|
+
|
526
|
+
@advisory_notifications_service_stub.call_rpc :update_settings, request, options: options do |response, operation|
|
527
|
+
yield response, operation if block_given?
|
528
|
+
return response
|
529
|
+
end
|
530
|
+
rescue ::GRPC::BadStatus => e
|
531
|
+
raise ::Google::Cloud::Error.from_error(e)
|
532
|
+
end
|
533
|
+
|
360
534
|
##
|
361
535
|
# Configuration class for the AdvisoryNotificationsService API.
|
362
536
|
#
|
@@ -512,6 +686,16 @@ module Google
|
|
512
686
|
# @return [::Gapic::Config::Method]
|
513
687
|
#
|
514
688
|
attr_reader :get_notification
|
689
|
+
##
|
690
|
+
# RPC-specific configuration for `get_settings`
|
691
|
+
# @return [::Gapic::Config::Method]
|
692
|
+
#
|
693
|
+
attr_reader :get_settings
|
694
|
+
##
|
695
|
+
# RPC-specific configuration for `update_settings`
|
696
|
+
# @return [::Gapic::Config::Method]
|
697
|
+
#
|
698
|
+
attr_reader :update_settings
|
515
699
|
|
516
700
|
# @private
|
517
701
|
def initialize parent_rpcs = nil
|
@@ -519,6 +703,10 @@ module Google
|
|
519
703
|
@list_notifications = ::Gapic::Config::Method.new list_notifications_config
|
520
704
|
get_notification_config = parent_rpcs.get_notification if parent_rpcs.respond_to? :get_notification
|
521
705
|
@get_notification = ::Gapic::Config::Method.new get_notification_config
|
706
|
+
get_settings_config = parent_rpcs.get_settings if parent_rpcs.respond_to? :get_settings
|
707
|
+
@get_settings = ::Gapic::Config::Method.new get_settings_config
|
708
|
+
update_settings_config = parent_rpcs.update_settings if parent_rpcs.respond_to? :update_settings
|
709
|
+
@update_settings = ::Gapic::Config::Method.new update_settings_config
|
522
710
|
|
523
711
|
yield self if block_given?
|
524
712
|
end
|
@@ -27,37 +27,100 @@ module Google
|
|
27
27
|
##
|
28
28
|
# Create a fully-qualified Location resource string.
|
29
29
|
#
|
30
|
-
#
|
30
|
+
# @overload location_path(organization:, location:)
|
31
|
+
# The resource will be in the following format:
|
31
32
|
#
|
32
|
-
#
|
33
|
+
# `organizations/{organization}/locations/{location}`
|
33
34
|
#
|
34
|
-
#
|
35
|
-
#
|
35
|
+
# @param organization [String]
|
36
|
+
# @param location [String]
|
37
|
+
#
|
38
|
+
# @overload location_path(project:, location:)
|
39
|
+
# The resource will be in the following format:
|
40
|
+
#
|
41
|
+
# `projects/{project}/locations/{location}`
|
42
|
+
#
|
43
|
+
# @param project [String]
|
44
|
+
# @param location [String]
|
36
45
|
#
|
37
46
|
# @return [::String]
|
38
|
-
def location_path
|
39
|
-
|
47
|
+
def location_path **args
|
48
|
+
resources = {
|
49
|
+
"location:organization" => (proc do |organization:, location:|
|
50
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
51
|
+
|
52
|
+
"organizations/#{organization}/locations/#{location}"
|
53
|
+
end),
|
54
|
+
"location:project" => (proc do |project:, location:|
|
55
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
56
|
+
|
57
|
+
"projects/#{project}/locations/#{location}"
|
58
|
+
end)
|
59
|
+
}
|
40
60
|
|
41
|
-
"
|
61
|
+
resource = resources[args.keys.sort.join(":")]
|
62
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
63
|
+
resource.call(**args)
|
42
64
|
end
|
43
65
|
|
44
66
|
##
|
45
67
|
# Create a fully-qualified Notification resource string.
|
46
68
|
#
|
69
|
+
# @overload notification_path(organization:, location:, notification:)
|
70
|
+
# The resource will be in the following format:
|
71
|
+
#
|
72
|
+
# `organizations/{organization}/locations/{location}/notifications/{notification}`
|
73
|
+
#
|
74
|
+
# @param organization [String]
|
75
|
+
# @param location [String]
|
76
|
+
# @param notification [String]
|
77
|
+
#
|
78
|
+
# @overload notification_path(project:, location:, notification:)
|
79
|
+
# The resource will be in the following format:
|
80
|
+
#
|
81
|
+
# `projects/{project}/locations/{location}/notifications/{notification}`
|
82
|
+
#
|
83
|
+
# @param project [String]
|
84
|
+
# @param location [String]
|
85
|
+
# @param notification [String]
|
86
|
+
#
|
87
|
+
# @return [::String]
|
88
|
+
def notification_path **args
|
89
|
+
resources = {
|
90
|
+
"location:notification:organization" => (proc do |organization:, location:, notification:|
|
91
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
92
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
93
|
+
|
94
|
+
"organizations/#{organization}/locations/#{location}/notifications/#{notification}"
|
95
|
+
end),
|
96
|
+
"location:notification:project" => (proc do |project:, location:, notification:|
|
97
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
98
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
99
|
+
|
100
|
+
"projects/#{project}/locations/#{location}/notifications/#{notification}"
|
101
|
+
end)
|
102
|
+
}
|
103
|
+
|
104
|
+
resource = resources[args.keys.sort.join(":")]
|
105
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
106
|
+
resource.call(**args)
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# Create a fully-qualified Settings resource string.
|
111
|
+
#
|
47
112
|
# The resource will be in the following format:
|
48
113
|
#
|
49
|
-
# `organizations/{organization}/locations/{location}/
|
114
|
+
# `organizations/{organization}/locations/{location}/settings`
|
50
115
|
#
|
51
116
|
# @param organization [String]
|
52
117
|
# @param location [String]
|
53
|
-
# @param notification [String]
|
54
118
|
#
|
55
119
|
# @return [::String]
|
56
|
-
def
|
120
|
+
def settings_path organization:, location:
|
57
121
|
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
58
|
-
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
59
122
|
|
60
|
-
"organizations/#{organization}/locations/#{location}/
|
123
|
+
"organizations/#{organization}/locations/#{location}/settings"
|
61
124
|
end
|
62
125
|
|
63
126
|
extend self
|
data/lib/google/cloud/advisory_notifications/v1/advisory_notifications_service/rest/client.rb
CHANGED
@@ -165,7 +165,8 @@ module Google
|
|
165
165
|
#
|
166
166
|
# @param parent [::String]
|
167
167
|
# Required. The parent, which owns this collection of notifications.
|
168
|
-
# Must be of the form "organizations/\\{organization}/locations/\\{location}"
|
168
|
+
# Must be of the form "organizations/\\{organization}/locations/\\{location}"
|
169
|
+
# or "projects/\\{project}/locations/\\{location}"
|
169
170
|
# @param page_size [::Integer]
|
170
171
|
# The maximum number of notifications to return. The service may return
|
171
172
|
# fewer than this value. If unspecified or equal to 0, at most 50
|
@@ -268,7 +269,8 @@ module Google
|
|
268
269
|
# @param name [::String]
|
269
270
|
# Required. A name of the notification to retrieve.
|
270
271
|
# Format:
|
271
|
-
# organizations/\\{organization}/locations/\\{location}/notifications/\\{notification}
|
272
|
+
# organizations/\\{organization}/locations/\\{location}/notifications/\\{notification}
|
273
|
+
# or projects/\\{projects}/locations/\\{location}/notifications/\\{notification}.
|
272
274
|
# @param language_code [::String]
|
273
275
|
# ISO code for requested localization language. If unset, will be
|
274
276
|
# interpereted as "en". If the requested language is valid, but not supported
|
@@ -333,6 +335,164 @@ module Google
|
|
333
335
|
raise ::Google::Cloud::Error.from_error(e)
|
334
336
|
end
|
335
337
|
|
338
|
+
##
|
339
|
+
# Get notification settings.
|
340
|
+
#
|
341
|
+
# @overload get_settings(request, options = nil)
|
342
|
+
# Pass arguments to `get_settings` via a request object, either of type
|
343
|
+
# {::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest} or an equivalent Hash.
|
344
|
+
#
|
345
|
+
# @param request [::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest, ::Hash]
|
346
|
+
# A request object representing the call parameters. Required. To specify no
|
347
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
348
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
349
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
350
|
+
#
|
351
|
+
# @overload get_settings(name: nil)
|
352
|
+
# Pass arguments to `get_settings` via keyword arguments. Note that at
|
353
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
354
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
355
|
+
#
|
356
|
+
# @param name [::String]
|
357
|
+
# Required. The resource name of the settings to retrieve.
|
358
|
+
# Format:
|
359
|
+
# organizations/\\{organization}/locations/\\{location}/settings.
|
360
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
361
|
+
# @yieldparam result [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
362
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
363
|
+
#
|
364
|
+
# @return [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
365
|
+
#
|
366
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
367
|
+
#
|
368
|
+
# @example Basic example
|
369
|
+
# require "google/cloud/advisory_notifications/v1"
|
370
|
+
#
|
371
|
+
# # Create a client object. The client can be reused for multiple calls.
|
372
|
+
# client = Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Rest::Client.new
|
373
|
+
#
|
374
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
375
|
+
# request = Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest.new
|
376
|
+
#
|
377
|
+
# # Call the get_settings method.
|
378
|
+
# result = client.get_settings request
|
379
|
+
#
|
380
|
+
# # The returned object is of type Google::Cloud::AdvisoryNotifications::V1::Settings.
|
381
|
+
# p result
|
382
|
+
#
|
383
|
+
def get_settings request, options = nil
|
384
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
385
|
+
|
386
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest
|
387
|
+
|
388
|
+
# Converts hash and nil to an options object
|
389
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
390
|
+
|
391
|
+
# Customize the options with defaults
|
392
|
+
call_metadata = @config.rpcs.get_settings.metadata.to_h
|
393
|
+
|
394
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
395
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
396
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
397
|
+
gapic_version: ::Google::Cloud::AdvisoryNotifications::V1::VERSION,
|
398
|
+
transports_version_send: [:rest]
|
399
|
+
|
400
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
401
|
+
|
402
|
+
options.apply_defaults timeout: @config.rpcs.get_settings.timeout,
|
403
|
+
metadata: call_metadata,
|
404
|
+
retry_policy: @config.rpcs.get_settings.retry_policy
|
405
|
+
|
406
|
+
options.apply_defaults timeout: @config.timeout,
|
407
|
+
metadata: @config.metadata,
|
408
|
+
retry_policy: @config.retry_policy
|
409
|
+
|
410
|
+
@advisory_notifications_service_stub.get_settings request, options do |result, operation|
|
411
|
+
yield result, operation if block_given?
|
412
|
+
return result
|
413
|
+
end
|
414
|
+
rescue ::Gapic::Rest::Error => e
|
415
|
+
raise ::Google::Cloud::Error.from_error(e)
|
416
|
+
end
|
417
|
+
|
418
|
+
##
|
419
|
+
# Update notification settings.
|
420
|
+
#
|
421
|
+
# @overload update_settings(request, options = nil)
|
422
|
+
# Pass arguments to `update_settings` via a request object, either of type
|
423
|
+
# {::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest} or an equivalent Hash.
|
424
|
+
#
|
425
|
+
# @param request [::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest, ::Hash]
|
426
|
+
# A request object representing the call parameters. Required. To specify no
|
427
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
428
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
429
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
430
|
+
#
|
431
|
+
# @overload update_settings(settings: nil)
|
432
|
+
# Pass arguments to `update_settings` via keyword arguments. Note that at
|
433
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
434
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
435
|
+
#
|
436
|
+
# @param settings [::Google::Cloud::AdvisoryNotifications::V1::Settings, ::Hash]
|
437
|
+
# Required. New settings.
|
438
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
439
|
+
# @yieldparam result [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
440
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
441
|
+
#
|
442
|
+
# @return [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
443
|
+
#
|
444
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
445
|
+
#
|
446
|
+
# @example Basic example
|
447
|
+
# require "google/cloud/advisory_notifications/v1"
|
448
|
+
#
|
449
|
+
# # Create a client object. The client can be reused for multiple calls.
|
450
|
+
# client = Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Rest::Client.new
|
451
|
+
#
|
452
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
453
|
+
# request = Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest.new
|
454
|
+
#
|
455
|
+
# # Call the update_settings method.
|
456
|
+
# result = client.update_settings request
|
457
|
+
#
|
458
|
+
# # The returned object is of type Google::Cloud::AdvisoryNotifications::V1::Settings.
|
459
|
+
# p result
|
460
|
+
#
|
461
|
+
def update_settings request, options = nil
|
462
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
463
|
+
|
464
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest
|
465
|
+
|
466
|
+
# Converts hash and nil to an options object
|
467
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
468
|
+
|
469
|
+
# Customize the options with defaults
|
470
|
+
call_metadata = @config.rpcs.update_settings.metadata.to_h
|
471
|
+
|
472
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
473
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
474
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
475
|
+
gapic_version: ::Google::Cloud::AdvisoryNotifications::V1::VERSION,
|
476
|
+
transports_version_send: [:rest]
|
477
|
+
|
478
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
479
|
+
|
480
|
+
options.apply_defaults timeout: @config.rpcs.update_settings.timeout,
|
481
|
+
metadata: call_metadata,
|
482
|
+
retry_policy: @config.rpcs.update_settings.retry_policy
|
483
|
+
|
484
|
+
options.apply_defaults timeout: @config.timeout,
|
485
|
+
metadata: @config.metadata,
|
486
|
+
retry_policy: @config.retry_policy
|
487
|
+
|
488
|
+
@advisory_notifications_service_stub.update_settings request, options do |result, operation|
|
489
|
+
yield result, operation if block_given?
|
490
|
+
return result
|
491
|
+
end
|
492
|
+
rescue ::Gapic::Rest::Error => e
|
493
|
+
raise ::Google::Cloud::Error.from_error(e)
|
494
|
+
end
|
495
|
+
|
336
496
|
##
|
337
497
|
# Configuration class for the AdvisoryNotificationsService REST API.
|
338
498
|
#
|
@@ -468,6 +628,16 @@ module Google
|
|
468
628
|
# @return [::Gapic::Config::Method]
|
469
629
|
#
|
470
630
|
attr_reader :get_notification
|
631
|
+
##
|
632
|
+
# RPC-specific configuration for `get_settings`
|
633
|
+
# @return [::Gapic::Config::Method]
|
634
|
+
#
|
635
|
+
attr_reader :get_settings
|
636
|
+
##
|
637
|
+
# RPC-specific configuration for `update_settings`
|
638
|
+
# @return [::Gapic::Config::Method]
|
639
|
+
#
|
640
|
+
attr_reader :update_settings
|
471
641
|
|
472
642
|
# @private
|
473
643
|
def initialize parent_rpcs = nil
|
@@ -475,6 +645,10 @@ module Google
|
|
475
645
|
@list_notifications = ::Gapic::Config::Method.new list_notifications_config
|
476
646
|
get_notification_config = parent_rpcs.get_notification if parent_rpcs.respond_to? :get_notification
|
477
647
|
@get_notification = ::Gapic::Config::Method.new get_notification_config
|
648
|
+
get_settings_config = parent_rpcs.get_settings if parent_rpcs.respond_to? :get_settings
|
649
|
+
@get_settings = ::Gapic::Config::Method.new get_settings_config
|
650
|
+
update_settings_config = parent_rpcs.update_settings if parent_rpcs.respond_to? :update_settings
|
651
|
+
@update_settings = ::Gapic::Config::Method.new update_settings_config
|
478
652
|
|
479
653
|
yield self if block_given?
|
480
654
|
end
|
data/lib/google/cloud/advisory_notifications/v1/advisory_notifications_service/rest/service_stub.rb
CHANGED
@@ -116,6 +116,82 @@ module Google
|
|
116
116
|
result
|
117
117
|
end
|
118
118
|
|
119
|
+
##
|
120
|
+
# Baseline implementation for the get_settings REST call
|
121
|
+
#
|
122
|
+
# @param request_pb [::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest]
|
123
|
+
# A request object representing the call parameters. Required.
|
124
|
+
# @param options [::Gapic::CallOptions]
|
125
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
126
|
+
#
|
127
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
128
|
+
# @yieldparam result [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
129
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
130
|
+
#
|
131
|
+
# @return [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
132
|
+
# A result object deserialized from the server's reply
|
133
|
+
def get_settings request_pb, options = nil
|
134
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
135
|
+
|
136
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_settings_request request_pb
|
137
|
+
query_string_params = if query_string_params.any?
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
|
+
else
|
140
|
+
{}
|
141
|
+
end
|
142
|
+
|
143
|
+
response = @client_stub.make_http_request(
|
144
|
+
verb,
|
145
|
+
uri: uri,
|
146
|
+
body: body || "",
|
147
|
+
params: query_string_params,
|
148
|
+
options: options
|
149
|
+
)
|
150
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
151
|
+
result = ::Google::Cloud::AdvisoryNotifications::V1::Settings.decode_json response.body, ignore_unknown_fields: true
|
152
|
+
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Baseline implementation for the update_settings REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest]
|
161
|
+
# A request object representing the call parameters. Required.
|
162
|
+
# @param options [::Gapic::CallOptions]
|
163
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
164
|
+
#
|
165
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
166
|
+
# @yieldparam result [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def update_settings request_pb, options = nil
|
172
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
173
|
+
|
174
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_settings_request request_pb
|
175
|
+
query_string_params = if query_string_params.any?
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
|
+
else
|
178
|
+
{}
|
179
|
+
end
|
180
|
+
|
181
|
+
response = @client_stub.make_http_request(
|
182
|
+
verb,
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
options: options
|
187
|
+
)
|
188
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
189
|
+
result = ::Google::Cloud::AdvisoryNotifications::V1::Settings.decode_json response.body, ignore_unknown_fields: true
|
190
|
+
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
119
195
|
##
|
120
196
|
# @private
|
121
197
|
#
|
@@ -134,6 +210,13 @@ module Google
|
|
134
210
|
["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
|
135
211
|
]
|
136
212
|
)
|
213
|
+
.with_bindings(
|
214
|
+
uri_method: :get,
|
215
|
+
uri_template: "/v1/{parent}/notifications",
|
216
|
+
matches: [
|
217
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
218
|
+
]
|
219
|
+
)
|
137
220
|
transcoder.transcode request_pb
|
138
221
|
end
|
139
222
|
|
@@ -155,6 +238,56 @@ module Google
|
|
155
238
|
["name", %r{^organizations/[^/]+/locations/[^/]+/notifications/[^/]+/?$}, false]
|
156
239
|
]
|
157
240
|
)
|
241
|
+
.with_bindings(
|
242
|
+
uri_method: :get,
|
243
|
+
uri_template: "/v1/{name}",
|
244
|
+
matches: [
|
245
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/notifications/[^/]+/?$}, false]
|
246
|
+
]
|
247
|
+
)
|
248
|
+
transcoder.transcode request_pb
|
249
|
+
end
|
250
|
+
|
251
|
+
##
|
252
|
+
# @private
|
253
|
+
#
|
254
|
+
# GRPC transcoding helper method for the get_settings REST call
|
255
|
+
#
|
256
|
+
# @param request_pb [::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest]
|
257
|
+
# A request object representing the call parameters. Required.
|
258
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
259
|
+
# Uri, Body, Query string parameters
|
260
|
+
def self.transcode_get_settings_request request_pb
|
261
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
262
|
+
.with_bindings(
|
263
|
+
uri_method: :get,
|
264
|
+
uri_template: "/v1/{name}",
|
265
|
+
matches: [
|
266
|
+
["name", %r{^organizations/[^/]+/locations/[^/]+/settings/?$}, false]
|
267
|
+
]
|
268
|
+
)
|
269
|
+
transcoder.transcode request_pb
|
270
|
+
end
|
271
|
+
|
272
|
+
##
|
273
|
+
# @private
|
274
|
+
#
|
275
|
+
# GRPC transcoding helper method for the update_settings REST call
|
276
|
+
#
|
277
|
+
# @param request_pb [::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest]
|
278
|
+
# A request object representing the call parameters. Required.
|
279
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
280
|
+
# Uri, Body, Query string parameters
|
281
|
+
def self.transcode_update_settings_request request_pb
|
282
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
283
|
+
.with_bindings(
|
284
|
+
uri_method: :patch,
|
285
|
+
uri_template: "/v1/{settings.name}",
|
286
|
+
body: "settings",
|
287
|
+
matches: [
|
288
|
+
["settings.name", %r{^organizations/[^/]+/locations/[^/]+/settings/?$}, false]
|
289
|
+
]
|
290
|
+
)
|
158
291
|
transcoder.transcode request_pb
|
159
292
|
end
|
160
293
|
end
|
@@ -11,7 +11,7 @@ require 'google/api/resource_pb'
|
|
11
11
|
require 'google/protobuf/timestamp_pb'
|
12
12
|
|
13
13
|
|
14
|
-
descriptor_data = "\n3google/cloud/advisorynotifications/v1/service.proto\x12%google.cloud.advisorynotifications.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\
|
14
|
+
descriptor_data = "\n3google/cloud/advisorynotifications/v1/service.proto\x12%google.cloud.advisorynotifications.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x96\x04\n\x0cNotification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x07subject\x18\x02 \x01(\x0b\x32..google.cloud.advisorynotifications.v1.Subject\x12@\n\x08messages\x18\x03 \x03(\x0b\x32..google.cloud.advisorynotifications.v1.Message\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12R\n\x11notification_type\x18\x0c \x01(\x0e\x32\x37.google.cloud.advisorynotifications.v1.NotificationType:\xea\x01\xea\x41\xe6\x01\n1advisorynotifications.googleapis.com/Notification\x12Norganizations/{organization}/locations/{location}/notifications/{notification}\x12\x44projects/{project}/locations/{location}/notifications/{notification}*\rnotifications2\x0cnotification\"\x85\x01\n\x04Text\x12\x0f\n\x07\x65n_text\x18\x01 \x01(\t\x12\x16\n\x0elocalized_text\x18\x02 \x01(\t\x12T\n\x12localization_state\x18\x03 \x01(\x0e\x32\x38.google.cloud.advisorynotifications.v1.LocalizationState\"D\n\x07Subject\x12\x39\n\x04text\x18\x01 \x01(\x0b\x32+.google.cloud.advisorynotifications.v1.Text\"\xbf\x02\n\x07Message\x12\x41\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x33.google.cloud.advisorynotifications.v1.Message.Body\x12\x46\n\x0b\x61ttachments\x18\x02 \x03(\x0b\x32\x31.google.cloud.advisorynotifications.v1.Attachment\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11localization_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x41\n\x04\x42ody\x12\x39\n\x04text\x18\x01 \x01(\x0b\x32+.google.cloud.advisorynotifications.v1.Text\"e\n\nAttachment\x12\x39\n\x03\x63sv\x18\x02 \x01(\x0b\x32*.google.cloud.advisorynotifications.v1.CsvH\x00\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x06\n\x04\x64\x61ta\"w\n\x03\x43sv\x12\x0f\n\x07headers\x18\x01 \x03(\t\x12\x44\n\tdata_rows\x18\x02 \x03(\x0b\x32\x31.google.cloud.advisorynotifications.v1.Csv.CsvRow\x1a\x19\n\x06\x43svRow\x12\x0f\n\x07\x65ntries\x18\x01 \x03(\t\"\xea\x01\n\x18ListNotificationsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x61\x64visorynotifications.googleapis.com/Notification\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x45\n\x04view\x18\x04 \x01(\x0e\x32\x37.google.cloud.advisorynotifications.v1.NotificationView\x12\x15\n\rlanguage_code\x18\x05 \x01(\t\"\x94\x01\n\x19ListNotificationsResponse\x12J\n\rnotifications\x18\x01 \x03(\x0b\x32\x33.google.cloud.advisorynotifications.v1.Notification\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"x\n\x16GetNotificationRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1advisorynotifications.googleapis.com/Notification\x12\x15\n\rlanguage_code\x18\x05 \x01(\t\"\x89\x03\n\x08Settings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12m\n\x15notification_settings\x18\x02 \x03(\x0b\x32I.google.cloud.advisorynotifications.v1.Settings.NotificationSettingsEntryB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1ax\n\x19NotificationSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.advisorynotifications.v1.NotificationSettings:\x02\x38\x01:n\xea\x41k\n-advisorynotifications.googleapis.com/Settings\x12:organizations/{organization}/locations/{location}/settings\"\'\n\x14NotificationSettings\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"Y\n\x12GetSettingsRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-advisorynotifications.googleapis.com/Settings\"_\n\x15UpdateSettingsRequest\x12\x46\n\x08settings\x18\x01 \x01(\x0b\x32/.google.cloud.advisorynotifications.v1.SettingsB\x03\xe0\x41\x02*J\n\x10NotificationView\x12!\n\x1dNOTIFICATION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02*\xa0\x01\n\x11LocalizationState\x12\"\n\x1eLOCALIZATION_STATE_UNSPECIFIED\x10\x00\x12%\n!LOCALIZATION_STATE_NOT_APPLICABLE\x10\x01\x12\x1e\n\x1aLOCALIZATION_STATE_PENDING\x10\x02\x12 \n\x1cLOCALIZATION_STATE_COMPLETED\x10\x03*\xda\x01\n\x10NotificationType\x12!\n\x1dNOTIFICATION_TYPE_UNSPECIFIED\x10\x00\x12/\n+NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY\x10\x01\x12\'\n#NOTIFICATION_TYPE_SENSITIVE_ACTIONS\x10\x02\x12\"\n\x1eNOTIFICATION_TYPE_SECURITY_MSA\x10\x03\x12%\n!NOTIFICATION_TYPE_THREAT_HORIZONS\x10\x04\x32\xa8\x08\n\x1c\x41\x64visoryNotificationsService\x12\x94\x02\n\x11ListNotifications\x12?.google.cloud.advisorynotifications.v1.ListNotificationsRequest\x1a@.google.cloud.advisorynotifications.v1.ListNotificationsResponse\"|\x82\xd3\xe4\x93\x02m\x12\x36/v1/{parent=organizations/*/locations/*}/notificationsZ3\x12\x31/v1/{parent=projects/*/locations/*}/notifications\xda\x41\x06parent\x12\x81\x02\n\x0fGetNotification\x12=.google.cloud.advisorynotifications.v1.GetNotificationRequest\x1a\x33.google.cloud.advisorynotifications.v1.Notification\"z\x82\xd3\xe4\x93\x02m\x12\x36/v1/{name=organizations/*/locations/*/notifications/*}Z3\x12\x31/v1/{name=projects/*/locations/*/notifications/*}\xda\x41\x04name\x12\xb9\x01\n\x0bGetSettings\x12\x39.google.cloud.advisorynotifications.v1.GetSettingsRequest\x1a/.google.cloud.advisorynotifications.v1.Settings\">\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=organizations/*/locations/*/settings}\xda\x41\x04name\x12\xd6\x01\n\x0eUpdateSettings\x12<.google.cloud.advisorynotifications.v1.UpdateSettingsRequest\x1a/.google.cloud.advisorynotifications.v1.Settings\"U\x82\xd3\xe4\x93\x02\x44\x32\x38/v1/{settings.name=organizations/*/locations/*/settings}:\x08settings\xda\x41\x08settings\x1aX\xca\x41$advisorynotifications.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa6\x03\n)com.google.cloud.advisorynotifications.v1B\x0cServiceProtoP\x01Z_cloud.google.com/go/advisorynotifications/apiv1/advisorynotificationspb;advisorynotificationspb\xaa\x02%Google.Cloud.AdvisoryNotifications.V1\xca\x02%Google\\Cloud\\AdvisoryNotifications\\V1\xea\x02(Google::Cloud::AdvisoryNotifications::V1\xea\x41\x8b\x01\n-advisorynotifications.googleapis.com/Location\x12\x31organizations/{organization}/locations/{location}\x12\'projects/{project}/locations/{location}b\x06proto3"
|
15
15
|
|
16
16
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
17
|
|
@@ -53,6 +53,10 @@ module Google
|
|
53
53
|
ListNotificationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.ListNotificationsRequest").msgclass
|
54
54
|
ListNotificationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.ListNotificationsResponse").msgclass
|
55
55
|
GetNotificationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.GetNotificationRequest").msgclass
|
56
|
+
Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.Settings").msgclass
|
57
|
+
NotificationSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.NotificationSettings").msgclass
|
58
|
+
GetSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.GetSettingsRequest").msgclass
|
59
|
+
UpdateSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.UpdateSettingsRequest").msgclass
|
56
60
|
NotificationView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.NotificationView").enummodule
|
57
61
|
LocalizationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.LocalizationState").enummodule
|
58
62
|
NotificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.advisorynotifications.v1.NotificationType").enummodule
|
@@ -37,6 +37,10 @@ module Google
|
|
37
37
|
rpc :ListNotifications, ::Google::Cloud::AdvisoryNotifications::V1::ListNotificationsRequest, ::Google::Cloud::AdvisoryNotifications::V1::ListNotificationsResponse
|
38
38
|
# Gets a notification.
|
39
39
|
rpc :GetNotification, ::Google::Cloud::AdvisoryNotifications::V1::GetNotificationRequest, ::Google::Cloud::AdvisoryNotifications::V1::Notification
|
40
|
+
# Get notification settings.
|
41
|
+
rpc :GetSettings, ::Google::Cloud::AdvisoryNotifications::V1::GetSettingsRequest, ::Google::Cloud::AdvisoryNotifications::V1::Settings
|
42
|
+
# Update notification settings.
|
43
|
+
rpc :UpdateSettings, ::Google::Cloud::AdvisoryNotifications::V1::UpdateSettingsRequest, ::Google::Cloud::AdvisoryNotifications::V1::Settings
|
40
44
|
end
|
41
45
|
|
42
46
|
Stub = Service.rpc_stub_class
|
@@ -304,6 +304,19 @@ module Google
|
|
304
304
|
# seconds: 360 # 6 minutes
|
305
305
|
# total_poll_timeout:
|
306
306
|
# seconds: 54000 # 90 minutes
|
307
|
+
# @!attribute [rw] auto_populated_fields
|
308
|
+
# @return [::Array<::String>]
|
309
|
+
# List of top-level fields of the request message, that should be
|
310
|
+
# automatically populated by the client libraries based on their
|
311
|
+
# (google.api.field_info).format. Currently supported format: UUID4.
|
312
|
+
#
|
313
|
+
# Example of a YAML configuration:
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# method_settings:
|
317
|
+
# - selector: google.example.v1.ExampleService.CreateExample
|
318
|
+
# auto_populated_fields:
|
319
|
+
# - request_id
|
307
320
|
class MethodSettings
|
308
321
|
include ::Google::Protobuf::MessageExts
|
309
322
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -27,7 +27,8 @@ module Google
|
|
27
27
|
# @return [::String]
|
28
28
|
# The resource name of the notification.
|
29
29
|
# Format:
|
30
|
-
# organizations/\\{organization}/locations/\\{location}/notifications/\\{notification}
|
30
|
+
# organizations/\\{organization}/locations/\\{location}/notifications/\\{notification}
|
31
|
+
# or projects/\\{project}/locations/\\{location}/notifications/\\{notification}.
|
31
32
|
# @!attribute [rw] subject
|
32
33
|
# @return [::Google::Cloud::AdvisoryNotifications::V1::Subject]
|
33
34
|
# The subject line of the notification.
|
@@ -136,7 +137,8 @@ module Google
|
|
136
137
|
# @!attribute [rw] parent
|
137
138
|
# @return [::String]
|
138
139
|
# Required. The parent, which owns this collection of notifications.
|
139
|
-
# Must be of the form "organizations/\\{organization}/locations/\\{location}"
|
140
|
+
# Must be of the form "organizations/\\{organization}/locations/\\{location}"
|
141
|
+
# or "projects/\\{project}/locations/\\{location}"
|
140
142
|
# @!attribute [rw] page_size
|
141
143
|
# @return [::Integer]
|
142
144
|
# The maximum number of notifications to return. The service may return
|
@@ -185,7 +187,8 @@ module Google
|
|
185
187
|
# @return [::String]
|
186
188
|
# Required. A name of the notification to retrieve.
|
187
189
|
# Format:
|
188
|
-
# organizations/\\{organization}/locations/\\{location}/notifications/\\{notification}
|
190
|
+
# organizations/\\{organization}/locations/\\{location}/notifications/\\{notification}
|
191
|
+
# or projects/\\{projects}/locations/\\{location}/notifications/\\{notification}.
|
189
192
|
# @!attribute [rw] language_code
|
190
193
|
# @return [::String]
|
191
194
|
# ISO code for requested localization language. If unset, will be
|
@@ -198,6 +201,66 @@ module Google
|
|
198
201
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
199
202
|
end
|
200
203
|
|
204
|
+
# Settings for Advisory Notifications.
|
205
|
+
# @!attribute [r] name
|
206
|
+
# @return [::String]
|
207
|
+
# Output only. The resource name of the settings to retrieve.
|
208
|
+
# Format:
|
209
|
+
# organizations/\\{organization}/locations/\\{location}/settings.
|
210
|
+
# @!attribute [rw] notification_settings
|
211
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AdvisoryNotifications::V1::NotificationSettings}]
|
212
|
+
# Required. Map of each notification type and its settings to get/set all
|
213
|
+
# settings at once. The server will validate the value for each notification
|
214
|
+
# type.
|
215
|
+
# @!attribute [rw] etag
|
216
|
+
# @return [::String]
|
217
|
+
# Required. Fingerprint for optimistic concurrency returned in Get requests.
|
218
|
+
# Must be provided for Update requests. If the value provided does not match
|
219
|
+
# the value known to the server, ABORTED will be thrown, and the client
|
220
|
+
# should retry the read-modify-write cycle.
|
221
|
+
class Settings
|
222
|
+
include ::Google::Protobuf::MessageExts
|
223
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
224
|
+
|
225
|
+
# @!attribute [rw] key
|
226
|
+
# @return [::String]
|
227
|
+
# @!attribute [rw] value
|
228
|
+
# @return [::Google::Cloud::AdvisoryNotifications::V1::NotificationSettings]
|
229
|
+
class NotificationSettingsEntry
|
230
|
+
include ::Google::Protobuf::MessageExts
|
231
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# Settings for each NotificationType.
|
236
|
+
# @!attribute [rw] enabled
|
237
|
+
# @return [::Boolean]
|
238
|
+
# Whether the associated NotificationType is enabled.
|
239
|
+
class NotificationSettings
|
240
|
+
include ::Google::Protobuf::MessageExts
|
241
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
242
|
+
end
|
243
|
+
|
244
|
+
# Request of GetSettings endpoint.
|
245
|
+
# @!attribute [rw] name
|
246
|
+
# @return [::String]
|
247
|
+
# Required. The resource name of the settings to retrieve.
|
248
|
+
# Format:
|
249
|
+
# organizations/\\{organization}/locations/\\{location}/settings.
|
250
|
+
class GetSettingsRequest
|
251
|
+
include ::Google::Protobuf::MessageExts
|
252
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
253
|
+
end
|
254
|
+
|
255
|
+
# Request of UpdateSettings endpoint.
|
256
|
+
# @!attribute [rw] settings
|
257
|
+
# @return [::Google::Cloud::AdvisoryNotifications::V1::Settings]
|
258
|
+
# Required. New settings.
|
259
|
+
class UpdateSettingsRequest
|
260
|
+
include ::Google::Protobuf::MessageExts
|
261
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
262
|
+
end
|
263
|
+
|
201
264
|
# Notification view.
|
202
265
|
module NotificationView
|
203
266
|
# Not specified, equivalent to BASIC.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-advisory_notifications-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 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-
|
11
|
+
date: 2023-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|