google-apps-events-subscriptions-v1 0.a → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/apps/events/subscriptions/v1/rest.rb +39 -0
  6. data/lib/google/apps/events/subscriptions/v1/subscription_resource_pb.rb +57 -0
  7. data/lib/google/apps/events/subscriptions/v1/subscriptions_service/client.rb +1038 -0
  8. data/lib/google/apps/events/subscriptions/v1/subscriptions_service/credentials.rb +59 -0
  9. data/lib/google/apps/events/subscriptions/v1/subscriptions_service/operations.rb +811 -0
  10. data/lib/google/apps/events/subscriptions/v1/subscriptions_service/paths.rb +80 -0
  11. data/lib/google/apps/events/subscriptions/v1/subscriptions_service/rest/client.rb +986 -0
  12. data/lib/google/apps/events/subscriptions/v1/subscriptions_service/rest/operations.rb +904 -0
  13. data/lib/google/apps/events/subscriptions/v1/subscriptions_service/rest/service_stub.rb +424 -0
  14. data/lib/google/apps/events/subscriptions/v1/subscriptions_service/rest.rb +55 -0
  15. data/lib/google/apps/events/subscriptions/v1/subscriptions_service.rb +58 -0
  16. data/lib/google/apps/events/subscriptions/v1/subscriptions_service_pb.rb +65 -0
  17. data/lib/google/apps/events/subscriptions/v1/subscriptions_service_services_pb.rb +73 -0
  18. data/lib/google/apps/events/subscriptions/v1/version.rb +7 -2
  19. data/lib/google/apps/events/subscriptions/v1.rb +47 -0
  20. data/lib/google-apps-events-subscriptions-v1.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/client.rb +420 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/api/resource.rb +227 -0
  26. data/proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb +224 -0
  27. data/proto_docs/google/apps/events/subscriptions/v1/subscriptions_service.rb +211 -0
  28. data/proto_docs/google/longrunning/operations.rb +164 -0
  29. data/proto_docs/google/protobuf/any.rb +145 -0
  30. data/proto_docs/google/protobuf/duration.rb +98 -0
  31. data/proto_docs/google/protobuf/empty.rb +34 -0
  32. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  33. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  34. data/proto_docs/google/rpc/status.rb +48 -0
  35. metadata +77 -11
