google-cloud-service_health-v1 0.a → 0.1.0

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