google-shopping-merchant-notifications-v1 0.a → 0.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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/shopping/merchant/notifications/v1/notifications_api_service/client.rb +971 -0
  6. data/lib/google/shopping/merchant/notifications/v1/notifications_api_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/notifications/v1/notifications_api_service/paths.rb +83 -0
  8. data/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/client.rb +903 -0
  9. data/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest/service_stub.rb +451 -0
  10. data/lib/google/shopping/merchant/notifications/v1/notifications_api_service/rest.rb +54 -0
  11. data/lib/google/shopping/merchant/notifications/v1/notifications_api_service.rb +57 -0
  12. data/lib/google/shopping/merchant/notifications/v1/notificationsapi_pb.rb +61 -0
  13. data/lib/google/shopping/merchant/notifications/v1/notificationsapi_services_pb.rb +81 -0
  14. data/lib/google/shopping/merchant/notifications/v1/rest.rb +39 -0
  15. data/lib/google/shopping/merchant/notifications/v1/version.rb +7 -2
  16. data/lib/google/shopping/merchant/notifications/v1.rb +47 -0
  17. data/lib/google-shopping-merchant-notifications-v1.rb +21 -0
  18. data/proto_docs/README.md +4 -0
  19. data/proto_docs/google/api/client.rb +473 -0
  20. data/proto_docs/google/api/field_behavior.rb +85 -0
  21. data/proto_docs/google/api/launch_stage.rb +71 -0
  22. data/proto_docs/google/api/resource.rb +227 -0
  23. data/proto_docs/google/protobuf/duration.rb +98 -0
  24. data/proto_docs/google/protobuf/empty.rb +34 -0
  25. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  26. data/proto_docs/google/shopping/merchant/notifications/v1/notificationsapi.rb +184 -0
  27. metadata +71 -9