@@ -0,0 +1,986 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/apps/events/subscriptions/v1/subscriptions_service_pb"
21
+ require "google/apps/events/subscriptions/v1/subscriptions_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Apps
25
+ module Events
26
+ module Subscriptions
27
+ module V1
28
+ module SubscriptionsService
29
+ module Rest
30
+ ##
31
+ # REST client for the SubscriptionsService service.
32
+ #
33
+ # A service that manages subscriptions to Google Workspace events.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "workspaceevents.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :subscriptions_service_stub
46
+
47
+ ##
48
+ # Configure the SubscriptionsService Client class.
49
+ #
50
+ # See {::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all SubscriptionsService clients
56
+ # ::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Apps", "Events", "Subscriptions", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.rpcs.create_subscription.timeout = 60.0
77
+
78
+ default_config.rpcs.delete_subscription.timeout = 60.0
79
+
80
+ default_config.rpcs.get_subscription.timeout = 60.0
81
+ default_config.rpcs.get_subscription.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config.rpcs.list_subscriptions.timeout = 60.0
86
+ default_config.rpcs.list_subscriptions.retry_policy = {
87
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
88
+ }
89
+
90
+ default_config.rpcs.update_subscription.timeout = 60.0
91
+
92
+ default_config.rpcs.reactivate_subscription.timeout = 60.0
93
+
94
+ default_config
95
+ end
96
+ yield @configure if block_given?
97
+ @configure
98
+ end
99
+
100
+ ##
101
+ # Configure the SubscriptionsService Client instance.
102
+ #
103
+ # The configuration is set to the derived mode, meaning that values can be changed,
104
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
105
+ # should be made on {Client.configure}.
106
+ #
107
+ # See {::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client::Configuration}
108
+ # for a description of the configuration fields.
109
+ #
110
+ # @yield [config] Configure the Client client.
111
+ # @yieldparam config [Client::Configuration]
112
+ #
113
+ # @return [Client::Configuration]
114
+ #
115
+ def configure
116
+ yield @config if block_given?
117
+ @config
118
+ end
119
+
120
+ ##
121
+ # The effective universe domain
122
+ #
123
+ # @return [String]
124
+ #
125
+ def universe_domain
126
+ @subscriptions_service_stub.universe_domain
127
+ end
128
+
129
+ ##
130
+ # Create a new SubscriptionsService REST client object.
131
+ #
132
+ # @example
133
+ #
134
+ # # Create a client using the default configuration
135
+ # client = ::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new
136
+ #
137
+ # # Create a client using a custom configuration
138
+ # client = ::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new do |config|
139
+ # config.timeout = 10.0
140
+ # end
141
+ #
142
+ # @yield [config] Configure the SubscriptionsService client.
143
+ # @yieldparam config [Client::Configuration]
144
+ #
145
+ def initialize
146
+ # Create the configuration object
147
+ @config = Configuration.new Client.configure
148
+
149
+ # Yield the configuration if needed
150
+ yield @config if block_given?
151
+
152
+ # Create credentials
153
+ credentials = @config.credentials
154
+ # Use self-signed JWT if the endpoint is unchanged from default,
155
+ # but only if the default endpoint does not have a region prefix.
156
+ enable_self_signed_jwt = @config.endpoint.nil? ||
157
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
158
+ !@config.endpoint.split(".").first.include?("-"))
159
+ credentials ||= Credentials.default scope: @config.scope,
160
+ enable_self_signed_jwt: enable_self_signed_jwt
161
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
162
+ credentials = Credentials.new credentials, scope: @config.scope
163
+ end
164
+
165
+ @quota_project_id = @config.quota_project
166
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
167
+
168
+ @operations_client = ::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Operations.new do |config|
169
+ config.credentials = credentials
170
+ config.quota_project = @quota_project_id
171
+ config.endpoint = @config.endpoint
172
+ config.universe_domain = @config.universe_domain
173
+ end
174
+
175
+ @subscriptions_service_stub = ::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::ServiceStub.new(
176
+ endpoint: @config.endpoint,
177
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
178
+ universe_domain: @config.universe_domain,
179
+ credentials: credentials
180
+ )
181
+ end
182
+
183
+ ##
184
+ # Get the associated client for long-running operations.
185
+ #
186
+ # @return [::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Operations]
187
+ #
188
+ attr_reader :operations_client
189
+
190
+ # Service calls
191
+
192
+ ##
193
+ # Creates a Google Workspace subscription. To learn how to use this
194
+ # method, see [Create a Google Workspace
195
+ # subscription](https://developers.google.com/workspace/events/guides/create-subscription).
196
+ #
197
+ # @overload create_subscription(request, options = nil)
198
+ # Pass arguments to `create_subscription` via a request object, either of type
199
+ # {::Google::Apps::Events::Subscriptions::V1::CreateSubscriptionRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Apps::Events::Subscriptions::V1::CreateSubscriptionRequest, ::Hash]
202
+ # A request object representing the call parameters. Required. To specify no
203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
206
+ #
207
+ # @overload create_subscription(subscription: nil, validate_only: nil)
208
+ # Pass arguments to `create_subscription` via keyword arguments. Note that at
209
+ # least one keyword argument is required. To specify no parameters, or to keep all
210
+ # the default parameter values, pass an empty Hash as a request object (see above).
211
+ #
212
+ # @param subscription [::Google::Apps::Events::Subscriptions::V1::Subscription, ::Hash]
213
+ # Required. The subscription resource to create.
214
+ # @param validate_only [::Boolean]
215
+ # Optional. If set to `true`, validates and previews the request, but doesn't
216
+ # create the subscription.
217
+ # @yield [result, operation] Access the result along with the TransportOperation object
218
+ # @yieldparam result [::Gapic::Operation]
219
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
220
+ #
221
+ # @return [::Gapic::Operation]
222
+ #
223
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/apps/events/subscriptions/v1"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Apps::Events::Subscriptions::V1::CreateSubscriptionRequest.new
233
+ #
234
+ # # Call the create_subscription method.
235
+ # result = client.create_subscription request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
247
+ def create_subscription request, options = nil
248
+ raise ::ArgumentError, "request must be provided" if request.nil?
249
+
250
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1::CreateSubscriptionRequest
251
+
252
+ # Converts hash and nil to an options object
253
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
254
+
255
+ # Customize the options with defaults
256
+ call_metadata = @config.rpcs.create_subscription.metadata.to_h
257
+
258
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
259
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
260
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
261
+ gapic_version: ::Google::Apps::Events::Subscriptions::V1::VERSION,
262
+ transports_version_send: [:rest]
263
+
264
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
265
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
266
+
267
+ options.apply_defaults timeout: @config.rpcs.create_subscription.timeout,
268
+ metadata: call_metadata,
269
+ retry_policy: @config.rpcs.create_subscription.retry_policy
270
+
271
+ options.apply_defaults timeout: @config.timeout,
272
+ metadata: @config.metadata,
273
+ retry_policy: @config.retry_policy
274
+
275
+ @subscriptions_service_stub.create_subscription request, options do |result, operation|
276
+ result = ::Gapic::Operation.new result, @operations_client, options: options
277
+ yield result, operation if block_given?
278
+ return result
279
+ end
280
+ rescue ::Gapic::Rest::Error => e
281
+ raise ::Google::Cloud::Error.from_error(e)
282
+ end
283
+
284
+ ##
285
+ # Deletes a Google Workspace subscription.
286
+ # To learn how to use this method, see [Delete a Google Workspace
287
+ # subscription](https://developers.google.com/workspace/events/guides/delete-subscription).
288
+ #
289
+ # @overload delete_subscription(request, options = nil)
290
+ # Pass arguments to `delete_subscription` via a request object, either of type
291
+ # {::Google::Apps::Events::Subscriptions::V1::DeleteSubscriptionRequest} or an equivalent Hash.
292
+ #
293
+ # @param request [::Google::Apps::Events::Subscriptions::V1::DeleteSubscriptionRequest, ::Hash]
294
+ # A request object representing the call parameters. Required. To specify no
295
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
296
+ # @param options [::Gapic::CallOptions, ::Hash]
297
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
298
+ #
299
+ # @overload delete_subscription(name: nil, validate_only: nil, allow_missing: nil, etag: nil)
300
+ # Pass arguments to `delete_subscription` via keyword arguments. Note that at
301
+ # least one keyword argument is required. To specify no parameters, or to keep all
302
+ # the default parameter values, pass an empty Hash as a request object (see above).
303
+ #
304
+ # @param name [::String]
305
+ # Required. Resource name of the subscription to delete.
306
+ #
307
+ # Format: `subscriptions/{subscription}`
308
+ # @param validate_only [::Boolean]
309
+ # Optional. If set to `true`, validates and previews the request, but doesn't
310
+ # delete the subscription.
311
+ # @param allow_missing [::Boolean]
312
+ # Optional. If set to `true` and the subscription isn't found, the request
313
+ # succeeds but doesn't delete the subscription.
314
+ # @param etag [::String]
315
+ # Optional. Etag of the subscription.
316
+ #
317
+ # If present, it must match with the server's etag. Otherwise, request
318
+ # fails with the status `ABORTED`.
319
+ # @yield [result, operation] Access the result along with the TransportOperation object
320
+ # @yieldparam result [::Gapic::Operation]
321
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
322
+ #
323
+ # @return [::Gapic::Operation]
324
+ #
325
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
326
+ #
327
+ # @example Basic example
328
+ # require "google/apps/events/subscriptions/v1"
329
+ #
330
+ # # Create a client object. The client can be reused for multiple calls.
331
+ # client = Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new
332
+ #
333
+ # # Create a request. To set request fields, pass in keyword arguments.
334
+ # request = Google::Apps::Events::Subscriptions::V1::DeleteSubscriptionRequest.new
335
+ #
336
+ # # Call the delete_subscription method.
337
+ # result = client.delete_subscription request
338
+ #
339
+ # # The returned object is of type Gapic::Operation. You can use it to
340
+ # # check the status of an operation, cancel it, or wait for results.
341
+ # # Here is how to wait for a response.
342
+ # result.wait_until_done! timeout: 60
343
+ # if result.response?
344
+ # p result.response
345
+ # else
346
+ # puts "No response received."
347
+ # end
348
+ #
349
+ def delete_subscription request, options = nil
350
+ raise ::ArgumentError, "request must be provided" if request.nil?
351
+
352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1::DeleteSubscriptionRequest
353
+
354
+ # Converts hash and nil to an options object
355
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
356
+
357
+ # Customize the options with defaults
358
+ call_metadata = @config.rpcs.delete_subscription.metadata.to_h
359
+
360
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
361
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
362
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
363
+ gapic_version: ::Google::Apps::Events::Subscriptions::V1::VERSION,
364
+ transports_version_send: [:rest]
365
+
366
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
367
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
368
+
369
+ options.apply_defaults timeout: @config.rpcs.delete_subscription.timeout,
370
+ metadata: call_metadata,
371
+ retry_policy: @config.rpcs.delete_subscription.retry_policy
372
+
373
+ options.apply_defaults timeout: @config.timeout,
374
+ metadata: @config.metadata,
375
+ retry_policy: @config.retry_policy
376
+
377
+ @subscriptions_service_stub.delete_subscription request, options do |result, operation|
378
+ result = ::Gapic::Operation.new result, @operations_client, options: options
379
+ yield result, operation if block_given?
380
+ return result
381
+ end
382
+ rescue ::Gapic::Rest::Error => e
383
+ raise ::Google::Cloud::Error.from_error(e)
384
+ end
385
+
386
+ ##
387
+ # Gets details about a Google Workspace subscription. To learn how to use
388
+ # this method, see [Get details about a Google Workspace
389
+ # subscription](https://developers.google.com/workspace/events/guides/get-subscription).
390
+ #
391
+ # @overload get_subscription(request, options = nil)
392
+ # Pass arguments to `get_subscription` via a request object, either of type
393
+ # {::Google::Apps::Events::Subscriptions::V1::GetSubscriptionRequest} or an equivalent Hash.
394
+ #
395
+ # @param request [::Google::Apps::Events::Subscriptions::V1::GetSubscriptionRequest, ::Hash]
396
+ # A request object representing the call parameters. Required. To specify no
397
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
398
+ # @param options [::Gapic::CallOptions, ::Hash]
399
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
400
+ #
401
+ # @overload get_subscription(name: nil)
402
+ # Pass arguments to `get_subscription` via keyword arguments. Note that at
403
+ # least one keyword argument is required. To specify no parameters, or to keep all
404
+ # the default parameter values, pass an empty Hash as a request object (see above).
405
+ #
406
+ # @param name [::String]
407
+ # Required. Resource name of the subscription.
408
+ #
409
+ # Format: `subscriptions/{subscription}`
410
+ # @yield [result, operation] Access the result along with the TransportOperation object
411
+ # @yieldparam result [::Google::Apps::Events::Subscriptions::V1::Subscription]
412
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
413
+ #
414
+ # @return [::Google::Apps::Events::Subscriptions::V1::Subscription]
415
+ #
416
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
417
+ #
418
+ # @example Basic example
419
+ # require "google/apps/events/subscriptions/v1"
420
+ #
421
+ # # Create a client object. The client can be reused for multiple calls.
422
+ # client = Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new
423
+ #
424
+ # # Create a request. To set request fields, pass in keyword arguments.
425
+ # request = Google::Apps::Events::Subscriptions::V1::GetSubscriptionRequest.new
426
+ #
427
+ # # Call the get_subscription method.
428
+ # result = client.get_subscription request
429
+ #
430
+ # # The returned object is of type Google::Apps::Events::Subscriptions::V1::Subscription.
431
+ # p result
432
+ #
433
+ def get_subscription request, options = nil
434
+ raise ::ArgumentError, "request must be provided" if request.nil?
435
+
436
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1::GetSubscriptionRequest
437
+
438
+ # Converts hash and nil to an options object
439
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
440
+
441
+ # Customize the options with defaults
442
+ call_metadata = @config.rpcs.get_subscription.metadata.to_h
443
+
444
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
445
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
446
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
447
+ gapic_version: ::Google::Apps::Events::Subscriptions::V1::VERSION,
448
+ transports_version_send: [:rest]
449
+
450
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
451
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
452
+
453
+ options.apply_defaults timeout: @config.rpcs.get_subscription.timeout,
454
+ metadata: call_metadata,
455
+ retry_policy: @config.rpcs.get_subscription.retry_policy
456
+
457
+ options.apply_defaults timeout: @config.timeout,
458
+ metadata: @config.metadata,
459
+ retry_policy: @config.retry_policy
460
+
461
+ @subscriptions_service_stub.get_subscription request, options do |result, operation|
462
+ yield result, operation if block_given?
463
+ return result
464
+ end
465
+ rescue ::Gapic::Rest::Error => e
466
+ raise ::Google::Cloud::Error.from_error(e)
467
+ end
468
+
469
+ ##
470
+ # Lists Google Workspace subscriptions. To learn how to use this method, see
471
+ # [List Google Workspace
472
+ # subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).
473
+ #
474
+ # @overload list_subscriptions(request, options = nil)
475
+ # Pass arguments to `list_subscriptions` via a request object, either of type
476
+ # {::Google::Apps::Events::Subscriptions::V1::ListSubscriptionsRequest} or an equivalent Hash.
477
+ #
478
+ # @param request [::Google::Apps::Events::Subscriptions::V1::ListSubscriptionsRequest, ::Hash]
479
+ # A request object representing the call parameters. Required. To specify no
480
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
481
+ # @param options [::Gapic::CallOptions, ::Hash]
482
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
483
+ #
484
+ # @overload list_subscriptions(page_size: nil, page_token: nil, filter: nil)
485
+ # Pass arguments to `list_subscriptions` via keyword arguments. Note that at
486
+ # least one keyword argument is required. To specify no parameters, or to keep all
487
+ # the default parameter values, pass an empty Hash as a request object (see above).
488
+ #
489
+ # @param page_size [::Integer]
490
+ # Optional. The maximum number of subscriptions to return. The service might
491
+ # return fewer than this value.
492
+ #
493
+ # If unspecified or set to `0`, up to 50 subscriptions are returned.
494
+ #
495
+ # The maximum value is 100. If you specify a value more than 100, the system
496
+ # only returns 100 subscriptions.
497
+ # @param page_token [::String]
498
+ # Optional. A page token, received from a previous list subscriptions call.
499
+ # Provide this parameter to retrieve the subsequent page.
500
+ #
501
+ # When paginating, the filter value should match the call that provided the
502
+ # page token. Passing a different value might lead to unexpected results.
503
+ # @param filter [::String]
504
+ # Required. A query filter.
505
+ #
506
+ # You can filter subscriptions by event type (`event_types`)
507
+ # and target resource (`target_resource`).
508
+ #
509
+ # You must specify at least one event type in your query. To filter for
510
+ # multiple event types, use the `OR` operator.
511
+ #
512
+ # To filter by both event type and target resource, use the `AND` operator
513
+ # and specify the full resource name, such as
514
+ # `//chat.googleapis.com/spaces/{space}`.
515
+ #
516
+ # For example, the following queries are valid:
517
+ #
518
+ # ```
519
+ # event_types:"google.workspace.chat.membership.v1.updated" OR
520
+ # event_types:"google.workspace.chat.message.v1.created"
521
+ #
522
+ # event_types:"google.workspace.chat.message.v1.created" AND
523
+ # target_resource="//chat.googleapis.com/spaces/\\{space}"
524
+ #
525
+ # ( event_types:"google.workspace.chat.membership.v1.updated" OR
526
+ # event_types:"google.workspace.chat.message.v1.created" ) AND
527
+ # target_resource="//chat.googleapis.com/spaces/\\{space}"
528
+ # ```
529
+ #
530
+ # The server rejects invalid queries with an `INVALID_ARGUMENT`
531
+ # error.
532
+ # @yield [result, operation] Access the result along with the TransportOperation object
533
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Events::Subscriptions::V1::Subscription>]
534
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
535
+ #
536
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Apps::Events::Subscriptions::V1::Subscription>]
537
+ #
538
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
539
+ #
540
+ # @example Basic example
541
+ # require "google/apps/events/subscriptions/v1"
542
+ #
543
+ # # Create a client object. The client can be reused for multiple calls.
544
+ # client = Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new
545
+ #
546
+ # # Create a request. To set request fields, pass in keyword arguments.
547
+ # request = Google::Apps::Events::Subscriptions::V1::ListSubscriptionsRequest.new
548
+ #
549
+ # # Call the list_subscriptions method.
550
+ # result = client.list_subscriptions request
551
+ #
552
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
553
+ # # over elements, and API calls will be issued to fetch pages as needed.
554
+ # result.each do |item|
555
+ # # Each element is of type ::Google::Apps::Events::Subscriptions::V1::Subscription.
556
+ # p item
557
+ # end
558
+ #
559
+ def list_subscriptions request, options = nil
560
+ raise ::ArgumentError, "request must be provided" if request.nil?
561
+
562
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1::ListSubscriptionsRequest
563
+
564
+ # Converts hash and nil to an options object
565
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
566
+
567
+ # Customize the options with defaults
568
+ call_metadata = @config.rpcs.list_subscriptions.metadata.to_h
569
+
570
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
571
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
572
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
573
+ gapic_version: ::Google::Apps::Events::Subscriptions::V1::VERSION,
574
+ transports_version_send: [:rest]
575
+
576
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
577
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
578
+
579
+ options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout,
580
+ metadata: call_metadata,
581
+ retry_policy: @config.rpcs.list_subscriptions.retry_policy
582
+
583
+ options.apply_defaults timeout: @config.timeout,
584
+ metadata: @config.metadata,
585
+ retry_policy: @config.retry_policy
586
+
587
+ @subscriptions_service_stub.list_subscriptions request, options do |result, operation|
588
+ result = ::Gapic::Rest::PagedEnumerable.new @subscriptions_service_stub, :list_subscriptions, "subscriptions", request, result, options
589
+ yield result, operation if block_given?
590
+ return result
591
+ end
592
+ rescue ::Gapic::Rest::Error => e
593
+ raise ::Google::Cloud::Error.from_error(e)
594
+ end
595
+
596
+ ##
597
+ # Updates or renews a Google Workspace subscription. To learn how to use this
598
+ # method, see [Update or renew a Google Workspace
599
+ # subscription](https://developers.google.com/workspace/events/guides/update-subscription).
600
+ #
601
+ # @overload update_subscription(request, options = nil)
602
+ # Pass arguments to `update_subscription` via a request object, either of type
603
+ # {::Google::Apps::Events::Subscriptions::V1::UpdateSubscriptionRequest} or an equivalent Hash.
604
+ #
605
+ # @param request [::Google::Apps::Events::Subscriptions::V1::UpdateSubscriptionRequest, ::Hash]
606
+ # A request object representing the call parameters. Required. To specify no
607
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
608
+ # @param options [::Gapic::CallOptions, ::Hash]
609
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
610
+ #
611
+ # @overload update_subscription(subscription: nil, update_mask: nil, validate_only: nil)
612
+ # Pass arguments to `update_subscription` via keyword arguments. Note that at
613
+ # least one keyword argument is required. To specify no parameters, or to keep all
614
+ # the default parameter values, pass an empty Hash as a request object (see above).
615
+ #
616
+ # @param subscription [::Google::Apps::Events::Subscriptions::V1::Subscription, ::Hash]
617
+ # Required. The subscription to update.
618
+ #
619
+ # The subscription's `name` field is used to identify the subscription to
620
+ # update.
621
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
622
+ # Optional. Required. The field to update.
623
+ #
624
+ # You can update one of the following fields in a subscription:
625
+ #
626
+ # * {::Google::Apps::Events::Subscriptions::V1::Subscription#expire_time `expire_time`}: The timestamp when the
627
+ # subscription expires.
628
+ # * {::Google::Apps::Events::Subscriptions::V1::Subscription#ttl `ttl`}: The
629
+ # time-to-live (TTL) or duration of the
630
+ # subscription.
631
+ # @param validate_only [::Boolean]
632
+ # Optional. If set to `true`, validates and previews the request, but doesn't
633
+ # update the subscription.
634
+ # @yield [result, operation] Access the result along with the TransportOperation object
635
+ # @yieldparam result [::Gapic::Operation]
636
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
637
+ #
638
+ # @return [::Gapic::Operation]
639
+ #
640
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
641
+ #
642
+ # @example Basic example
643
+ # require "google/apps/events/subscriptions/v1"
644
+ #
645
+ # # Create a client object. The client can be reused for multiple calls.
646
+ # client = Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new
647
+ #
648
+ # # Create a request. To set request fields, pass in keyword arguments.
649
+ # request = Google::Apps::Events::Subscriptions::V1::UpdateSubscriptionRequest.new
650
+ #
651
+ # # Call the update_subscription method.
652
+ # result = client.update_subscription request
653
+ #
654
+ # # The returned object is of type Gapic::Operation. You can use it to
655
+ # # check the status of an operation, cancel it, or wait for results.
656
+ # # Here is how to wait for a response.
657
+ # result.wait_until_done! timeout: 60
658
+ # if result.response?
659
+ # p result.response
660
+ # else
661
+ # puts "No response received."
662
+ # end
663
+ #
664
+ def update_subscription request, options = nil
665
+ raise ::ArgumentError, "request must be provided" if request.nil?
666
+
667
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1::UpdateSubscriptionRequest
668
+
669
+ # Converts hash and nil to an options object
670
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
671
+
672
+ # Customize the options with defaults
673
+ call_metadata = @config.rpcs.update_subscription.metadata.to_h
674
+
675
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
676
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
677
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
678
+ gapic_version: ::Google::Apps::Events::Subscriptions::V1::VERSION,
679
+ transports_version_send: [:rest]
680
+
681
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
682
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
683
+
684
+ options.apply_defaults timeout: @config.rpcs.update_subscription.timeout,
685
+ metadata: call_metadata,
686
+ retry_policy: @config.rpcs.update_subscription.retry_policy
687
+
688
+ options.apply_defaults timeout: @config.timeout,
689
+ metadata: @config.metadata,
690
+ retry_policy: @config.retry_policy
691
+
692
+ @subscriptions_service_stub.update_subscription request, options do |result, operation|
693
+ result = ::Gapic::Operation.new result, @operations_client, options: options
694
+ yield result, operation if block_given?
695
+ return result
696
+ end
697
+ rescue ::Gapic::Rest::Error => e
698
+ raise ::Google::Cloud::Error.from_error(e)
699
+ end
700
+
701
+ ##
702
+ # Reactivates a suspended Google Workspace subscription.
703
+ #
704
+ # This method resets your subscription's `State` field to `ACTIVE`. Before
705
+ # you use this method, you must fix the error that suspended the
706
+ # subscription. To learn how to use this method, see [Reactivate a Google
707
+ # Workspace
708
+ # subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription).
709
+ #
710
+ # @overload reactivate_subscription(request, options = nil)
711
+ # Pass arguments to `reactivate_subscription` via a request object, either of type
712
+ # {::Google::Apps::Events::Subscriptions::V1::ReactivateSubscriptionRequest} or an equivalent Hash.
713
+ #
714
+ # @param request [::Google::Apps::Events::Subscriptions::V1::ReactivateSubscriptionRequest, ::Hash]
715
+ # A request object representing the call parameters. Required. To specify no
716
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
717
+ # @param options [::Gapic::CallOptions, ::Hash]
718
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
719
+ #
720
+ # @overload reactivate_subscription(name: nil)
721
+ # Pass arguments to `reactivate_subscription` via keyword arguments. Note that at
722
+ # least one keyword argument is required. To specify no parameters, or to keep all
723
+ # the default parameter values, pass an empty Hash as a request object (see above).
724
+ #
725
+ # @param name [::String]
726
+ # Required. Resource name of the subscription.
727
+ #
728
+ # Format: `subscriptions/{subscription}`
729
+ # @yield [result, operation] Access the result along with the TransportOperation object
730
+ # @yieldparam result [::Gapic::Operation]
731
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
732
+ #
733
+ # @return [::Gapic::Operation]
734
+ #
735
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
736
+ #
737
+ # @example Basic example
738
+ # require "google/apps/events/subscriptions/v1"
739
+ #
740
+ # # Create a client object. The client can be reused for multiple calls.
741
+ # client = Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new
742
+ #
743
+ # # Create a request. To set request fields, pass in keyword arguments.
744
+ # request = Google::Apps::Events::Subscriptions::V1::ReactivateSubscriptionRequest.new
745
+ #
746
+ # # Call the reactivate_subscription method.
747
+ # result = client.reactivate_subscription request
748
+ #
749
+ # # The returned object is of type Gapic::Operation. You can use it to
750
+ # # check the status of an operation, cancel it, or wait for results.
751
+ # # Here is how to wait for a response.
752
+ # result.wait_until_done! timeout: 60
753
+ # if result.response?
754
+ # p result.response
755
+ # else
756
+ # puts "No response received."
757
+ # end
758
+ #
759
+ def reactivate_subscription request, options = nil
760
+ raise ::ArgumentError, "request must be provided" if request.nil?
761
+
762
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Events::Subscriptions::V1::ReactivateSubscriptionRequest
763
+
764
+ # Converts hash and nil to an options object
765
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
766
+
767
+ # Customize the options with defaults
768
+ call_metadata = @config.rpcs.reactivate_subscription.metadata.to_h
769
+
770
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
771
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
772
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
773
+ gapic_version: ::Google::Apps::Events::Subscriptions::V1::VERSION,
774
+ transports_version_send: [:rest]
775
+
776
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
777
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
778
+
779
+ options.apply_defaults timeout: @config.rpcs.reactivate_subscription.timeout,
780
+ metadata: call_metadata,
781
+ retry_policy: @config.rpcs.reactivate_subscription.retry_policy
782
+
783
+ options.apply_defaults timeout: @config.timeout,
784
+ metadata: @config.metadata,
785
+ retry_policy: @config.retry_policy
786
+
787
+ @subscriptions_service_stub.reactivate_subscription request, options do |result, operation|
788
+ result = ::Gapic::Operation.new result, @operations_client, options: options
789
+ yield result, operation if block_given?
790
+ return result
791
+ end
792
+ rescue ::Gapic::Rest::Error => e
793
+ raise ::Google::Cloud::Error.from_error(e)
794
+ end
795
+
796
+ ##
797
+ # Configuration class for the SubscriptionsService REST API.
798
+ #
799
+ # This class represents the configuration for SubscriptionsService REST,
800
+ # providing control over timeouts, retry behavior, logging, transport
801
+ # parameters, and other low-level controls. Certain parameters can also be
802
+ # applied individually to specific RPCs. See
803
+ # {::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client::Configuration::Rpcs}
804
+ # for a list of RPCs that can be configured independently.
805
+ #
806
+ # Configuration can be applied globally to all clients, or to a single client
807
+ # on construction.
808
+ #
809
+ # @example
810
+ #
811
+ # # Modify the global config, setting the timeout for
812
+ # # create_subscription to 20 seconds,
813
+ # # and all remaining timeouts to 10 seconds.
814
+ # ::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.configure do |config|
815
+ # config.timeout = 10.0
816
+ # config.rpcs.create_subscription.timeout = 20.0
817
+ # end
818
+ #
819
+ # # Apply the above configuration only to a new client.
820
+ # client = ::Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Rest::Client.new do |config|
821
+ # config.timeout = 10.0
822
+ # config.rpcs.create_subscription.timeout = 20.0
823
+ # end
824
+ #
825
+ # @!attribute [rw] endpoint
826
+ # A custom service endpoint, as a hostname or hostname:port. The default is
827
+ # nil, indicating to use the default endpoint in the current universe domain.
828
+ # @return [::String,nil]
829
+ # @!attribute [rw] credentials
830
+ # Credentials to send with calls. You may provide any of the following types:
831
+ # * (`String`) The path to a service account key file in JSON format
832
+ # * (`Hash`) A service account key as a Hash
833
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
834
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
835
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
836
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
837
+ # * (`nil`) indicating no credentials
838
+ # @return [::Object]
839
+ # @!attribute [rw] scope
840
+ # The OAuth scopes
841
+ # @return [::Array<::String>]
842
+ # @!attribute [rw] lib_name
843
+ # The library name as recorded in instrumentation and logging
844
+ # @return [::String]
845
+ # @!attribute [rw] lib_version
846
+ # The library version as recorded in instrumentation and logging
847
+ # @return [::String]
848
+ # @!attribute [rw] timeout
849
+ # The call timeout in seconds.
850
+ # @return [::Numeric]
851
+ # @!attribute [rw] metadata
852
+ # Additional headers to be sent with the call.
853
+ # @return [::Hash{::Symbol=>::String}]
854
+ # @!attribute [rw] retry_policy
855
+ # The retry policy. The value is a hash with the following keys:
856
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
857
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
858
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
859
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
860
+ # trigger a retry.
861
+ # @return [::Hash]
862
+ # @!attribute [rw] quota_project
863
+ # A separate project against which to charge quota.
864
+ # @return [::String]
865
+ # @!attribute [rw] universe_domain
866
+ # The universe domain within which to make requests. This determines the
867
+ # default endpoint URL. The default value of nil uses the environment
868
+ # universe (usually the default "googleapis.com" universe).
869
+ # @return [::String,nil]
870
+ #
871
+ class Configuration
872
+ extend ::Gapic::Config
873
+
874
+ # @private
875
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
876
+ DEFAULT_ENDPOINT = "workspaceevents.googleapis.com"
877
+
878
+ config_attr :endpoint, nil, ::String, nil
879
+ config_attr :credentials, nil do |value|
880
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
881
+ allowed.any? { |klass| klass === value }
882
+ end
883
+ config_attr :scope, nil, ::String, ::Array, nil
884
+ config_attr :lib_name, nil, ::String, nil
885
+ config_attr :lib_version, nil, ::String, nil
886
+ config_attr :timeout, nil, ::Numeric, nil
887
+ config_attr :metadata, nil, ::Hash, nil
888
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
889
+ config_attr :quota_project, nil, ::String, nil
890
+ config_attr :universe_domain, nil, ::String, nil
891
+
892
+ # @private
893
+ def initialize parent_config = nil
894
+ @parent_config = parent_config unless parent_config.nil?
895
+
896
+ yield self if block_given?
897
+ end
898
+
899
+ ##
900
+ # Configurations for individual RPCs
901
+ # @return [Rpcs]
902
+ #
903
+ def rpcs
904
+ @rpcs ||= begin
905
+ parent_rpcs = nil
906
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
907
+ Rpcs.new parent_rpcs
908
+ end
909
+ end
910
+
911
+ ##
912
+ # Configuration RPC class for the SubscriptionsService API.
913
+ #
914
+ # Includes fields providing the configuration for each RPC in this service.
915
+ # Each configuration object is of type `Gapic::Config::Method` and includes
916
+ # the following configuration fields:
917
+ #
918
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
919
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
920
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
921
+ # include the following keys:
922
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
923
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
924
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
925
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
926
+ # trigger a retry.
927
+ #
928
+ class Rpcs
929
+ ##
930
+ # RPC-specific configuration for `create_subscription`
931
+ # @return [::Gapic::Config::Method]
932
+ #
933
+ attr_reader :create_subscription
934
+ ##
935
+ # RPC-specific configuration for `delete_subscription`
936
+ # @return [::Gapic::Config::Method]
937
+ #
938
+ attr_reader :delete_subscription
939
+ ##
940
+ # RPC-specific configuration for `get_subscription`
941
+ # @return [::Gapic::Config::Method]
942
+ #
943
+ attr_reader :get_subscription
944
+ ##
945
+ # RPC-specific configuration for `list_subscriptions`
946
+ # @return [::Gapic::Config::Method]
947
+ #
948
+ attr_reader :list_subscriptions
949
+ ##
950
+ # RPC-specific configuration for `update_subscription`
951
+ # @return [::Gapic::Config::Method]
952
+ #
953
+ attr_reader :update_subscription
954
+ ##
955
+ # RPC-specific configuration for `reactivate_subscription`
956
+ # @return [::Gapic::Config::Method]
957
+ #
958
+ attr_reader :reactivate_subscription
959
+
960
+ # @private
961
+ def initialize parent_rpcs = nil
962
+ create_subscription_config = parent_rpcs.create_subscription if parent_rpcs.respond_to? :create_subscription
963
+ @create_subscription = ::Gapic::Config::Method.new create_subscription_config
964
+ delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription
965
+ @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config
966
+ get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription
967
+ @get_subscription = ::Gapic::Config::Method.new get_subscription_config
968
+ list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions
969
+ @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config
970
+ update_subscription_config = parent_rpcs.update_subscription if parent_rpcs.respond_to? :update_subscription
971
+ @update_subscription = ::Gapic::Config::Method.new update_subscription_config
972
+ reactivate_subscription_config = parent_rpcs.reactivate_subscription if parent_rpcs.respond_to? :reactivate_subscription
973
+ @reactivate_subscription = ::Gapic::Config::Method.new reactivate_subscription_config
974
+
975
+ yield self if block_given?
976
+ end
977
+ end
978
+ end
979
+ end
980
+ end
981
+ end
982
+ end
983
+ end
984
+ end
985
+ end
986
+ end