@@ -0,0 +1,971 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/shopping/merchant/notifications/v1/notificationsapi_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Notifications
26
+ module V1
27
+ module NotificationsApiService
28
+ ##
29
+ # Client for the NotificationsApiService service.
30
+ #
31
+ # Service to manage notification subscriptions for merchants
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :notifications_api_service_stub
44
+
45
+ ##
46
+ # Configure the NotificationsApiService Client class.
47
+ #
48
+ # See {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all NotificationsApiService clients
54
+ # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Shopping", "Merchant", "Notifications", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.timeout = 60.0
75
+ default_config.retry_policy = {
76
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config
80
+ end
81
+ yield @configure if block_given?
82
+ @configure
83
+ end
84
+
85
+ ##
86
+ # Configure the NotificationsApiService Client instance.
87
+ #
88
+ # The configuration is set to the derived mode, meaning that values can be changed,
89
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
90
+ # should be made on {Client.configure}.
91
+ #
92
+ # See {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration}
93
+ # for a description of the configuration fields.
94
+ #
95
+ # @yield [config] Configure the Client client.
96
+ # @yieldparam config [Client::Configuration]
97
+ #
98
+ # @return [Client::Configuration]
99
+ #
100
+ def configure
101
+ yield @config if block_given?
102
+ @config
103
+ end
104
+
105
+ ##
106
+ # The effective universe domain
107
+ #
108
+ # @return [String]
109
+ #
110
+ def universe_domain
111
+ @notifications_api_service_stub.universe_domain
112
+ end
113
+
114
+ ##
115
+ # Create a new NotificationsApiService client object.
116
+ #
117
+ # @example
118
+ #
119
+ # # Create a client using the default configuration
120
+ # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new
121
+ #
122
+ # # Create a client using a custom configuration
123
+ # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config|
124
+ # config.timeout = 10.0
125
+ # end
126
+ #
127
+ # @yield [config] Configure the NotificationsApiService client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ def initialize
131
+ # These require statements are intentionally placed here to initialize
132
+ # the gRPC module only when it's required.
133
+ # See https://github.com/googleapis/toolkit/issues/446
134
+ require "gapic/grpc"
135
+ require "google/shopping/merchant/notifications/v1/notificationsapi_services_pb"
136
+
137
+ # Create the configuration object
138
+ @config = Configuration.new Client.configure
139
+
140
+ # Yield the configuration if needed
141
+ yield @config if block_given?
142
+
143
+ # Create credentials
144
+ credentials = @config.credentials
145
+ # Use self-signed JWT if the endpoint is unchanged from default,
146
+ # but only if the default endpoint does not have a region prefix.
147
+ enable_self_signed_jwt = @config.endpoint.nil? ||
148
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
149
+ !@config.endpoint.split(".").first.include?("-"))
150
+ credentials ||= Credentials.default scope: @config.scope,
151
+ enable_self_signed_jwt: enable_self_signed_jwt
152
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
153
+ credentials = Credentials.new credentials, scope: @config.scope
154
+ end
155
+ @quota_project_id = @config.quota_project
156
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
157
+
158
+ @notifications_api_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Stub,
160
+ credentials: credentials,
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ channel_args: @config.channel_args,
165
+ interceptors: @config.interceptors,
166
+ channel_pool_config: @config.channel_pool,
167
+ logger: @config.logger
168
+ )
169
+
170
+ @notifications_api_service_stub.stub_logger&.info do |entry|
171
+ entry.set_system_name
172
+ entry.set_service
173
+ entry.message = "Created client for #{entry.service}"
174
+ entry.set_credentials_fields credentials
175
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
176
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
177
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
178
+ end
179
+ end
180
+
181
+ ##
182
+ # The logger used for request/response debug logging.
183
+ #
184
+ # @return [Logger]
185
+ #
186
+ def logger
187
+ @notifications_api_service_stub.logger
188
+ end
189
+
190
+ # Service calls
191
+
192
+ ##
193
+ # Gets notification subscriptions for an account.
194
+ #
195
+ # @overload get_notification_subscription(request, options = nil)
196
+ # Pass arguments to `get_notification_subscription` via a request object, either of type
197
+ # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest} or an equivalent Hash.
198
+ #
199
+ # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest, ::Hash]
200
+ # A request object representing the call parameters. Required. To specify no
201
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
202
+ # @param options [::Gapic::CallOptions, ::Hash]
203
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
204
+ #
205
+ # @overload get_notification_subscription(name: nil)
206
+ # Pass arguments to `get_notification_subscription` via keyword arguments. Note that at
207
+ # least one keyword argument is required. To specify no parameters, or to keep all
208
+ # the default parameter values, pass an empty Hash as a request object (see above).
209
+ #
210
+ # @param name [::String]
211
+ # Required. The `name` of the notification subscription.
212
+ #
213
+ # @yield [response, operation] Access the result along with the RPC operation
214
+ # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription]
215
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
216
+ #
217
+ # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription]
218
+ #
219
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
220
+ #
221
+ # @example Basic example
222
+ # require "google/shopping/merchant/notifications/v1"
223
+ #
224
+ # # Create a client object. The client can be reused for multiple calls.
225
+ # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new
226
+ #
227
+ # # Create a request. To set request fields, pass in keyword arguments.
228
+ # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest.new
229
+ #
230
+ # # Call the get_notification_subscription method.
231
+ # result = client.get_notification_subscription request
232
+ #
233
+ # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.
234
+ # p result
235
+ #
236
+ def get_notification_subscription request, options = nil
237
+ raise ::ArgumentError, "request must be provided" if request.nil?
238
+
239
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionRequest
240
+
241
+ # Converts hash and nil to an options object
242
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
243
+
244
+ # Customize the options with defaults
245
+ metadata = @config.rpcs.get_notification_subscription.metadata.to_h
246
+
247
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
248
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
249
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
250
+ gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION
251
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
252
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
253
+
254
+ header_params = {}
255
+ if request.name
256
+ header_params["name"] = request.name
257
+ end
258
+
259
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
260
+ metadata[:"x-goog-request-params"] ||= request_params_header
261
+
262
+ options.apply_defaults timeout: @config.rpcs.get_notification_subscription.timeout,
263
+ metadata: metadata,
264
+ retry_policy: @config.rpcs.get_notification_subscription.retry_policy
265
+
266
+ options.apply_defaults timeout: @config.timeout,
267
+ metadata: @config.metadata,
268
+ retry_policy: @config.retry_policy
269
+
270
+ @notifications_api_service_stub.call_rpc :get_notification_subscription, request, options: options do |response, operation|
271
+ yield response, operation if block_given?
272
+ end
273
+ rescue ::GRPC::BadStatus => e
274
+ raise ::Google::Cloud::Error.from_error(e)
275
+ end
276
+
277
+ ##
278
+ # Creates a notification subscription for a business.
279
+ # For standalone or subaccounts accounts, the business can create a
280
+ # subscription for self. For MCAs, the business can create a
281
+ # subscription for all managed accounts or for a specific subaccount.
282
+ #
283
+ # We will allow the following types of notification subscriptions to exist
284
+ # together (per business as a subscriber per event type):
285
+ #
286
+ # 1. Subscription for all managed accounts + subscription for self.
287
+ #
288
+ # 2. Multiple "partial" subscriptions for managed accounts + subscription
289
+ # for self.
290
+ #
291
+ # we will not allow (per business as a subscriber per event type):
292
+ #
293
+ # 1. Multiple self subscriptions.
294
+ #
295
+ # 2. Multiple "all managed accounts" subscriptions.
296
+ #
297
+ # 3. "All managed accounts" subscription and partial subscriptions at the
298
+ # same time.
299
+ #
300
+ # 4. Multiple partial subscriptions for the same target account.
301
+ #
302
+ # @overload create_notification_subscription(request, options = nil)
303
+ # Pass arguments to `create_notification_subscription` via a request object, either of type
304
+ # {::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest} or an equivalent Hash.
305
+ #
306
+ # @param request [::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest, ::Hash]
307
+ # A request object representing the call parameters. Required. To specify no
308
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
309
+ # @param options [::Gapic::CallOptions, ::Hash]
310
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
311
+ #
312
+ # @overload create_notification_subscription(parent: nil, notification_subscription: nil)
313
+ # Pass arguments to `create_notification_subscription` via keyword arguments. Note that at
314
+ # least one keyword argument is required. To specify no parameters, or to keep all
315
+ # the default parameter values, pass an empty Hash as a request object (see above).
316
+ #
317
+ # @param parent [::String]
318
+ # Required. The merchant account that owns the new notification subscription.
319
+ # Format: `accounts/{account}`
320
+ # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash]
321
+ # Required. The notification subscription to create.
322
+ #
323
+ # @yield [response, operation] Access the result along with the RPC operation
324
+ # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription]
325
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
326
+ #
327
+ # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription]
328
+ #
329
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
330
+ #
331
+ # @example Basic example
332
+ # require "google/shopping/merchant/notifications/v1"
333
+ #
334
+ # # Create a client object. The client can be reused for multiple calls.
335
+ # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new
336
+ #
337
+ # # Create a request. To set request fields, pass in keyword arguments.
338
+ # request = Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest.new
339
+ #
340
+ # # Call the create_notification_subscription method.
341
+ # result = client.create_notification_subscription request
342
+ #
343
+ # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.
344
+ # p result
345
+ #
346
+ def create_notification_subscription request, options = nil
347
+ raise ::ArgumentError, "request must be provided" if request.nil?
348
+
349
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::CreateNotificationSubscriptionRequest
350
+
351
+ # Converts hash and nil to an options object
352
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
353
+
354
+ # Customize the options with defaults
355
+ metadata = @config.rpcs.create_notification_subscription.metadata.to_h
356
+
357
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
358
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
359
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
360
+ gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION
361
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
362
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
+
364
+ header_params = {}
365
+ if request.parent
366
+ header_params["parent"] = request.parent
367
+ end
368
+
369
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
370
+ metadata[:"x-goog-request-params"] ||= request_params_header
371
+
372
+ options.apply_defaults timeout: @config.rpcs.create_notification_subscription.timeout,
373
+ metadata: metadata,
374
+ retry_policy: @config.rpcs.create_notification_subscription.retry_policy
375
+
376
+ options.apply_defaults timeout: @config.timeout,
377
+ metadata: @config.metadata,
378
+ retry_policy: @config.retry_policy
379
+
380
+ @notifications_api_service_stub.call_rpc :create_notification_subscription, request, options: options do |response, operation|
381
+ yield response, operation if block_given?
382
+ end
383
+ rescue ::GRPC::BadStatus => e
384
+ raise ::Google::Cloud::Error.from_error(e)
385
+ end
386
+
387
+ ##
388
+ # Updates an existing notification subscription for a merchant.
389
+ #
390
+ # @overload update_notification_subscription(request, options = nil)
391
+ # Pass arguments to `update_notification_subscription` via a request object, either of type
392
+ # {::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest} or an equivalent Hash.
393
+ #
394
+ # @param request [::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest, ::Hash]
395
+ # A request object representing the call parameters. Required. To specify no
396
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
397
+ # @param options [::Gapic::CallOptions, ::Hash]
398
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
399
+ #
400
+ # @overload update_notification_subscription(notification_subscription: nil, update_mask: nil)
401
+ # Pass arguments to `update_notification_subscription` via keyword arguments. Note that at
402
+ # least one keyword argument is required. To specify no parameters, or to keep all
403
+ # the default parameter values, pass an empty Hash as a request object (see above).
404
+ #
405
+ # @param notification_subscription [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription, ::Hash]
406
+ # Required. The new version of the notification subscription that should be
407
+ # updated.
408
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
409
+ # List of fields being updated.
410
+ #
411
+ # @yield [response, operation] Access the result along with the RPC operation
412
+ # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription]
413
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
414
+ #
415
+ # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription]
416
+ #
417
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
418
+ #
419
+ # @example Basic example
420
+ # require "google/shopping/merchant/notifications/v1"
421
+ #
422
+ # # Create a client object. The client can be reused for multiple calls.
423
+ # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new
424
+ #
425
+ # # Create a request. To set request fields, pass in keyword arguments.
426
+ # request = Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest.new
427
+ #
428
+ # # Call the update_notification_subscription method.
429
+ # result = client.update_notification_subscription request
430
+ #
431
+ # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.
432
+ # p result
433
+ #
434
+ def update_notification_subscription request, options = nil
435
+ raise ::ArgumentError, "request must be provided" if request.nil?
436
+
437
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::UpdateNotificationSubscriptionRequest
438
+
439
+ # Converts hash and nil to an options object
440
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
441
+
442
+ # Customize the options with defaults
443
+ metadata = @config.rpcs.update_notification_subscription.metadata.to_h
444
+
445
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
446
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
447
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
448
+ gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION
449
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
450
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
451
+
452
+ header_params = {}
453
+ if request.notification_subscription&.name
454
+ header_params["notification_subscription.name"] = request.notification_subscription.name
455
+ end
456
+
457
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
458
+ metadata[:"x-goog-request-params"] ||= request_params_header
459
+
460
+ options.apply_defaults timeout: @config.rpcs.update_notification_subscription.timeout,
461
+ metadata: metadata,
462
+ retry_policy: @config.rpcs.update_notification_subscription.retry_policy
463
+
464
+ options.apply_defaults timeout: @config.timeout,
465
+ metadata: @config.metadata,
466
+ retry_policy: @config.retry_policy
467
+
468
+ @notifications_api_service_stub.call_rpc :update_notification_subscription, request, options: options do |response, operation|
469
+ yield response, operation if block_given?
470
+ end
471
+ rescue ::GRPC::BadStatus => e
472
+ raise ::Google::Cloud::Error.from_error(e)
473
+ end
474
+
475
+ ##
476
+ # Deletes a notification subscription for a merchant.
477
+ #
478
+ # @overload delete_notification_subscription(request, options = nil)
479
+ # Pass arguments to `delete_notification_subscription` via a request object, either of type
480
+ # {::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest} or an equivalent Hash.
481
+ #
482
+ # @param request [::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest, ::Hash]
483
+ # A request object representing the call parameters. Required. To specify no
484
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
485
+ # @param options [::Gapic::CallOptions, ::Hash]
486
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
487
+ #
488
+ # @overload delete_notification_subscription(name: nil)
489
+ # Pass arguments to `delete_notification_subscription` via keyword arguments. Note that at
490
+ # least one keyword argument is required. To specify no parameters, or to keep all
491
+ # the default parameter values, pass an empty Hash as a request object (see above).
492
+ #
493
+ # @param name [::String]
494
+ # Required. The name of the notification subscription to be deleted.
495
+ #
496
+ # @yield [response, operation] Access the result along with the RPC operation
497
+ # @yieldparam response [::Google::Protobuf::Empty]
498
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
499
+ #
500
+ # @return [::Google::Protobuf::Empty]
501
+ #
502
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
503
+ #
504
+ # @example Basic example
505
+ # require "google/shopping/merchant/notifications/v1"
506
+ #
507
+ # # Create a client object. The client can be reused for multiple calls.
508
+ # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new
509
+ #
510
+ # # Create a request. To set request fields, pass in keyword arguments.
511
+ # request = Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest.new
512
+ #
513
+ # # Call the delete_notification_subscription method.
514
+ # result = client.delete_notification_subscription request
515
+ #
516
+ # # The returned object is of type Google::Protobuf::Empty.
517
+ # p result
518
+ #
519
+ def delete_notification_subscription request, options = nil
520
+ raise ::ArgumentError, "request must be provided" if request.nil?
521
+
522
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::DeleteNotificationSubscriptionRequest
523
+
524
+ # Converts hash and nil to an options object
525
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
526
+
527
+ # Customize the options with defaults
528
+ metadata = @config.rpcs.delete_notification_subscription.metadata.to_h
529
+
530
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
531
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
532
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
533
+ gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION
534
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
535
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
536
+
537
+ header_params = {}
538
+ if request.name
539
+ header_params["name"] = request.name
540
+ end
541
+
542
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
543
+ metadata[:"x-goog-request-params"] ||= request_params_header
544
+
545
+ options.apply_defaults timeout: @config.rpcs.delete_notification_subscription.timeout,
546
+ metadata: metadata,
547
+ retry_policy: @config.rpcs.delete_notification_subscription.retry_policy
548
+
549
+ options.apply_defaults timeout: @config.timeout,
550
+ metadata: @config.metadata,
551
+ retry_policy: @config.retry_policy
552
+
553
+ @notifications_api_service_stub.call_rpc :delete_notification_subscription, request, options: options do |response, operation|
554
+ yield response, operation if block_given?
555
+ end
556
+ rescue ::GRPC::BadStatus => e
557
+ raise ::Google::Cloud::Error.from_error(e)
558
+ end
559
+
560
+ ##
561
+ # Gets all the notification subscriptions for a merchant.
562
+ #
563
+ # @overload list_notification_subscriptions(request, options = nil)
564
+ # Pass arguments to `list_notification_subscriptions` via a request object, either of type
565
+ # {::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest} or an equivalent Hash.
566
+ #
567
+ # @param request [::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest, ::Hash]
568
+ # A request object representing the call parameters. Required. To specify no
569
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
570
+ # @param options [::Gapic::CallOptions, ::Hash]
571
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
572
+ #
573
+ # @overload list_notification_subscriptions(parent: nil, page_size: nil, page_token: nil)
574
+ # Pass arguments to `list_notification_subscriptions` via keyword arguments. Note that at
575
+ # least one keyword argument is required. To specify no parameters, or to keep all
576
+ # the default parameter values, pass an empty Hash as a request object (see above).
577
+ #
578
+ # @param parent [::String]
579
+ # Required. The merchant account who owns the notification subscriptions.
580
+ # Format: `accounts/{account}`
581
+ # @param page_size [::Integer]
582
+ # The maximum number of notification subscriptions to return in a page.
583
+ # The default value for `page_size` is 100. The
584
+ # maximum value is `200`. Values above `200` will be coerced to `200`.
585
+ # @param page_token [::String]
586
+ # Token (if provided) to retrieve the subsequent page. All other parameters
587
+ # must match the original call that provided the page token.
588
+ #
589
+ # @yield [response, operation] Access the result along with the RPC operation
590
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>]
591
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
592
+ #
593
+ # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription>]
594
+ #
595
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
596
+ #
597
+ # @example Basic example
598
+ # require "google/shopping/merchant/notifications/v1"
599
+ #
600
+ # # Create a client object. The client can be reused for multiple calls.
601
+ # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new
602
+ #
603
+ # # Create a request. To set request fields, pass in keyword arguments.
604
+ # request = Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest.new
605
+ #
606
+ # # Call the list_notification_subscriptions method.
607
+ # result = client.list_notification_subscriptions request
608
+ #
609
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
610
+ # # over elements, and API calls will be issued to fetch pages as needed.
611
+ # result.each do |item|
612
+ # # Each element is of type ::Google::Shopping::Merchant::Notifications::V1::NotificationSubscription.
613
+ # p item
614
+ # end
615
+ #
616
+ def list_notification_subscriptions request, options = nil
617
+ raise ::ArgumentError, "request must be provided" if request.nil?
618
+
619
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::ListNotificationSubscriptionsRequest
620
+
621
+ # Converts hash and nil to an options object
622
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
623
+
624
+ # Customize the options with defaults
625
+ metadata = @config.rpcs.list_notification_subscriptions.metadata.to_h
626
+
627
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
628
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
629
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
630
+ gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION
631
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
632
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
633
+
634
+ header_params = {}
635
+ if request.parent
636
+ header_params["parent"] = request.parent
637
+ end
638
+
639
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
640
+ metadata[:"x-goog-request-params"] ||= request_params_header
641
+
642
+ options.apply_defaults timeout: @config.rpcs.list_notification_subscriptions.timeout,
643
+ metadata: metadata,
644
+ retry_policy: @config.rpcs.list_notification_subscriptions.retry_policy
645
+
646
+ options.apply_defaults timeout: @config.timeout,
647
+ metadata: @config.metadata,
648
+ retry_policy: @config.retry_policy
649
+
650
+ @notifications_api_service_stub.call_rpc :list_notification_subscriptions, request, options: options do |response, operation|
651
+ response = ::Gapic::PagedEnumerable.new @notifications_api_service_stub, :list_notification_subscriptions, request, response, operation, options
652
+ yield response, operation if block_given?
653
+ throw :response, response
654
+ end
655
+ rescue ::GRPC::BadStatus => e
656
+ raise ::Google::Cloud::Error.from_error(e)
657
+ end
658
+
659
+ ##
660
+ # Retrieves notification subscription health metrics for a merchant.
661
+ # We recommend calling this periodically (hourly or daily) to monitor health
662
+ # of your callback endpoint.
663
+ #
664
+ # @overload get_notification_subscription_health_metrics(request, options = nil)
665
+ # Pass arguments to `get_notification_subscription_health_metrics` via a request object, either of type
666
+ # {::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest} or an equivalent Hash.
667
+ #
668
+ # @param request [::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest, ::Hash]
669
+ # A request object representing the call parameters. Required. To specify no
670
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
671
+ # @param options [::Gapic::CallOptions, ::Hash]
672
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
673
+ #
674
+ # @overload get_notification_subscription_health_metrics(name: nil)
675
+ # Pass arguments to `get_notification_subscription_health_metrics` via keyword arguments. Note that at
676
+ # least one keyword argument is required. To specify no parameters, or to keep all
677
+ # the default parameter values, pass an empty Hash as a request object (see above).
678
+ #
679
+ # @param name [::String]
680
+ # Required. The `name` of the notification subscription for which metrics are
681
+ # retrieved.
682
+ # Format:
683
+ # `accounts/{account}/notificationsubscriptions/{notification_subscription}`
684
+ #
685
+ # @yield [response, operation] Access the result along with the RPC operation
686
+ # @yieldparam response [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics]
687
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
688
+ #
689
+ # @return [::Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics]
690
+ #
691
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
692
+ #
693
+ # @example Basic example
694
+ # require "google/shopping/merchant/notifications/v1"
695
+ #
696
+ # # Create a client object. The client can be reused for multiple calls.
697
+ # client = Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new
698
+ #
699
+ # # Create a request. To set request fields, pass in keyword arguments.
700
+ # request = Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest.new
701
+ #
702
+ # # Call the get_notification_subscription_health_metrics method.
703
+ # result = client.get_notification_subscription_health_metrics request
704
+ #
705
+ # # The returned object is of type Google::Shopping::Merchant::Notifications::V1::NotificationSubscriptionHealthMetrics.
706
+ # p result
707
+ #
708
+ def get_notification_subscription_health_metrics request, options = nil
709
+ raise ::ArgumentError, "request must be provided" if request.nil?
710
+
711
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Notifications::V1::GetNotificationSubscriptionHealthMetricsRequest
712
+
713
+ # Converts hash and nil to an options object
714
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
715
+
716
+ # Customize the options with defaults
717
+ metadata = @config.rpcs.get_notification_subscription_health_metrics.metadata.to_h
718
+
719
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
720
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
721
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
722
+ gapic_version: ::Google::Shopping::Merchant::Notifications::V1::VERSION
723
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
724
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
725
+
726
+ header_params = {}
727
+ if request.name
728
+ header_params["name"] = request.name
729
+ end
730
+
731
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
732
+ metadata[:"x-goog-request-params"] ||= request_params_header
733
+
734
+ options.apply_defaults timeout: @config.rpcs.get_notification_subscription_health_metrics.timeout,
735
+ metadata: metadata,
736
+ retry_policy: @config.rpcs.get_notification_subscription_health_metrics.retry_policy
737
+
738
+ options.apply_defaults timeout: @config.timeout,
739
+ metadata: @config.metadata,
740
+ retry_policy: @config.retry_policy
741
+
742
+ @notifications_api_service_stub.call_rpc :get_notification_subscription_health_metrics, request, options: options do |response, operation|
743
+ yield response, operation if block_given?
744
+ end
745
+ rescue ::GRPC::BadStatus => e
746
+ raise ::Google::Cloud::Error.from_error(e)
747
+ end
748
+
749
+ ##
750
+ # Configuration class for the NotificationsApiService API.
751
+ #
752
+ # This class represents the configuration for NotificationsApiService,
753
+ # providing control over timeouts, retry behavior, logging, transport
754
+ # parameters, and other low-level controls. Certain parameters can also be
755
+ # applied individually to specific RPCs. See
756
+ # {::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client::Configuration::Rpcs}
757
+ # for a list of RPCs that can be configured independently.
758
+ #
759
+ # Configuration can be applied globally to all clients, or to a single client
760
+ # on construction.
761
+ #
762
+ # @example
763
+ #
764
+ # # Modify the global config, setting the timeout for
765
+ # # get_notification_subscription to 20 seconds,
766
+ # # and all remaining timeouts to 10 seconds.
767
+ # ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.configure do |config|
768
+ # config.timeout = 10.0
769
+ # config.rpcs.get_notification_subscription.timeout = 20.0
770
+ # end
771
+ #
772
+ # # Apply the above configuration only to a new client.
773
+ # client = ::Google::Shopping::Merchant::Notifications::V1::NotificationsApiService::Client.new do |config|
774
+ # config.timeout = 10.0
775
+ # config.rpcs.get_notification_subscription.timeout = 20.0
776
+ # end
777
+ #
778
+ # @!attribute [rw] endpoint
779
+ # A custom service endpoint, as a hostname or hostname:port. The default is
780
+ # nil, indicating to use the default endpoint in the current universe domain.
781
+ # @return [::String,nil]
782
+ # @!attribute [rw] credentials
783
+ # Credentials to send with calls. You may provide any of the following types:
784
+ # * (`String`) The path to a service account key file in JSON format
785
+ # * (`Hash`) A service account key as a Hash
786
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
787
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
788
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
789
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
790
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
791
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
792
+ # * (`nil`) indicating no credentials
793
+ #
794
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
795
+ # external source for authentication to Google Cloud, you must validate it before
796
+ # providing it to a Google API client library. Providing an unvalidated credential
797
+ # configuration to Google APIs can compromise the security of your systems and data.
798
+ # For more information, refer to [Validate credential configurations from external
799
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
800
+ # @return [::Object]
801
+ # @!attribute [rw] scope
802
+ # The OAuth scopes
803
+ # @return [::Array<::String>]
804
+ # @!attribute [rw] lib_name
805
+ # The library name as recorded in instrumentation and logging
806
+ # @return [::String]
807
+ # @!attribute [rw] lib_version
808
+ # The library version as recorded in instrumentation and logging
809
+ # @return [::String]
810
+ # @!attribute [rw] channel_args
811
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
812
+ # `GRPC::Core::Channel` object is provided as the credential.
813
+ # @return [::Hash]
814
+ # @!attribute [rw] interceptors
815
+ # An array of interceptors that are run before calls are executed.
816
+ # @return [::Array<::GRPC::ClientInterceptor>]
817
+ # @!attribute [rw] timeout
818
+ # The call timeout in seconds.
819
+ # @return [::Numeric]
820
+ # @!attribute [rw] metadata
821
+ # Additional gRPC headers to be sent with the call.
822
+ # @return [::Hash{::Symbol=>::String}]
823
+ # @!attribute [rw] retry_policy
824
+ # The retry policy. The value is a hash with the following keys:
825
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
826
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
827
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
828
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
829
+ # trigger a retry.
830
+ # @return [::Hash]
831
+ # @!attribute [rw] quota_project
832
+ # A separate project against which to charge quota.
833
+ # @return [::String]
834
+ # @!attribute [rw] universe_domain
835
+ # The universe domain within which to make requests. This determines the
836
+ # default endpoint URL. The default value of nil uses the environment
837
+ # universe (usually the default "googleapis.com" universe).
838
+ # @return [::String,nil]
839
+ # @!attribute [rw] logger
840
+ # A custom logger to use for request/response debug logging, or the value
841
+ # `:default` (the default) to construct a default logger, or `nil` to
842
+ # explicitly disable logging.
843
+ # @return [::Logger,:default,nil]
844
+ #
845
+ class Configuration
846
+ extend ::Gapic::Config
847
+
848
+ # @private
849
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
850
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
851
+
852
+ config_attr :endpoint, nil, ::String, nil
853
+ config_attr :credentials, nil do |value|
854
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
855
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
856
+ allowed.any? { |klass| klass === value }
857
+ end
858
+ config_attr :scope, nil, ::String, ::Array, nil
859
+ config_attr :lib_name, nil, ::String, nil
860
+ config_attr :lib_version, nil, ::String, nil
861
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
862
+ config_attr :interceptors, nil, ::Array, nil
863
+ config_attr :timeout, nil, ::Numeric, nil
864
+ config_attr :metadata, nil, ::Hash, nil
865
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
866
+ config_attr :quota_project, nil, ::String, nil
867
+ config_attr :universe_domain, nil, ::String, nil
868
+ config_attr :logger, :default, ::Logger, nil, :default
869
+
870
+ # @private
871
+ def initialize parent_config = nil
872
+ @parent_config = parent_config unless parent_config.nil?
873
+
874
+ yield self if block_given?
875
+ end
876
+
877
+ ##
878
+ # Configurations for individual RPCs
879
+ # @return [Rpcs]
880
+ #
881
+ def rpcs
882
+ @rpcs ||= begin
883
+ parent_rpcs = nil
884
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
885
+ Rpcs.new parent_rpcs
886
+ end
887
+ end
888
+
889
+ ##
890
+ # Configuration for the channel pool
891
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
892
+ #
893
+ def channel_pool
894
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
895
+ end
896
+
897
+ ##
898
+ # Configuration RPC class for the NotificationsApiService API.
899
+ #
900
+ # Includes fields providing the configuration for each RPC in this service.
901
+ # Each configuration object is of type `Gapic::Config::Method` and includes
902
+ # the following configuration fields:
903
+ #
904
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
905
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
906
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
907
+ # include the following keys:
908
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
909
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
910
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
911
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
912
+ # trigger a retry.
913
+ #
914
+ class Rpcs
915
+ ##
916
+ # RPC-specific configuration for `get_notification_subscription`
917
+ # @return [::Gapic::Config::Method]
918
+ #
919
+ attr_reader :get_notification_subscription
920
+ ##
921
+ # RPC-specific configuration for `create_notification_subscription`
922
+ # @return [::Gapic::Config::Method]
923
+ #
924
+ attr_reader :create_notification_subscription
925
+ ##
926
+ # RPC-specific configuration for `update_notification_subscription`
927
+ # @return [::Gapic::Config::Method]
928
+ #
929
+ attr_reader :update_notification_subscription
930
+ ##
931
+ # RPC-specific configuration for `delete_notification_subscription`
932
+ # @return [::Gapic::Config::Method]
933
+ #
934
+ attr_reader :delete_notification_subscription
935
+ ##
936
+ # RPC-specific configuration for `list_notification_subscriptions`
937
+ # @return [::Gapic::Config::Method]
938
+ #
939
+ attr_reader :list_notification_subscriptions
940
+ ##
941
+ # RPC-specific configuration for `get_notification_subscription_health_metrics`
942
+ # @return [::Gapic::Config::Method]
943
+ #
944
+ attr_reader :get_notification_subscription_health_metrics
945
+
946
+ # @private
947
+ def initialize parent_rpcs = nil
948
+ get_notification_subscription_config = parent_rpcs.get_notification_subscription if parent_rpcs.respond_to? :get_notification_subscription
949
+ @get_notification_subscription = ::Gapic::Config::Method.new get_notification_subscription_config
950
+ create_notification_subscription_config = parent_rpcs.create_notification_subscription if parent_rpcs.respond_to? :create_notification_subscription
951
+ @create_notification_subscription = ::Gapic::Config::Method.new create_notification_subscription_config
952
+ update_notification_subscription_config = parent_rpcs.update_notification_subscription if parent_rpcs.respond_to? :update_notification_subscription
953
+ @update_notification_subscription = ::Gapic::Config::Method.new update_notification_subscription_config
954
+ delete_notification_subscription_config = parent_rpcs.delete_notification_subscription if parent_rpcs.respond_to? :delete_notification_subscription
955
+ @delete_notification_subscription = ::Gapic::Config::Method.new delete_notification_subscription_config
956
+ list_notification_subscriptions_config = parent_rpcs.list_notification_subscriptions if parent_rpcs.respond_to? :list_notification_subscriptions
957
+ @list_notification_subscriptions = ::Gapic::Config::Method.new list_notification_subscriptions_config
958
+ get_notification_subscription_health_metrics_config = parent_rpcs.get_notification_subscription_health_metrics if parent_rpcs.respond_to? :get_notification_subscription_health_metrics
959
+ @get_notification_subscription_health_metrics = ::Gapic::Config::Method.new get_notification_subscription_health_metrics_config
960
+
961
+ yield self if block_given?
962
+ end
963
+ end
964
+ end
965
+ end
966
+ end
967
+ end
968
+ end
969
+ end
970
+ end
971
+ end