google-cloud-security_center-v1 0.25.1 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/security_center/v1/rest.rb +37 -0
  4. data/lib/google/cloud/security_center/v1/security_center/client.rb +907 -82
  5. data/lib/google/cloud/security_center/v1/security_center/operations.rb +14 -16
  6. data/lib/google/cloud/security_center/v1/security_center/paths.rb +147 -0
  7. data/lib/google/cloud/security_center/v1/security_center/rest/client.rb +4259 -0
  8. data/lib/google/cloud/security_center/v1/security_center/rest/operations.rb +792 -0
  9. data/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb +3200 -0
  10. data/lib/google/cloud/security_center/v1/security_center/rest.rb +53 -0
  11. data/lib/google/cloud/security_center/v1/security_center.rb +6 -0
  12. data/lib/google/cloud/security_center/v1/version.rb +1 -1
  13. data/lib/google/cloud/security_center/v1.rb +5 -0
  14. data/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb +35 -0
  15. data/lib/google/cloud/securitycenter/v1/finding_pb.rb +1 -0
  16. data/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb.rb +50 -0
  17. data/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_module_pb.rb +40 -0
  18. data/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb +58 -1
  19. data/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +30 -0
  20. data/proto_docs/google/api/client.rb +57 -3
  21. data/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb +5 -5
  22. data/proto_docs/google/cloud/securitycenter/v1/contact_details.rb +2 -2
  23. data/proto_docs/google/cloud/securitycenter/v1/database.rb +1 -1
  24. data/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb +73 -0
  25. data/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb +1 -1
  26. data/proto_docs/google/cloud/securitycenter/v1/finding.rb +11 -6
  27. data/proto_docs/google/cloud/securitycenter/v1/indicator.rb +4 -3
  28. data/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb +8 -8
  29. data/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb +3 -3
  30. data/proto_docs/google/cloud/securitycenter/v1/mute_config.rb +5 -5
  31. data/proto_docs/google/cloud/securitycenter/v1/resource.rb +3 -3
  32. data/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb +112 -0
  33. data/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb +90 -0
  34. data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +169 -0
  35. data/proto_docs/google/iam/v1/policy.rb +8 -4
  36. metadata +19 -7
@@ -0,0 +1,4259 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/securitycenter/v1/securitycenter_service_pb"
21
+ require "google/cloud/security_center/v1/security_center/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module SecurityCenter
26
+ module V1
27
+ module SecurityCenter
28
+ module Rest
29
+ ##
30
+ # REST client for the SecurityCenter service.
31
+ #
32
+ # V1 APIs for Security Center service.
33
+ #
34
+ class Client
35
+ include Paths
36
+
37
+ # @private
38
+ attr_reader :security_center_stub
39
+
40
+ ##
41
+ # Configure the SecurityCenter Client class.
42
+ #
43
+ # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration}
44
+ # for a description of the configuration fields.
45
+ #
46
+ # @example
47
+ #
48
+ # # Modify the configuration for all SecurityCenter clients
49
+ # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "SecurityCenter", "V1"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0
70
+
71
+ default_config.rpcs.create_source.timeout = 60.0
72
+
73
+ default_config.rpcs.create_finding.timeout = 60.0
74
+
75
+ default_config.rpcs.create_notification_config.timeout = 60.0
76
+
77
+ default_config.rpcs.delete_notification_config.timeout = 60.0
78
+
79
+ default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0
80
+
81
+ default_config.rpcs.get_iam_policy.timeout = 60.0
82
+ default_config.rpcs.get_iam_policy.retry_policy = {
83
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
84
+ }
85
+
86
+ default_config.rpcs.get_notification_config.timeout = 60.0
87
+ default_config.rpcs.get_notification_config.retry_policy = {
88
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
89
+ }
90
+
91
+ default_config.rpcs.get_organization_settings.timeout = 60.0
92
+ default_config.rpcs.get_organization_settings.retry_policy = {
93
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
94
+ }
95
+
96
+ default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0
97
+ default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = {
98
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
99
+ }
100
+
101
+ default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0
102
+ default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = {
103
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
104
+ }
105
+
106
+ default_config.rpcs.get_source.timeout = 60.0
107
+ default_config.rpcs.get_source.retry_policy = {
108
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
109
+ }
110
+
111
+ default_config.rpcs.group_assets.timeout = 480.0
112
+ default_config.rpcs.group_assets.retry_policy = {
113
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
114
+ }
115
+
116
+ default_config.rpcs.group_findings.timeout = 480.0
117
+ default_config.rpcs.group_findings.retry_policy = {
118
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
119
+ }
120
+
121
+ default_config.rpcs.list_assets.timeout = 480.0
122
+ default_config.rpcs.list_assets.retry_policy = {
123
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
124
+ }
125
+
126
+ default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0
127
+ default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = {
128
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
129
+ }
130
+
131
+ default_config.rpcs.list_findings.timeout = 480.0
132
+ default_config.rpcs.list_findings.retry_policy = {
133
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
134
+ }
135
+
136
+ default_config.rpcs.list_notification_configs.timeout = 60.0
137
+ default_config.rpcs.list_notification_configs.retry_policy = {
138
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
139
+ }
140
+
141
+ default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0
142
+ default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = {
143
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
144
+ }
145
+
146
+ default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0
147
+ default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = {
148
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
149
+ }
150
+
151
+ default_config.rpcs.list_sources.timeout = 60.0
152
+ default_config.rpcs.list_sources.retry_policy = {
153
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
154
+ }
155
+
156
+ default_config.rpcs.run_asset_discovery.timeout = 60.0
157
+
158
+ default_config.rpcs.set_finding_state.timeout = 60.0
159
+
160
+ default_config.rpcs.set_iam_policy.timeout = 60.0
161
+
162
+ default_config.rpcs.test_iam_permissions.timeout = 60.0
163
+ default_config.rpcs.test_iam_permissions.retry_policy = {
164
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
165
+ }
166
+
167
+ default_config.rpcs.update_finding.timeout = 60.0
168
+
169
+ default_config.rpcs.update_notification_config.timeout = 60.0
170
+
171
+ default_config.rpcs.update_organization_settings.timeout = 60.0
172
+
173
+ default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0
174
+
175
+ default_config.rpcs.update_source.timeout = 60.0
176
+
177
+ default_config.rpcs.update_security_marks.timeout = 480.0
178
+
179
+ default_config
180
+ end
181
+ yield @configure if block_given?
182
+ @configure
183
+ end
184
+
185
+ ##
186
+ # Configure the SecurityCenter Client instance.
187
+ #
188
+ # The configuration is set to the derived mode, meaning that values can be changed,
189
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
190
+ # should be made on {Client.configure}.
191
+ #
192
+ # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration}
193
+ # for a description of the configuration fields.
194
+ #
195
+ # @yield [config] Configure the Client client.
196
+ # @yieldparam config [Client::Configuration]
197
+ #
198
+ # @return [Client::Configuration]
199
+ #
200
+ def configure
201
+ yield @config if block_given?
202
+ @config
203
+ end
204
+
205
+ ##
206
+ # Create a new SecurityCenter REST client object.
207
+ #
208
+ # @example
209
+ #
210
+ # # Create a client using the default configuration
211
+ # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new
212
+ #
213
+ # # Create a client using a custom configuration
214
+ # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config|
215
+ # config.timeout = 10.0
216
+ # end
217
+ #
218
+ # @yield [config] Configure the SecurityCenter client.
219
+ # @yieldparam config [Client::Configuration]
220
+ #
221
+ def initialize
222
+ # Create the configuration object
223
+ @config = Configuration.new Client.configure
224
+
225
+ # Yield the configuration if needed
226
+ yield @config if block_given?
227
+
228
+ # Create credentials
229
+ credentials = @config.credentials
230
+ # Use self-signed JWT if the endpoint is unchanged from default,
231
+ # but only if the default endpoint does not have a region prefix.
232
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
233
+ !@config.endpoint.split(".").first.include?("-")
234
+ credentials ||= Credentials.default scope: @config.scope,
235
+ enable_self_signed_jwt: enable_self_signed_jwt
236
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
237
+ credentials = Credentials.new credentials, scope: @config.scope
238
+ end
239
+
240
+ @quota_project_id = @config.quota_project
241
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
242
+
243
+ @operations_client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations.new do |config|
244
+ config.credentials = credentials
245
+ config.quota_project = @quota_project_id
246
+ config.endpoint = @config.endpoint
247
+ end
248
+
249
+ @security_center_stub = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
250
+ end
251
+
252
+ ##
253
+ # Get the associated client for long-running operations.
254
+ #
255
+ # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations]
256
+ #
257
+ attr_reader :operations_client
258
+
259
+ # Service calls
260
+
261
+ ##
262
+ # Kicks off an LRO to bulk mute findings for a parent based on a filter. The
263
+ # parent can be either an organization, folder or project. The findings
264
+ # matched by the filter will be muted after the LRO is done.
265
+ #
266
+ # @overload bulk_mute_findings(request, options = nil)
267
+ # Pass arguments to `bulk_mute_findings` via a request object, either of type
268
+ # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash.
269
+ #
270
+ # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash]
271
+ # A request object representing the call parameters. Required. To specify no
272
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
273
+ # @param options [::Gapic::CallOptions, ::Hash]
274
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
275
+ #
276
+ # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil)
277
+ # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at
278
+ # least one keyword argument is required. To specify no parameters, or to keep all
279
+ # the default parameter values, pass an empty Hash as a request object (see above).
280
+ #
281
+ # @param parent [::String]
282
+ # Required. The parent, at which bulk action needs to be applied. Its format
283
+ # is "organizations/[organization_id]", "folders/[folder_id]",
284
+ # "projects/[project_id]".
285
+ # @param filter [::String]
286
+ # Expression that identifies findings that should be updated.
287
+ # The expression is a list of zero or more restrictions combined
288
+ # via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
289
+ # has higher precedence than `AND`.
290
+ #
291
+ # Restrictions have the form `<field> <operator> <value>` and may have a
292
+ # `-` character in front of them to indicate negation. The fields map to
293
+ # those defined in the corresponding resource.
294
+ #
295
+ # The supported operators are:
296
+ #
297
+ # * `=` for all value types.
298
+ # * `>`, `<`, `>=`, `<=` for integer values.
299
+ # * `:`, meaning substring matching, for strings.
300
+ #
301
+ # The supported value types are:
302
+ #
303
+ # * string literals in quotes.
304
+ # * integer literals without quotes.
305
+ # * boolean literals `true` and `false` without quotes.
306
+ # @param mute_annotation [::String]
307
+ # This can be a mute configuration name or any identifier for mute/unmute
308
+ # of findings based on the filter.
309
+ # @yield [result, operation] Access the result along with the TransportOperation object
310
+ # @yieldparam result [::Gapic::Operation]
311
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
312
+ #
313
+ # @return [::Gapic::Operation]
314
+ #
315
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
316
+ def bulk_mute_findings request, options = nil
317
+ raise ::ArgumentError, "request must be provided" if request.nil?
318
+
319
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest
320
+
321
+ # Converts hash and nil to an options object
322
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
323
+
324
+ # Customize the options with defaults
325
+ call_metadata = @config.rpcs.bulk_mute_findings.metadata.to_h
326
+
327
+ # Set x-goog-api-client and x-goog-user-project headers
328
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
329
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
330
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
331
+ transports_version_send: [:rest]
332
+
333
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
334
+
335
+ options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout,
336
+ metadata: call_metadata,
337
+ retry_policy: @config.rpcs.bulk_mute_findings.retry_policy
338
+
339
+ options.apply_defaults timeout: @config.timeout,
340
+ metadata: @config.metadata,
341
+ retry_policy: @config.retry_policy
342
+
343
+ @security_center_stub.bulk_mute_findings request, options do |result, operation|
344
+ result = ::Gapic::Operation.new result, @operations_client, options: options
345
+ yield result, operation if block_given?
346
+ return result
347
+ end
348
+ rescue ::Gapic::Rest::Error => e
349
+ raise ::Google::Cloud::Error.from_error(e)
350
+ end
351
+
352
+ ##
353
+ # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the
354
+ # given CRM parent, and also creates inherited
355
+ # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given
356
+ # parent. These modules are enabled by default.
357
+ #
358
+ # @overload create_security_health_analytics_custom_module(request, options = nil)
359
+ # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type
360
+ # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
361
+ #
362
+ # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
363
+ # A request object representing the call parameters. Required. To specify no
364
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
365
+ # @param options [::Gapic::CallOptions, ::Hash]
366
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
367
+ #
368
+ # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil)
369
+ # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at
370
+ # least one keyword argument is required. To specify no parameters, or to keep all
371
+ # the default parameter values, pass an empty Hash as a request object (see above).
372
+ #
373
+ # @param parent [::String]
374
+ # Required. Resource name of the new custom module's parent. Its format is
375
+ # "organizations/\\{organization}/securityHealthAnalyticsSettings",
376
+ # "folders/\\{folder}/securityHealthAnalyticsSettings", or
377
+ # "projects/\\{project}/securityHealthAnalyticsSettings"
378
+ # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
379
+ # Required. SecurityHealthAnalytics custom module to create. The provided
380
+ # name is ignored and reset with provided parent information and
381
+ # server-generated ID.
382
+ # @yield [result, operation] Access the result along with the TransportOperation object
383
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
384
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
385
+ #
386
+ # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
387
+ #
388
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
389
+ def create_security_health_analytics_custom_module request, options = nil
390
+ raise ::ArgumentError, "request must be provided" if request.nil?
391
+
392
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest
393
+
394
+ # Converts hash and nil to an options object
395
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
396
+
397
+ # Customize the options with defaults
398
+ call_metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h
399
+
400
+ # Set x-goog-api-client and x-goog-user-project headers
401
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
402
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
403
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
404
+ transports_version_send: [:rest]
405
+
406
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
407
+
408
+ options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout,
409
+ metadata: call_metadata,
410
+ retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy
411
+
412
+ options.apply_defaults timeout: @config.timeout,
413
+ metadata: @config.metadata,
414
+ retry_policy: @config.retry_policy
415
+
416
+ @security_center_stub.create_security_health_analytics_custom_module request, options do |result, operation|
417
+ yield result, operation if block_given?
418
+ return result
419
+ end
420
+ rescue ::Gapic::Rest::Error => e
421
+ raise ::Google::Cloud::Error.from_error(e)
422
+ end
423
+
424
+ ##
425
+ # Creates a source.
426
+ #
427
+ # @overload create_source(request, options = nil)
428
+ # Pass arguments to `create_source` via a request object, either of type
429
+ # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash.
430
+ #
431
+ # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash]
432
+ # A request object representing the call parameters. Required. To specify no
433
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
434
+ # @param options [::Gapic::CallOptions, ::Hash]
435
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
436
+ #
437
+ # @overload create_source(parent: nil, source: nil)
438
+ # Pass arguments to `create_source` via keyword arguments. Note that at
439
+ # least one keyword argument is required. To specify no parameters, or to keep all
440
+ # the default parameter values, pass an empty Hash as a request object (see above).
441
+ #
442
+ # @param parent [::String]
443
+ # Required. Resource name of the new source's parent. Its format should be
444
+ # "organizations/[organization_id]".
445
+ # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash]
446
+ # Required. The Source being created, only the display_name and description
447
+ # will be used. All other fields will be ignored.
448
+ # @yield [result, operation] Access the result along with the TransportOperation object
449
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source]
450
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
451
+ #
452
+ # @return [::Google::Cloud::SecurityCenter::V1::Source]
453
+ #
454
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
455
+ def create_source request, options = nil
456
+ raise ::ArgumentError, "request must be provided" if request.nil?
457
+
458
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest
459
+
460
+ # Converts hash and nil to an options object
461
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
462
+
463
+ # Customize the options with defaults
464
+ call_metadata = @config.rpcs.create_source.metadata.to_h
465
+
466
+ # Set x-goog-api-client and x-goog-user-project headers
467
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
468
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
469
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
470
+ transports_version_send: [:rest]
471
+
472
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
+
474
+ options.apply_defaults timeout: @config.rpcs.create_source.timeout,
475
+ metadata: call_metadata,
476
+ retry_policy: @config.rpcs.create_source.retry_policy
477
+
478
+ options.apply_defaults timeout: @config.timeout,
479
+ metadata: @config.metadata,
480
+ retry_policy: @config.retry_policy
481
+
482
+ @security_center_stub.create_source request, options do |result, operation|
483
+ yield result, operation if block_given?
484
+ return result
485
+ end
486
+ rescue ::Gapic::Rest::Error => e
487
+ raise ::Google::Cloud::Error.from_error(e)
488
+ end
489
+
490
+ ##
491
+ # Creates a finding. The corresponding source must exist for finding creation
492
+ # to succeed.
493
+ #
494
+ # @overload create_finding(request, options = nil)
495
+ # Pass arguments to `create_finding` via a request object, either of type
496
+ # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash.
497
+ #
498
+ # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash]
499
+ # A request object representing the call parameters. Required. To specify no
500
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
501
+ # @param options [::Gapic::CallOptions, ::Hash]
502
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
503
+ #
504
+ # @overload create_finding(parent: nil, finding_id: nil, finding: nil)
505
+ # Pass arguments to `create_finding` via keyword arguments. Note that at
506
+ # least one keyword argument is required. To specify no parameters, or to keep all
507
+ # the default parameter values, pass an empty Hash as a request object (see above).
508
+ #
509
+ # @param parent [::String]
510
+ # Required. Resource name of the new finding's parent. Its format should be
511
+ # "organizations/[organization_id]/sources/[source_id]".
512
+ # @param finding_id [::String]
513
+ # Required. Unique identifier provided by the client within the parent scope.
514
+ # It must be alphanumeric and less than or equal to 32 characters and
515
+ # greater than 0 characters in length.
516
+ # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
517
+ # Required. The Finding being created. The name and security_marks will be
518
+ # ignored as they are both output only fields on this resource.
519
+ # @yield [result, operation] Access the result along with the TransportOperation object
520
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding]
521
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
522
+ #
523
+ # @return [::Google::Cloud::SecurityCenter::V1::Finding]
524
+ #
525
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
526
+ def create_finding request, options = nil
527
+ raise ::ArgumentError, "request must be provided" if request.nil?
528
+
529
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest
530
+
531
+ # Converts hash and nil to an options object
532
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
533
+
534
+ # Customize the options with defaults
535
+ call_metadata = @config.rpcs.create_finding.metadata.to_h
536
+
537
+ # Set x-goog-api-client and x-goog-user-project headers
538
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
539
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
540
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
541
+ transports_version_send: [:rest]
542
+
543
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
544
+
545
+ options.apply_defaults timeout: @config.rpcs.create_finding.timeout,
546
+ metadata: call_metadata,
547
+ retry_policy: @config.rpcs.create_finding.retry_policy
548
+
549
+ options.apply_defaults timeout: @config.timeout,
550
+ metadata: @config.metadata,
551
+ retry_policy: @config.retry_policy
552
+
553
+ @security_center_stub.create_finding request, options do |result, operation|
554
+ yield result, operation if block_given?
555
+ return result
556
+ end
557
+ rescue ::Gapic::Rest::Error => e
558
+ raise ::Google::Cloud::Error.from_error(e)
559
+ end
560
+
561
+ ##
562
+ # Creates a mute config.
563
+ #
564
+ # @overload create_mute_config(request, options = nil)
565
+ # Pass arguments to `create_mute_config` via a request object, either of type
566
+ # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash.
567
+ #
568
+ # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash]
569
+ # A request object representing the call parameters. Required. To specify no
570
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
571
+ # @param options [::Gapic::CallOptions, ::Hash]
572
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
573
+ #
574
+ # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil)
575
+ # Pass arguments to `create_mute_config` via keyword arguments. Note that at
576
+ # least one keyword argument is required. To specify no parameters, or to keep all
577
+ # the default parameter values, pass an empty Hash as a request object (see above).
578
+ #
579
+ # @param parent [::String]
580
+ # Required. Resource name of the new mute configs's parent. Its format is
581
+ # "organizations/[organization_id]", "folders/[folder_id]", or
582
+ # "projects/[project_id]".
583
+ # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash]
584
+ # Required. The mute config being created.
585
+ # @param mute_config_id [::String]
586
+ # Required. Unique identifier provided by the client within the parent scope.
587
+ # It must consist of lower case letters, numbers, and hyphen, with the first
588
+ # character a letter, the last a letter or a number, and a 63 character
589
+ # maximum.
590
+ # @yield [result, operation] Access the result along with the TransportOperation object
591
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig]
592
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
593
+ #
594
+ # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig]
595
+ #
596
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
597
+ def create_mute_config request, options = nil
598
+ raise ::ArgumentError, "request must be provided" if request.nil?
599
+
600
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest
601
+
602
+ # Converts hash and nil to an options object
603
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
604
+
605
+ # Customize the options with defaults
606
+ call_metadata = @config.rpcs.create_mute_config.metadata.to_h
607
+
608
+ # Set x-goog-api-client and x-goog-user-project headers
609
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
610
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
611
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
612
+ transports_version_send: [:rest]
613
+
614
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
615
+
616
+ options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout,
617
+ metadata: call_metadata,
618
+ retry_policy: @config.rpcs.create_mute_config.retry_policy
619
+
620
+ options.apply_defaults timeout: @config.timeout,
621
+ metadata: @config.metadata,
622
+ retry_policy: @config.retry_policy
623
+
624
+ @security_center_stub.create_mute_config request, options do |result, operation|
625
+ yield result, operation if block_given?
626
+ return result
627
+ end
628
+ rescue ::Gapic::Rest::Error => e
629
+ raise ::Google::Cloud::Error.from_error(e)
630
+ end
631
+
632
+ ##
633
+ # Creates a notification config.
634
+ #
635
+ # @overload create_notification_config(request, options = nil)
636
+ # Pass arguments to `create_notification_config` via a request object, either of type
637
+ # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash.
638
+ #
639
+ # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash]
640
+ # A request object representing the call parameters. Required. To specify no
641
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
642
+ # @param options [::Gapic::CallOptions, ::Hash]
643
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
644
+ #
645
+ # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil)
646
+ # Pass arguments to `create_notification_config` via keyword arguments. Note that at
647
+ # least one keyword argument is required. To specify no parameters, or to keep all
648
+ # the default parameter values, pass an empty Hash as a request object (see above).
649
+ #
650
+ # @param parent [::String]
651
+ # Required. Resource name of the new notification config's parent. Its format
652
+ # is "organizations/[organization_id]", "folders/[folder_id]", or
653
+ # "projects/[project_id]".
654
+ # @param config_id [::String]
655
+ # Required.
656
+ # Unique identifier provided by the client within the parent scope.
657
+ # It must be between 1 and 128 characters and contain alphanumeric
658
+ # characters, underscores, or hyphens only.
659
+ # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash]
660
+ # Required. The notification config being created. The name and the service
661
+ # account will be ignored as they are both output only fields on this
662
+ # resource.
663
+ # @yield [result, operation] Access the result along with the TransportOperation object
664
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
665
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
666
+ #
667
+ # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
668
+ #
669
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
670
+ def create_notification_config request, options = nil
671
+ raise ::ArgumentError, "request must be provided" if request.nil?
672
+
673
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest
674
+
675
+ # Converts hash and nil to an options object
676
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
677
+
678
+ # Customize the options with defaults
679
+ call_metadata = @config.rpcs.create_notification_config.metadata.to_h
680
+
681
+ # Set x-goog-api-client and x-goog-user-project headers
682
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
683
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
684
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
685
+ transports_version_send: [:rest]
686
+
687
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
688
+
689
+ options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout,
690
+ metadata: call_metadata,
691
+ retry_policy: @config.rpcs.create_notification_config.retry_policy
692
+
693
+ options.apply_defaults timeout: @config.timeout,
694
+ metadata: @config.metadata,
695
+ retry_policy: @config.retry_policy
696
+
697
+ @security_center_stub.create_notification_config request, options do |result, operation|
698
+ yield result, operation if block_given?
699
+ return result
700
+ end
701
+ rescue ::Gapic::Rest::Error => e
702
+ raise ::Google::Cloud::Error.from_error(e)
703
+ end
704
+
705
+ ##
706
+ # Deletes an existing mute config.
707
+ #
708
+ # @overload delete_mute_config(request, options = nil)
709
+ # Pass arguments to `delete_mute_config` via a request object, either of type
710
+ # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash.
711
+ #
712
+ # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash]
713
+ # A request object representing the call parameters. Required. To specify no
714
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
715
+ # @param options [::Gapic::CallOptions, ::Hash]
716
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
717
+ #
718
+ # @overload delete_mute_config(name: nil)
719
+ # Pass arguments to `delete_mute_config` via keyword arguments. Note that at
720
+ # least one keyword argument is required. To specify no parameters, or to keep all
721
+ # the default parameter values, pass an empty Hash as a request object (see above).
722
+ #
723
+ # @param name [::String]
724
+ # Required. Name of the mute config to delete. Its format is
725
+ # organizations/\\{organization}/muteConfigs/\\{config_id},
726
+ # folders/\\{folder}/muteConfigs/\\{config_id}, or
727
+ # projects/\\{project}/muteConfigs/\\{config_id}
728
+ # @yield [result, operation] Access the result along with the TransportOperation object
729
+ # @yieldparam result [::Google::Protobuf::Empty]
730
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
731
+ #
732
+ # @return [::Google::Protobuf::Empty]
733
+ #
734
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
735
+ def delete_mute_config request, options = nil
736
+ raise ::ArgumentError, "request must be provided" if request.nil?
737
+
738
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest
739
+
740
+ # Converts hash and nil to an options object
741
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
742
+
743
+ # Customize the options with defaults
744
+ call_metadata = @config.rpcs.delete_mute_config.metadata.to_h
745
+
746
+ # Set x-goog-api-client and x-goog-user-project headers
747
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
748
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
749
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
750
+ transports_version_send: [:rest]
751
+
752
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
753
+
754
+ options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout,
755
+ metadata: call_metadata,
756
+ retry_policy: @config.rpcs.delete_mute_config.retry_policy
757
+
758
+ options.apply_defaults timeout: @config.timeout,
759
+ metadata: @config.metadata,
760
+ retry_policy: @config.retry_policy
761
+
762
+ @security_center_stub.delete_mute_config request, options do |result, operation|
763
+ yield result, operation if block_given?
764
+ return result
765
+ end
766
+ rescue ::Gapic::Rest::Error => e
767
+ raise ::Google::Cloud::Error.from_error(e)
768
+ end
769
+
770
+ ##
771
+ # Deletes a notification config.
772
+ #
773
+ # @overload delete_notification_config(request, options = nil)
774
+ # Pass arguments to `delete_notification_config` via a request object, either of type
775
+ # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash.
776
+ #
777
+ # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash]
778
+ # A request object representing the call parameters. Required. To specify no
779
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
780
+ # @param options [::Gapic::CallOptions, ::Hash]
781
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
782
+ #
783
+ # @overload delete_notification_config(name: nil)
784
+ # Pass arguments to `delete_notification_config` via keyword arguments. Note that at
785
+ # least one keyword argument is required. To specify no parameters, or to keep all
786
+ # the default parameter values, pass an empty Hash as a request object (see above).
787
+ #
788
+ # @param name [::String]
789
+ # Required. Name of the notification config to delete. Its format is
790
+ # "organizations/[organization_id]/notificationConfigs/[config_id]",
791
+ # "folders/[folder_id]/notificationConfigs/[config_id]",
792
+ # or "projects/[project_id]/notificationConfigs/[config_id]".
793
+ # @yield [result, operation] Access the result along with the TransportOperation object
794
+ # @yieldparam result [::Google::Protobuf::Empty]
795
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
796
+ #
797
+ # @return [::Google::Protobuf::Empty]
798
+ #
799
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
800
+ def delete_notification_config request, options = nil
801
+ raise ::ArgumentError, "request must be provided" if request.nil?
802
+
803
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest
804
+
805
+ # Converts hash and nil to an options object
806
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
807
+
808
+ # Customize the options with defaults
809
+ call_metadata = @config.rpcs.delete_notification_config.metadata.to_h
810
+
811
+ # Set x-goog-api-client and x-goog-user-project headers
812
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
813
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
814
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
815
+ transports_version_send: [:rest]
816
+
817
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
818
+
819
+ options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout,
820
+ metadata: call_metadata,
821
+ retry_policy: @config.rpcs.delete_notification_config.retry_policy
822
+
823
+ options.apply_defaults timeout: @config.timeout,
824
+ metadata: @config.metadata,
825
+ retry_policy: @config.retry_policy
826
+
827
+ @security_center_stub.delete_notification_config request, options do |result, operation|
828
+ yield result, operation if block_given?
829
+ return result
830
+ end
831
+ rescue ::Gapic::Rest::Error => e
832
+ raise ::Google::Cloud::Error.from_error(e)
833
+ end
834
+
835
+ ##
836
+ # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its
837
+ # descendants in the CRM hierarchy. This method is only supported for
838
+ # resident custom modules.
839
+ #
840
+ # @overload delete_security_health_analytics_custom_module(request, options = nil)
841
+ # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type
842
+ # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
843
+ #
844
+ # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
845
+ # A request object representing the call parameters. Required. To specify no
846
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
847
+ # @param options [::Gapic::CallOptions, ::Hash]
848
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
849
+ #
850
+ # @overload delete_security_health_analytics_custom_module(name: nil)
851
+ # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at
852
+ # least one keyword argument is required. To specify no parameters, or to keep all
853
+ # the default parameter values, pass an empty Hash as a request object (see above).
854
+ #
855
+ # @param name [::String]
856
+ # Required. Name of the custom module to delete. Its format is
857
+ # "organizations/\\{organization}/securityHealthAnalyticsSettings/customModules/\\{customModule}",
858
+ # "folders/\\{folder}/securityHealthAnalyticsSettings/customModules/\\{customModule}",
859
+ # or
860
+ # "projects/\\{project}/securityHealthAnalyticsSettings/customModules/\\{customModule}"
861
+ # @yield [result, operation] Access the result along with the TransportOperation object
862
+ # @yieldparam result [::Google::Protobuf::Empty]
863
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
864
+ #
865
+ # @return [::Google::Protobuf::Empty]
866
+ #
867
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
868
+ def delete_security_health_analytics_custom_module request, options = nil
869
+ raise ::ArgumentError, "request must be provided" if request.nil?
870
+
871
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest
872
+
873
+ # Converts hash and nil to an options object
874
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
875
+
876
+ # Customize the options with defaults
877
+ call_metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h
878
+
879
+ # Set x-goog-api-client and x-goog-user-project headers
880
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
881
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
882
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
883
+ transports_version_send: [:rest]
884
+
885
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
886
+
887
+ options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout,
888
+ metadata: call_metadata,
889
+ retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy
890
+
891
+ options.apply_defaults timeout: @config.timeout,
892
+ metadata: @config.metadata,
893
+ retry_policy: @config.retry_policy
894
+
895
+ @security_center_stub.delete_security_health_analytics_custom_module request, options do |result, operation|
896
+ yield result, operation if block_given?
897
+ return result
898
+ end
899
+ rescue ::Gapic::Rest::Error => e
900
+ raise ::Google::Cloud::Error.from_error(e)
901
+ end
902
+
903
+ ##
904
+ # Gets a BigQuery export.
905
+ #
906
+ # @overload get_big_query_export(request, options = nil)
907
+ # Pass arguments to `get_big_query_export` via a request object, either of type
908
+ # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash.
909
+ #
910
+ # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash]
911
+ # A request object representing the call parameters. Required. To specify no
912
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
913
+ # @param options [::Gapic::CallOptions, ::Hash]
914
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
915
+ #
916
+ # @overload get_big_query_export(name: nil)
917
+ # Pass arguments to `get_big_query_export` via keyword arguments. Note that at
918
+ # least one keyword argument is required. To specify no parameters, or to keep all
919
+ # the default parameter values, pass an empty Hash as a request object (see above).
920
+ #
921
+ # @param name [::String]
922
+ # Required. Name of the BigQuery export to retrieve. Its format is
923
+ # organizations/\\{organization}/bigQueryExports/\\{export_id},
924
+ # folders/\\{folder}/bigQueryExports/\\{export_id}, or
925
+ # projects/\\{project}/bigQueryExports/\\{export_id}
926
+ # @yield [result, operation] Access the result along with the TransportOperation object
927
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
928
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
929
+ #
930
+ # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
931
+ #
932
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
933
+ def get_big_query_export request, options = nil
934
+ raise ::ArgumentError, "request must be provided" if request.nil?
935
+
936
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest
937
+
938
+ # Converts hash and nil to an options object
939
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
940
+
941
+ # Customize the options with defaults
942
+ call_metadata = @config.rpcs.get_big_query_export.metadata.to_h
943
+
944
+ # Set x-goog-api-client and x-goog-user-project headers
945
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
946
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
947
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
948
+ transports_version_send: [:rest]
949
+
950
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
951
+
952
+ options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout,
953
+ metadata: call_metadata,
954
+ retry_policy: @config.rpcs.get_big_query_export.retry_policy
955
+
956
+ options.apply_defaults timeout: @config.timeout,
957
+ metadata: @config.metadata,
958
+ retry_policy: @config.retry_policy
959
+
960
+ @security_center_stub.get_big_query_export request, options do |result, operation|
961
+ yield result, operation if block_given?
962
+ return result
963
+ end
964
+ rescue ::Gapic::Rest::Error => e
965
+ raise ::Google::Cloud::Error.from_error(e)
966
+ end
967
+
968
+ ##
969
+ # Gets the access control policy on the specified Source.
970
+ #
971
+ # @overload get_iam_policy(request, options = nil)
972
+ # Pass arguments to `get_iam_policy` via a request object, either of type
973
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
974
+ #
975
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
976
+ # A request object representing the call parameters. Required. To specify no
977
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
978
+ # @param options [::Gapic::CallOptions, ::Hash]
979
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
980
+ #
981
+ # @overload get_iam_policy(resource: nil, options: nil)
982
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
983
+ # least one keyword argument is required. To specify no parameters, or to keep all
984
+ # the default parameter values, pass an empty Hash as a request object (see above).
985
+ #
986
+ # @param resource [::String]
987
+ # REQUIRED: The resource for which the policy is being requested.
988
+ # See the operation documentation for the appropriate value for this field.
989
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
990
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
991
+ # `GetIamPolicy`.
992
+ # @yield [result, operation] Access the result along with the TransportOperation object
993
+ # @yieldparam result [::Google::Iam::V1::Policy]
994
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
995
+ #
996
+ # @return [::Google::Iam::V1::Policy]
997
+ #
998
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
999
+ def get_iam_policy request, options = nil
1000
+ raise ::ArgumentError, "request must be provided" if request.nil?
1001
+
1002
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
1003
+
1004
+ # Converts hash and nil to an options object
1005
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1006
+
1007
+ # Customize the options with defaults
1008
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
1009
+
1010
+ # Set x-goog-api-client and x-goog-user-project headers
1011
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1012
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1013
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1014
+ transports_version_send: [:rest]
1015
+
1016
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1017
+
1018
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
1019
+ metadata: call_metadata,
1020
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
1021
+
1022
+ options.apply_defaults timeout: @config.timeout,
1023
+ metadata: @config.metadata,
1024
+ retry_policy: @config.retry_policy
1025
+
1026
+ @security_center_stub.get_iam_policy request, options do |result, operation|
1027
+ yield result, operation if block_given?
1028
+ return result
1029
+ end
1030
+ rescue ::Gapic::Rest::Error => e
1031
+ raise ::Google::Cloud::Error.from_error(e)
1032
+ end
1033
+
1034
+ ##
1035
+ # Gets a mute config.
1036
+ #
1037
+ # @overload get_mute_config(request, options = nil)
1038
+ # Pass arguments to `get_mute_config` via a request object, either of type
1039
+ # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash.
1040
+ #
1041
+ # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash]
1042
+ # A request object representing the call parameters. Required. To specify no
1043
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1044
+ # @param options [::Gapic::CallOptions, ::Hash]
1045
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1046
+ #
1047
+ # @overload get_mute_config(name: nil)
1048
+ # Pass arguments to `get_mute_config` via keyword arguments. Note that at
1049
+ # least one keyword argument is required. To specify no parameters, or to keep all
1050
+ # the default parameter values, pass an empty Hash as a request object (see above).
1051
+ #
1052
+ # @param name [::String]
1053
+ # Required. Name of the mute config to retrieve. Its format is
1054
+ # organizations/\\{organization}/muteConfigs/\\{config_id},
1055
+ # folders/\\{folder}/muteConfigs/\\{config_id}, or
1056
+ # projects/\\{project}/muteConfigs/\\{config_id}
1057
+ # @yield [result, operation] Access the result along with the TransportOperation object
1058
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig]
1059
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1060
+ #
1061
+ # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig]
1062
+ #
1063
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1064
+ def get_mute_config request, options = nil
1065
+ raise ::ArgumentError, "request must be provided" if request.nil?
1066
+
1067
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest
1068
+
1069
+ # Converts hash and nil to an options object
1070
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1071
+
1072
+ # Customize the options with defaults
1073
+ call_metadata = @config.rpcs.get_mute_config.metadata.to_h
1074
+
1075
+ # Set x-goog-api-client and x-goog-user-project headers
1076
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1077
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1078
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1079
+ transports_version_send: [:rest]
1080
+
1081
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1082
+
1083
+ options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout,
1084
+ metadata: call_metadata,
1085
+ retry_policy: @config.rpcs.get_mute_config.retry_policy
1086
+
1087
+ options.apply_defaults timeout: @config.timeout,
1088
+ metadata: @config.metadata,
1089
+ retry_policy: @config.retry_policy
1090
+
1091
+ @security_center_stub.get_mute_config request, options do |result, operation|
1092
+ yield result, operation if block_given?
1093
+ return result
1094
+ end
1095
+ rescue ::Gapic::Rest::Error => e
1096
+ raise ::Google::Cloud::Error.from_error(e)
1097
+ end
1098
+
1099
+ ##
1100
+ # Gets a notification config.
1101
+ #
1102
+ # @overload get_notification_config(request, options = nil)
1103
+ # Pass arguments to `get_notification_config` via a request object, either of type
1104
+ # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash.
1105
+ #
1106
+ # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash]
1107
+ # A request object representing the call parameters. Required. To specify no
1108
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1109
+ # @param options [::Gapic::CallOptions, ::Hash]
1110
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1111
+ #
1112
+ # @overload get_notification_config(name: nil)
1113
+ # Pass arguments to `get_notification_config` via keyword arguments. Note that at
1114
+ # least one keyword argument is required. To specify no parameters, or to keep all
1115
+ # the default parameter values, pass an empty Hash as a request object (see above).
1116
+ #
1117
+ # @param name [::String]
1118
+ # Required. Name of the notification config to get. Its format is
1119
+ # "organizations/[organization_id]/notificationConfigs/[config_id]",
1120
+ # "folders/[folder_id]/notificationConfigs/[config_id]",
1121
+ # or "projects/[project_id]/notificationConfigs/[config_id]".
1122
+ # @yield [result, operation] Access the result along with the TransportOperation object
1123
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
1124
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1125
+ #
1126
+ # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
1127
+ #
1128
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1129
+ def get_notification_config request, options = nil
1130
+ raise ::ArgumentError, "request must be provided" if request.nil?
1131
+
1132
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest
1133
+
1134
+ # Converts hash and nil to an options object
1135
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1136
+
1137
+ # Customize the options with defaults
1138
+ call_metadata = @config.rpcs.get_notification_config.metadata.to_h
1139
+
1140
+ # Set x-goog-api-client and x-goog-user-project headers
1141
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1142
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1143
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1144
+ transports_version_send: [:rest]
1145
+
1146
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1147
+
1148
+ options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout,
1149
+ metadata: call_metadata,
1150
+ retry_policy: @config.rpcs.get_notification_config.retry_policy
1151
+
1152
+ options.apply_defaults timeout: @config.timeout,
1153
+ metadata: @config.metadata,
1154
+ retry_policy: @config.retry_policy
1155
+
1156
+ @security_center_stub.get_notification_config request, options do |result, operation|
1157
+ yield result, operation if block_given?
1158
+ return result
1159
+ end
1160
+ rescue ::Gapic::Rest::Error => e
1161
+ raise ::Google::Cloud::Error.from_error(e)
1162
+ end
1163
+
1164
+ ##
1165
+ # Gets the settings for an organization.
1166
+ #
1167
+ # @overload get_organization_settings(request, options = nil)
1168
+ # Pass arguments to `get_organization_settings` via a request object, either of type
1169
+ # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash.
1170
+ #
1171
+ # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash]
1172
+ # A request object representing the call parameters. Required. To specify no
1173
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1174
+ # @param options [::Gapic::CallOptions, ::Hash]
1175
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1176
+ #
1177
+ # @overload get_organization_settings(name: nil)
1178
+ # Pass arguments to `get_organization_settings` via keyword arguments. Note that at
1179
+ # least one keyword argument is required. To specify no parameters, or to keep all
1180
+ # the default parameter values, pass an empty Hash as a request object (see above).
1181
+ #
1182
+ # @param name [::String]
1183
+ # Required. Name of the organization to get organization settings for. Its
1184
+ # format is "organizations/[organization_id]/organizationSettings".
1185
+ # @yield [result, operation] Access the result along with the TransportOperation object
1186
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
1187
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1188
+ #
1189
+ # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
1190
+ #
1191
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1192
+ def get_organization_settings request, options = nil
1193
+ raise ::ArgumentError, "request must be provided" if request.nil?
1194
+
1195
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest
1196
+
1197
+ # Converts hash and nil to an options object
1198
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1199
+
1200
+ # Customize the options with defaults
1201
+ call_metadata = @config.rpcs.get_organization_settings.metadata.to_h
1202
+
1203
+ # Set x-goog-api-client and x-goog-user-project headers
1204
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1205
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1206
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1207
+ transports_version_send: [:rest]
1208
+
1209
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1210
+
1211
+ options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout,
1212
+ metadata: call_metadata,
1213
+ retry_policy: @config.rpcs.get_organization_settings.retry_policy
1214
+
1215
+ options.apply_defaults timeout: @config.timeout,
1216
+ metadata: @config.metadata,
1217
+ retry_policy: @config.retry_policy
1218
+
1219
+ @security_center_stub.get_organization_settings request, options do |result, operation|
1220
+ yield result, operation if block_given?
1221
+ return result
1222
+ end
1223
+ rescue ::Gapic::Rest::Error => e
1224
+ raise ::Google::Cloud::Error.from_error(e)
1225
+ end
1226
+
1227
+ ##
1228
+ # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
1229
+ #
1230
+ # @overload get_effective_security_health_analytics_custom_module(request, options = nil)
1231
+ # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type
1232
+ # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
1233
+ #
1234
+ # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
1235
+ # A request object representing the call parameters. Required. To specify no
1236
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1237
+ # @param options [::Gapic::CallOptions, ::Hash]
1238
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1239
+ #
1240
+ # @overload get_effective_security_health_analytics_custom_module(name: nil)
1241
+ # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at
1242
+ # least one keyword argument is required. To specify no parameters, or to keep all
1243
+ # the default parameter values, pass an empty Hash as a request object (see above).
1244
+ #
1245
+ # @param name [::String]
1246
+ # Required. Name of the effective custom module to get. Its format is
1247
+ # "organizations/\\{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}",
1248
+ # "folders/\\{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}",
1249
+ # or
1250
+ # "projects/\\{project}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}"
1251
+ # @yield [result, operation] Access the result along with the TransportOperation object
1252
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule]
1253
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1254
+ #
1255
+ # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule]
1256
+ #
1257
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1258
+ def get_effective_security_health_analytics_custom_module request, options = nil
1259
+ raise ::ArgumentError, "request must be provided" if request.nil?
1260
+
1261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest
1262
+
1263
+ # Converts hash and nil to an options object
1264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1265
+
1266
+ # Customize the options with defaults
1267
+ call_metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h
1268
+
1269
+ # Set x-goog-api-client and x-goog-user-project headers
1270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1272
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1273
+ transports_version_send: [:rest]
1274
+
1275
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1276
+
1277
+ options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout,
1278
+ metadata: call_metadata,
1279
+ retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy
1280
+
1281
+ options.apply_defaults timeout: @config.timeout,
1282
+ metadata: @config.metadata,
1283
+ retry_policy: @config.retry_policy
1284
+
1285
+ @security_center_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation|
1286
+ yield result, operation if block_given?
1287
+ return result
1288
+ end
1289
+ rescue ::Gapic::Rest::Error => e
1290
+ raise ::Google::Cloud::Error.from_error(e)
1291
+ end
1292
+
1293
+ ##
1294
+ # Retrieves a SecurityHealthAnalyticsCustomModule.
1295
+ #
1296
+ # @overload get_security_health_analytics_custom_module(request, options = nil)
1297
+ # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type
1298
+ # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
1299
+ #
1300
+ # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
1301
+ # A request object representing the call parameters. Required. To specify no
1302
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1303
+ # @param options [::Gapic::CallOptions, ::Hash]
1304
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1305
+ #
1306
+ # @overload get_security_health_analytics_custom_module(name: nil)
1307
+ # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at
1308
+ # least one keyword argument is required. To specify no parameters, or to keep all
1309
+ # the default parameter values, pass an empty Hash as a request object (see above).
1310
+ #
1311
+ # @param name [::String]
1312
+ # Required. Name of the custom module to get. Its format is
1313
+ # "organizations/\\{organization}/securityHealthAnalyticsSettings/customModules/\\{customModule}",
1314
+ # "folders/\\{folder}/securityHealthAnalyticsSettings/customModules/\\{customModule}",
1315
+ # or
1316
+ # "projects/\\{project}/securityHealthAnalyticsSettings/customModules/\\{customModule}"
1317
+ # @yield [result, operation] Access the result along with the TransportOperation object
1318
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
1319
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1320
+ #
1321
+ # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
1322
+ #
1323
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1324
+ def get_security_health_analytics_custom_module request, options = nil
1325
+ raise ::ArgumentError, "request must be provided" if request.nil?
1326
+
1327
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest
1328
+
1329
+ # Converts hash and nil to an options object
1330
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1331
+
1332
+ # Customize the options with defaults
1333
+ call_metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h
1334
+
1335
+ # Set x-goog-api-client and x-goog-user-project headers
1336
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1337
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1338
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1339
+ transports_version_send: [:rest]
1340
+
1341
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1342
+
1343
+ options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout,
1344
+ metadata: call_metadata,
1345
+ retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy
1346
+
1347
+ options.apply_defaults timeout: @config.timeout,
1348
+ metadata: @config.metadata,
1349
+ retry_policy: @config.retry_policy
1350
+
1351
+ @security_center_stub.get_security_health_analytics_custom_module request, options do |result, operation|
1352
+ yield result, operation if block_given?
1353
+ return result
1354
+ end
1355
+ rescue ::Gapic::Rest::Error => e
1356
+ raise ::Google::Cloud::Error.from_error(e)
1357
+ end
1358
+
1359
+ ##
1360
+ # Gets a source.
1361
+ #
1362
+ # @overload get_source(request, options = nil)
1363
+ # Pass arguments to `get_source` via a request object, either of type
1364
+ # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash.
1365
+ #
1366
+ # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash]
1367
+ # A request object representing the call parameters. Required. To specify no
1368
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1369
+ # @param options [::Gapic::CallOptions, ::Hash]
1370
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1371
+ #
1372
+ # @overload get_source(name: nil)
1373
+ # Pass arguments to `get_source` via keyword arguments. Note that at
1374
+ # least one keyword argument is required. To specify no parameters, or to keep all
1375
+ # the default parameter values, pass an empty Hash as a request object (see above).
1376
+ #
1377
+ # @param name [::String]
1378
+ # Required. Relative resource name of the source. Its format is
1379
+ # "organizations/[organization_id]/source/[source_id]".
1380
+ # @yield [result, operation] Access the result along with the TransportOperation object
1381
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source]
1382
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1383
+ #
1384
+ # @return [::Google::Cloud::SecurityCenter::V1::Source]
1385
+ #
1386
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1387
+ def get_source request, options = nil
1388
+ raise ::ArgumentError, "request must be provided" if request.nil?
1389
+
1390
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest
1391
+
1392
+ # Converts hash and nil to an options object
1393
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1394
+
1395
+ # Customize the options with defaults
1396
+ call_metadata = @config.rpcs.get_source.metadata.to_h
1397
+
1398
+ # Set x-goog-api-client and x-goog-user-project headers
1399
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1400
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1401
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1402
+ transports_version_send: [:rest]
1403
+
1404
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1405
+
1406
+ options.apply_defaults timeout: @config.rpcs.get_source.timeout,
1407
+ metadata: call_metadata,
1408
+ retry_policy: @config.rpcs.get_source.retry_policy
1409
+
1410
+ options.apply_defaults timeout: @config.timeout,
1411
+ metadata: @config.metadata,
1412
+ retry_policy: @config.retry_policy
1413
+
1414
+ @security_center_stub.get_source request, options do |result, operation|
1415
+ yield result, operation if block_given?
1416
+ return result
1417
+ end
1418
+ rescue ::Gapic::Rest::Error => e
1419
+ raise ::Google::Cloud::Error.from_error(e)
1420
+ end
1421
+
1422
+ ##
1423
+ # Filters an organization's assets and groups them by their specified
1424
+ # properties.
1425
+ #
1426
+ # @overload group_assets(request, options = nil)
1427
+ # Pass arguments to `group_assets` via a request object, either of type
1428
+ # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash.
1429
+ #
1430
+ # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash]
1431
+ # A request object representing the call parameters. Required. To specify no
1432
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1433
+ # @param options [::Gapic::CallOptions, ::Hash]
1434
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1435
+ #
1436
+ # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil)
1437
+ # Pass arguments to `group_assets` via keyword arguments. Note that at
1438
+ # least one keyword argument is required. To specify no parameters, or to keep all
1439
+ # the default parameter values, pass an empty Hash as a request object (see above).
1440
+ #
1441
+ # @param parent [::String]
1442
+ # Required. The name of the parent to group the assets by. Its format is
1443
+ # "organizations/[organization_id]", "folders/[folder_id]", or
1444
+ # "projects/[project_id]".
1445
+ # @param filter [::String]
1446
+ # Expression that defines the filter to apply across assets.
1447
+ # The expression is a list of zero or more restrictions combined via logical
1448
+ # operators `AND` and `OR`.
1449
+ # Parentheses are supported, and `OR` has higher precedence than `AND`.
1450
+ #
1451
+ # Restrictions have the form `<field> <operator> <value>` and may have a `-`
1452
+ # character in front of them to indicate negation. The fields map to those
1453
+ # defined in the Asset resource. Examples include:
1454
+ #
1455
+ # * name
1456
+ # * security_center_properties.resource_name
1457
+ # * resource_properties.a_property
1458
+ # * security_marks.marks.marka
1459
+ #
1460
+ # The supported operators are:
1461
+ #
1462
+ # * `=` for all value types.
1463
+ # * `>`, `<`, `>=`, `<=` for integer values.
1464
+ # * `:`, meaning substring matching, for strings.
1465
+ #
1466
+ # The supported value types are:
1467
+ #
1468
+ # * string literals in quotes.
1469
+ # * integer literals without quotes.
1470
+ # * boolean literals `true` and `false` without quotes.
1471
+ #
1472
+ # The following field and operator combinations are supported:
1473
+ #
1474
+ # * name: `=`
1475
+ # * update_time: `=`, `>`, `<`, `>=`, `<=`
1476
+ #
1477
+ # Usage: This should be milliseconds since epoch or an RFC3339 string.
1478
+ # Examples:
1479
+ # `update_time = "2019-06-10T16:07:18-07:00"`
1480
+ # `update_time = 1560208038000`
1481
+ #
1482
+ # * create_time: `=`, `>`, `<`, `>=`, `<=`
1483
+ #
1484
+ # Usage: This should be milliseconds since epoch or an RFC3339 string.
1485
+ # Examples:
1486
+ # `create_time = "2019-06-10T16:07:18-07:00"`
1487
+ # `create_time = 1560208038000`
1488
+ #
1489
+ # * iam_policy.policy_blob: `=`, `:`
1490
+ # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
1491
+ # * security_marks.marks: `=`, `:`
1492
+ # * security_center_properties.resource_name: `=`, `:`
1493
+ # * security_center_properties.resource_display_name: `=`, `:`
1494
+ # * security_center_properties.resource_type: `=`, `:`
1495
+ # * security_center_properties.resource_parent: `=`, `:`
1496
+ # * security_center_properties.resource_parent_display_name: `=`, `:`
1497
+ # * security_center_properties.resource_project: `=`, `:`
1498
+ # * security_center_properties.resource_project_display_name: `=`, `:`
1499
+ # * security_center_properties.resource_owners: `=`, `:`
1500
+ #
1501
+ # For example, `resource_properties.size = 100` is a valid filter string.
1502
+ #
1503
+ # Use a partial match on the empty string to filter based on a property
1504
+ # existing: `resource_properties.my_property : ""`
1505
+ #
1506
+ # Use a negated partial match on the empty string to filter based on a
1507
+ # property not existing: `-resource_properties.my_property : ""`
1508
+ # @param group_by [::String]
1509
+ # Required. Expression that defines what assets fields to use for grouping.
1510
+ # The string value should follow SQL syntax: comma separated list of fields.
1511
+ # For example:
1512
+ # "security_center_properties.resource_project,security_center_properties.project".
1513
+ #
1514
+ # The following fields are supported when compare_duration is not set:
1515
+ #
1516
+ # * security_center_properties.resource_project
1517
+ # * security_center_properties.resource_project_display_name
1518
+ # * security_center_properties.resource_type
1519
+ # * security_center_properties.resource_parent
1520
+ # * security_center_properties.resource_parent_display_name
1521
+ #
1522
+ # The following fields are supported when compare_duration is set:
1523
+ #
1524
+ # * security_center_properties.resource_type
1525
+ # * security_center_properties.resource_project_display_name
1526
+ # * security_center_properties.resource_parent_display_name
1527
+ # @param compare_duration [::Google::Protobuf::Duration, ::Hash]
1528
+ # When compare_duration is set, the GroupResult's "state_change" property is
1529
+ # updated to indicate whether the asset was added, removed, or remained
1530
+ # present during the compare_duration period of time that precedes the
1531
+ # read_time. This is the time between (read_time - compare_duration) and
1532
+ # read_time.
1533
+ #
1534
+ # The state change value is derived based on the presence of the asset at the
1535
+ # two points in time. Intermediate state changes between the two times don't
1536
+ # affect the result. For example, the results aren't affected if the asset is
1537
+ # removed and re-created again.
1538
+ #
1539
+ # Possible "state_change" values when compare_duration is specified:
1540
+ #
1541
+ # * "ADDED": indicates that the asset was not present at the start of
1542
+ # compare_duration, but present at reference_time.
1543
+ # * "REMOVED": indicates that the asset was present at the start of
1544
+ # compare_duration, but not present at reference_time.
1545
+ # * "ACTIVE": indicates that the asset was present at both the
1546
+ # start and the end of the time period defined by
1547
+ # compare_duration and reference_time.
1548
+ #
1549
+ # If compare_duration is not specified, then the only possible state_change
1550
+ # is "UNUSED", which will be the state_change set for all assets present at
1551
+ # read_time.
1552
+ #
1553
+ # If this field is set then `state_change` must be a specified field in
1554
+ # `group_by`.
1555
+ # @param read_time [::Google::Protobuf::Timestamp, ::Hash]
1556
+ # Time used as a reference point when filtering assets. The filter is limited
1557
+ # to assets existing at the supplied time and their values are those at that
1558
+ # specific time. Absence of this field will default to the API's version of
1559
+ # NOW.
1560
+ # @param page_token [::String]
1561
+ # The value returned by the last `GroupAssetsResponse`; indicates
1562
+ # that this is a continuation of a prior `GroupAssets` call, and that the
1563
+ # system should return the next page of data.
1564
+ # @param page_size [::Integer]
1565
+ # The maximum number of results to return in a single response. Default is
1566
+ # 10, minimum is 1, maximum is 1000.
1567
+ # @yield [result, operation] Access the result along with the TransportOperation object
1568
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>]
1569
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1570
+ #
1571
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>]
1572
+ #
1573
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1574
+ def group_assets request, options = nil
1575
+ raise ::ArgumentError, "request must be provided" if request.nil?
1576
+
1577
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest
1578
+
1579
+ # Converts hash and nil to an options object
1580
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1581
+
1582
+ # Customize the options with defaults
1583
+ call_metadata = @config.rpcs.group_assets.metadata.to_h
1584
+
1585
+ # Set x-goog-api-client and x-goog-user-project headers
1586
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1587
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1588
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1589
+ transports_version_send: [:rest]
1590
+
1591
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1592
+
1593
+ options.apply_defaults timeout: @config.rpcs.group_assets.timeout,
1594
+ metadata: call_metadata,
1595
+ retry_policy: @config.rpcs.group_assets.retry_policy
1596
+
1597
+ options.apply_defaults timeout: @config.timeout,
1598
+ metadata: @config.metadata,
1599
+ retry_policy: @config.retry_policy
1600
+
1601
+ @security_center_stub.group_assets request, options do |result, operation|
1602
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_assets, "group_by_results", request, result, options
1603
+ yield result, operation if block_given?
1604
+ return result
1605
+ end
1606
+ rescue ::Gapic::Rest::Error => e
1607
+ raise ::Google::Cloud::Error.from_error(e)
1608
+ end
1609
+
1610
+ ##
1611
+ # Filters an organization or source's findings and groups them by their
1612
+ # specified properties.
1613
+ #
1614
+ # To group across all sources provide a `-` as the source id.
1615
+ # Example: /v1/organizations/\\{organization_id}/sources/-/findings,
1616
+ # /v1/folders/\\{folder_id}/sources/-/findings,
1617
+ # /v1/projects/\\{project_id}/sources/-/findings
1618
+ #
1619
+ # @overload group_findings(request, options = nil)
1620
+ # Pass arguments to `group_findings` via a request object, either of type
1621
+ # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash.
1622
+ #
1623
+ # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash]
1624
+ # A request object representing the call parameters. Required. To specify no
1625
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1626
+ # @param options [::Gapic::CallOptions, ::Hash]
1627
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1628
+ #
1629
+ # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil)
1630
+ # Pass arguments to `group_findings` via keyword arguments. Note that at
1631
+ # least one keyword argument is required. To specify no parameters, or to keep all
1632
+ # the default parameter values, pass an empty Hash as a request object (see above).
1633
+ #
1634
+ # @param parent [::String]
1635
+ # Required. Name of the source to groupBy. Its format is
1636
+ # "organizations/[organization_id]/sources/[source_id]",
1637
+ # folders/[folder_id]/sources/[source_id], or
1638
+ # projects/[project_id]/sources/[source_id]. To groupBy across all sources
1639
+ # provide a source_id of `-`. For example:
1640
+ # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/-,
1641
+ # or projects/\\{project_id}/sources/-
1642
+ # @param filter [::String]
1643
+ # Expression that defines the filter to apply across findings.
1644
+ # The expression is a list of one or more restrictions combined via logical
1645
+ # operators `AND` and `OR`.
1646
+ # Parentheses are supported, and `OR` has higher precedence than `AND`.
1647
+ #
1648
+ # Restrictions have the form `<field> <operator> <value>` and may have a `-`
1649
+ # character in front of them to indicate negation. Examples include:
1650
+ #
1651
+ # * name
1652
+ # * source_properties.a_property
1653
+ # * security_marks.marks.marka
1654
+ #
1655
+ # The supported operators are:
1656
+ #
1657
+ # * `=` for all value types.
1658
+ # * `>`, `<`, `>=`, `<=` for integer values.
1659
+ # * `:`, meaning substring matching, for strings.
1660
+ #
1661
+ # The supported value types are:
1662
+ #
1663
+ # * string literals in quotes.
1664
+ # * integer literals without quotes.
1665
+ # * boolean literals `true` and `false` without quotes.
1666
+ #
1667
+ # The following field and operator combinations are supported:
1668
+ #
1669
+ # * name: `=`
1670
+ # * parent: `=`, `:`
1671
+ # * resource_name: `=`, `:`
1672
+ # * state: `=`, `:`
1673
+ # * category: `=`, `:`
1674
+ # * external_uri: `=`, `:`
1675
+ # * event_time: `=`, `>`, `<`, `>=`, `<=`
1676
+ #
1677
+ # Usage: This should be milliseconds since epoch or an RFC3339 string.
1678
+ # Examples:
1679
+ # `event_time = "2019-06-10T16:07:18-07:00"`
1680
+ # `event_time = 1560208038000`
1681
+ #
1682
+ # * severity: `=`, `:`
1683
+ # * workflow_state: `=`, `:`
1684
+ # * security_marks.marks: `=`, `:`
1685
+ # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
1686
+ #
1687
+ # For example, `source_properties.size = 100` is a valid filter string.
1688
+ #
1689
+ # Use a partial match on the empty string to filter based on a property
1690
+ # existing: `source_properties.my_property : ""`
1691
+ #
1692
+ # Use a negated partial match on the empty string to filter based on a
1693
+ # property not existing: `-source_properties.my_property : ""`
1694
+ #
1695
+ # * resource:
1696
+ # * resource.name: `=`, `:`
1697
+ # * resource.parent_name: `=`, `:`
1698
+ # * resource.parent_display_name: `=`, `:`
1699
+ # * resource.project_name: `=`, `:`
1700
+ # * resource.project_display_name: `=`, `:`
1701
+ # * resource.type: `=`, `:`
1702
+ # @param group_by [::String]
1703
+ # Required. Expression that defines what assets fields to use for grouping
1704
+ # (including `state_change`). The string value should follow SQL syntax:
1705
+ # comma separated list of fields. For example: "parent,resource_name".
1706
+ #
1707
+ # The following fields are supported:
1708
+ #
1709
+ # * resource_name
1710
+ # * category
1711
+ # * state
1712
+ # * parent
1713
+ # * severity
1714
+ #
1715
+ # The following fields are supported when compare_duration is set:
1716
+ #
1717
+ # * state_change
1718
+ # @param read_time [::Google::Protobuf::Timestamp, ::Hash]
1719
+ # Time used as a reference point when filtering findings. The filter is
1720
+ # limited to findings existing at the supplied time and their values are
1721
+ # those at that specific time. Absence of this field will default to the
1722
+ # API's version of NOW.
1723
+ # @param compare_duration [::Google::Protobuf::Duration, ::Hash]
1724
+ # When compare_duration is set, the GroupResult's "state_change" attribute is
1725
+ # updated to indicate whether the finding had its state changed, the
1726
+ # finding's state remained unchanged, or if the finding was added during the
1727
+ # compare_duration period of time that precedes the read_time. This is the
1728
+ # time between (read_time - compare_duration) and read_time.
1729
+ #
1730
+ # The state_change value is derived based on the presence and state of the
1731
+ # finding at the two points in time. Intermediate state changes between the
1732
+ # two times don't affect the result. For example, the results aren't affected
1733
+ # if the finding is made inactive and then active again.
1734
+ #
1735
+ # Possible "state_change" values when compare_duration is specified:
1736
+ #
1737
+ # * "CHANGED": indicates that the finding was present and matched the given
1738
+ # filter at the start of compare_duration, but changed its
1739
+ # state at read_time.
1740
+ # * "UNCHANGED": indicates that the finding was present and matched the given
1741
+ # filter at the start of compare_duration and did not change
1742
+ # state at read_time.
1743
+ # * "ADDED": indicates that the finding did not match the given filter or
1744
+ # was not present at the start of compare_duration, but was
1745
+ # present at read_time.
1746
+ # * "REMOVED": indicates that the finding was present and matched the
1747
+ # filter at the start of compare_duration, but did not match
1748
+ # the filter at read_time.
1749
+ #
1750
+ # If compare_duration is not specified, then the only possible state_change
1751
+ # is "UNUSED", which will be the state_change set for all findings present
1752
+ # at read_time.
1753
+ #
1754
+ # If this field is set then `state_change` must be a specified field in
1755
+ # `group_by`.
1756
+ # @param page_token [::String]
1757
+ # The value returned by the last `GroupFindingsResponse`; indicates
1758
+ # that this is a continuation of a prior `GroupFindings` call, and
1759
+ # that the system should return the next page of data.
1760
+ # @param page_size [::Integer]
1761
+ # The maximum number of results to return in a single response. Default is
1762
+ # 10, minimum is 1, maximum is 1000.
1763
+ # @yield [result, operation] Access the result along with the TransportOperation object
1764
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>]
1765
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1766
+ #
1767
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>]
1768
+ #
1769
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1770
+ def group_findings request, options = nil
1771
+ raise ::ArgumentError, "request must be provided" if request.nil?
1772
+
1773
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest
1774
+
1775
+ # Converts hash and nil to an options object
1776
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1777
+
1778
+ # Customize the options with defaults
1779
+ call_metadata = @config.rpcs.group_findings.metadata.to_h
1780
+
1781
+ # Set x-goog-api-client and x-goog-user-project headers
1782
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1783
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1784
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1785
+ transports_version_send: [:rest]
1786
+
1787
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1788
+
1789
+ options.apply_defaults timeout: @config.rpcs.group_findings.timeout,
1790
+ metadata: call_metadata,
1791
+ retry_policy: @config.rpcs.group_findings.retry_policy
1792
+
1793
+ options.apply_defaults timeout: @config.timeout,
1794
+ metadata: @config.metadata,
1795
+ retry_policy: @config.retry_policy
1796
+
1797
+ @security_center_stub.group_findings request, options do |result, operation|
1798
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options
1799
+ yield result, operation if block_given?
1800
+ return result
1801
+ end
1802
+ rescue ::Gapic::Rest::Error => e
1803
+ raise ::Google::Cloud::Error.from_error(e)
1804
+ end
1805
+
1806
+ ##
1807
+ # Lists an organization's assets.
1808
+ #
1809
+ # @overload list_assets(request, options = nil)
1810
+ # Pass arguments to `list_assets` via a request object, either of type
1811
+ # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash.
1812
+ #
1813
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash]
1814
+ # A request object representing the call parameters. Required. To specify no
1815
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1816
+ # @param options [::Gapic::CallOptions, ::Hash]
1817
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1818
+ #
1819
+ # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil)
1820
+ # Pass arguments to `list_assets` via keyword arguments. Note that at
1821
+ # least one keyword argument is required. To specify no parameters, or to keep all
1822
+ # the default parameter values, pass an empty Hash as a request object (see above).
1823
+ #
1824
+ # @param parent [::String]
1825
+ # Required. The name of the parent resource that contains the assets. The
1826
+ # value that you can specify on parent depends on the method in which you
1827
+ # specify parent. You can specify one of the following values:
1828
+ # "organizations/[organization_id]", "folders/[folder_id]", or
1829
+ # "projects/[project_id]".
1830
+ # @param filter [::String]
1831
+ # Expression that defines the filter to apply across assets.
1832
+ # The expression is a list of zero or more restrictions combined via logical
1833
+ # operators `AND` and `OR`.
1834
+ # Parentheses are supported, and `OR` has higher precedence than `AND`.
1835
+ #
1836
+ # Restrictions have the form `<field> <operator> <value>` and may have a `-`
1837
+ # character in front of them to indicate negation. The fields map to those
1838
+ # defined in the Asset resource. Examples include:
1839
+ #
1840
+ # * name
1841
+ # * security_center_properties.resource_name
1842
+ # * resource_properties.a_property
1843
+ # * security_marks.marks.marka
1844
+ #
1845
+ # The supported operators are:
1846
+ #
1847
+ # * `=` for all value types.
1848
+ # * `>`, `<`, `>=`, `<=` for integer values.
1849
+ # * `:`, meaning substring matching, for strings.
1850
+ #
1851
+ # The supported value types are:
1852
+ #
1853
+ # * string literals in quotes.
1854
+ # * integer literals without quotes.
1855
+ # * boolean literals `true` and `false` without quotes.
1856
+ #
1857
+ # The following are the allowed field and operator combinations:
1858
+ #
1859
+ # * name: `=`
1860
+ # * update_time: `=`, `>`, `<`, `>=`, `<=`
1861
+ #
1862
+ # Usage: This should be milliseconds since epoch or an RFC3339 string.
1863
+ # Examples:
1864
+ # `update_time = "2019-06-10T16:07:18-07:00"`
1865
+ # `update_time = 1560208038000`
1866
+ #
1867
+ # * create_time: `=`, `>`, `<`, `>=`, `<=`
1868
+ #
1869
+ # Usage: This should be milliseconds since epoch or an RFC3339 string.
1870
+ # Examples:
1871
+ # `create_time = "2019-06-10T16:07:18-07:00"`
1872
+ # `create_time = 1560208038000`
1873
+ #
1874
+ # * iam_policy.policy_blob: `=`, `:`
1875
+ # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
1876
+ # * security_marks.marks: `=`, `:`
1877
+ # * security_center_properties.resource_name: `=`, `:`
1878
+ # * security_center_properties.resource_display_name: `=`, `:`
1879
+ # * security_center_properties.resource_type: `=`, `:`
1880
+ # * security_center_properties.resource_parent: `=`, `:`
1881
+ # * security_center_properties.resource_parent_display_name: `=`, `:`
1882
+ # * security_center_properties.resource_project: `=`, `:`
1883
+ # * security_center_properties.resource_project_display_name: `=`, `:`
1884
+ # * security_center_properties.resource_owners: `=`, `:`
1885
+ #
1886
+ # For example, `resource_properties.size = 100` is a valid filter string.
1887
+ #
1888
+ # Use a partial match on the empty string to filter based on a property
1889
+ # existing: `resource_properties.my_property : ""`
1890
+ #
1891
+ # Use a negated partial match on the empty string to filter based on a
1892
+ # property not existing: `-resource_properties.my_property : ""`
1893
+ # @param order_by [::String]
1894
+ # Expression that defines what fields and order to use for sorting. The
1895
+ # string value should follow SQL syntax: comma separated list of fields. For
1896
+ # example: "name,resource_properties.a_property". The default sorting order
1897
+ # is ascending. To specify descending order for a field, a suffix " desc"
1898
+ # should be appended to the field name. For example: "name
1899
+ # desc,resource_properties.a_property". Redundant space characters in the
1900
+ # syntax are insignificant. "name desc,resource_properties.a_property" and "
1901
+ # name desc , resource_properties.a_property " are equivalent.
1902
+ #
1903
+ # The following fields are supported:
1904
+ # name
1905
+ # update_time
1906
+ # resource_properties
1907
+ # security_marks.marks
1908
+ # security_center_properties.resource_name
1909
+ # security_center_properties.resource_display_name
1910
+ # security_center_properties.resource_parent
1911
+ # security_center_properties.resource_parent_display_name
1912
+ # security_center_properties.resource_project
1913
+ # security_center_properties.resource_project_display_name
1914
+ # security_center_properties.resource_type
1915
+ # @param read_time [::Google::Protobuf::Timestamp, ::Hash]
1916
+ # Time used as a reference point when filtering assets. The filter is limited
1917
+ # to assets existing at the supplied time and their values are those at that
1918
+ # specific time. Absence of this field will default to the API's version of
1919
+ # NOW.
1920
+ # @param compare_duration [::Google::Protobuf::Duration, ::Hash]
1921
+ # When compare_duration is set, the ListAssetsResult's "state_change"
1922
+ # attribute is updated to indicate whether the asset was added, removed, or
1923
+ # remained present during the compare_duration period of time that precedes
1924
+ # the read_time. This is the time between (read_time - compare_duration) and
1925
+ # read_time.
1926
+ #
1927
+ # The state_change value is derived based on the presence of the asset at the
1928
+ # two points in time. Intermediate state changes between the two times don't
1929
+ # affect the result. For example, the results aren't affected if the asset is
1930
+ # removed and re-created again.
1931
+ #
1932
+ # Possible "state_change" values when compare_duration is specified:
1933
+ #
1934
+ # * "ADDED": indicates that the asset was not present at the start of
1935
+ # compare_duration, but present at read_time.
1936
+ # * "REMOVED": indicates that the asset was present at the start of
1937
+ # compare_duration, but not present at read_time.
1938
+ # * "ACTIVE": indicates that the asset was present at both the
1939
+ # start and the end of the time period defined by
1940
+ # compare_duration and read_time.
1941
+ #
1942
+ # If compare_duration is not specified, then the only possible state_change
1943
+ # is "UNUSED", which will be the state_change set for all assets present at
1944
+ # read_time.
1945
+ # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
1946
+ # A field mask to specify the ListAssetsResult fields to be listed in the
1947
+ # response.
1948
+ # An empty field mask will list all fields.
1949
+ # @param page_token [::String]
1950
+ # The value returned by the last `ListAssetsResponse`; indicates
1951
+ # that this is a continuation of a prior `ListAssets` call, and
1952
+ # that the system should return the next page of data.
1953
+ # @param page_size [::Integer]
1954
+ # The maximum number of results to return in a single response. Default is
1955
+ # 10, minimum is 1, maximum is 1000.
1956
+ # @yield [result, operation] Access the result along with the TransportOperation object
1957
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>]
1958
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1959
+ #
1960
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>]
1961
+ #
1962
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1963
+ def list_assets request, options = nil
1964
+ raise ::ArgumentError, "request must be provided" if request.nil?
1965
+
1966
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest
1967
+
1968
+ # Converts hash and nil to an options object
1969
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1970
+
1971
+ # Customize the options with defaults
1972
+ call_metadata = @config.rpcs.list_assets.metadata.to_h
1973
+
1974
+ # Set x-goog-api-client and x-goog-user-project headers
1975
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1976
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1977
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
1978
+ transports_version_send: [:rest]
1979
+
1980
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1981
+
1982
+ options.apply_defaults timeout: @config.rpcs.list_assets.timeout,
1983
+ metadata: call_metadata,
1984
+ retry_policy: @config.rpcs.list_assets.retry_policy
1985
+
1986
+ options.apply_defaults timeout: @config.timeout,
1987
+ metadata: @config.metadata,
1988
+ retry_policy: @config.retry_policy
1989
+
1990
+ @security_center_stub.list_assets request, options do |result, operation|
1991
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_assets, "list_assets_results", request, result, options
1992
+ yield result, operation if block_given?
1993
+ return result
1994
+ end
1995
+ rescue ::Gapic::Rest::Error => e
1996
+ raise ::Google::Cloud::Error.from_error(e)
1997
+ end
1998
+
1999
+ ##
2000
+ # Returns a list of all resident SecurityHealthAnalyticsCustomModules under
2001
+ # the given CRM parent and all of the parent’s CRM descendants.
2002
+ #
2003
+ # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil)
2004
+ # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type
2005
+ # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
2006
+ #
2007
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
2008
+ # A request object representing the call parameters. Required. To specify no
2009
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2010
+ # @param options [::Gapic::CallOptions, ::Hash]
2011
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2012
+ #
2013
+ # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
2014
+ # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at
2015
+ # least one keyword argument is required. To specify no parameters, or to keep all
2016
+ # the default parameter values, pass an empty Hash as a request object (see above).
2017
+ #
2018
+ # @param parent [::String]
2019
+ # Required. Name of parent to list descendant custom modules. Its format is
2020
+ # "organizations/\\{organization}/securityHealthAnalyticsSettings",
2021
+ # "folders/\\{folder}/securityHealthAnalyticsSettings", or
2022
+ # "projects/\\{project}/securityHealthAnalyticsSettings"
2023
+ # @param page_size [::Integer]
2024
+ # The maximum number of results to return in a single response. Default is
2025
+ # 10, minimum is 1, maximum is 1000.
2026
+ # @param page_token [::String]
2027
+ # The value returned by the last call indicating a continuation
2028
+ # @yield [result, operation] Access the result along with the TransportOperation object
2029
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>]
2030
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2031
+ #
2032
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>]
2033
+ #
2034
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2035
+ def list_descendant_security_health_analytics_custom_modules request, options = nil
2036
+ raise ::ArgumentError, "request must be provided" if request.nil?
2037
+
2038
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest
2039
+
2040
+ # Converts hash and nil to an options object
2041
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2042
+
2043
+ # Customize the options with defaults
2044
+ call_metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h
2045
+
2046
+ # Set x-goog-api-client and x-goog-user-project headers
2047
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2048
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2049
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2050
+ transports_version_send: [:rest]
2051
+
2052
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2053
+
2054
+ options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout,
2055
+ metadata: call_metadata,
2056
+ retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy
2057
+
2058
+ options.apply_defaults timeout: @config.timeout,
2059
+ metadata: @config.metadata,
2060
+ retry_policy: @config.retry_policy
2061
+
2062
+ @security_center_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation|
2063
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options
2064
+ yield result, operation if block_given?
2065
+ return result
2066
+ end
2067
+ rescue ::Gapic::Rest::Error => e
2068
+ raise ::Google::Cloud::Error.from_error(e)
2069
+ end
2070
+
2071
+ ##
2072
+ # Lists an organization or source's findings.
2073
+ #
2074
+ # To list across all sources provide a `-` as the source id.
2075
+ # Example: /v1/organizations/\\{organization_id}/sources/-/findings
2076
+ #
2077
+ # @overload list_findings(request, options = nil)
2078
+ # Pass arguments to `list_findings` via a request object, either of type
2079
+ # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash.
2080
+ #
2081
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash]
2082
+ # A request object representing the call parameters. Required. To specify no
2083
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2084
+ # @param options [::Gapic::CallOptions, ::Hash]
2085
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2086
+ #
2087
+ # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil)
2088
+ # Pass arguments to `list_findings` via keyword arguments. Note that at
2089
+ # least one keyword argument is required. To specify no parameters, or to keep all
2090
+ # the default parameter values, pass an empty Hash as a request object (see above).
2091
+ #
2092
+ # @param parent [::String]
2093
+ # Required. Name of the source the findings belong to. Its format is
2094
+ # "organizations/[organization_id]/sources/[source_id],
2095
+ # folders/[folder_id]/sources/[source_id], or
2096
+ # projects/[project_id]/sources/[source_id]". To list across all sources
2097
+ # provide a source_id of `-`. For example:
2098
+ # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/- or
2099
+ # projects/\\{projects_id}/sources/-
2100
+ # @param filter [::String]
2101
+ # Expression that defines the filter to apply across findings.
2102
+ # The expression is a list of one or more restrictions combined via logical
2103
+ # operators `AND` and `OR`.
2104
+ # Parentheses are supported, and `OR` has higher precedence than `AND`.
2105
+ #
2106
+ # Restrictions have the form `<field> <operator> <value>` and may have a `-`
2107
+ # character in front of them to indicate negation. Examples include:
2108
+ #
2109
+ # * name
2110
+ # * source_properties.a_property
2111
+ # * security_marks.marks.marka
2112
+ #
2113
+ # The supported operators are:
2114
+ #
2115
+ # * `=` for all value types.
2116
+ # * `>`, `<`, `>=`, `<=` for integer values.
2117
+ # * `:`, meaning substring matching, for strings.
2118
+ #
2119
+ # The supported value types are:
2120
+ #
2121
+ # * string literals in quotes.
2122
+ # * integer literals without quotes.
2123
+ # * boolean literals `true` and `false` without quotes.
2124
+ #
2125
+ # The following field and operator combinations are supported:
2126
+ #
2127
+ # * name: `=`
2128
+ # * parent: `=`, `:`
2129
+ # * resource_name: `=`, `:`
2130
+ # * state: `=`, `:`
2131
+ # * category: `=`, `:`
2132
+ # * external_uri: `=`, `:`
2133
+ # * event_time: `=`, `>`, `<`, `>=`, `<=`
2134
+ #
2135
+ # Usage: This should be milliseconds since epoch or an RFC3339 string.
2136
+ # Examples:
2137
+ # `event_time = "2019-06-10T16:07:18-07:00"`
2138
+ # `event_time = 1560208038000`
2139
+ #
2140
+ # * severity: `=`, `:`
2141
+ # * workflow_state: `=`, `:`
2142
+ # * security_marks.marks: `=`, `:`
2143
+ # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
2144
+ #
2145
+ # For example, `source_properties.size = 100` is a valid filter string.
2146
+ #
2147
+ # Use a partial match on the empty string to filter based on a property
2148
+ # existing: `source_properties.my_property : ""`
2149
+ #
2150
+ # Use a negated partial match on the empty string to filter based on a
2151
+ # property not existing: `-source_properties.my_property : ""`
2152
+ #
2153
+ # * resource:
2154
+ # * resource.name: `=`, `:`
2155
+ # * resource.parent_name: `=`, `:`
2156
+ # * resource.parent_display_name: `=`, `:`
2157
+ # * resource.project_name: `=`, `:`
2158
+ # * resource.project_display_name: `=`, `:`
2159
+ # * resource.type: `=`, `:`
2160
+ # * resource.folders.resource_folder: `=`, `:`
2161
+ # * resource.display_name: `=`, `:`
2162
+ # @param order_by [::String]
2163
+ # Expression that defines what fields and order to use for sorting. The
2164
+ # string value should follow SQL syntax: comma separated list of fields. For
2165
+ # example: "name,resource_properties.a_property". The default sorting order
2166
+ # is ascending. To specify descending order for a field, a suffix " desc"
2167
+ # should be appended to the field name. For example: "name
2168
+ # desc,source_properties.a_property". Redundant space characters in the
2169
+ # syntax are insignificant. "name desc,source_properties.a_property" and "
2170
+ # name desc , source_properties.a_property " are equivalent.
2171
+ #
2172
+ # The following fields are supported:
2173
+ # name
2174
+ # parent
2175
+ # state
2176
+ # category
2177
+ # resource_name
2178
+ # event_time
2179
+ # source_properties
2180
+ # security_marks.marks
2181
+ # @param read_time [::Google::Protobuf::Timestamp, ::Hash]
2182
+ # Time used as a reference point when filtering findings. The filter is
2183
+ # limited to findings existing at the supplied time and their values are
2184
+ # those at that specific time. Absence of this field will default to the
2185
+ # API's version of NOW.
2186
+ # @param compare_duration [::Google::Protobuf::Duration, ::Hash]
2187
+ # When compare_duration is set, the ListFindingsResult's "state_change"
2188
+ # attribute is updated to indicate whether the finding had its state changed,
2189
+ # the finding's state remained unchanged, or if the finding was added in any
2190
+ # state during the compare_duration period of time that precedes the
2191
+ # read_time. This is the time between (read_time - compare_duration) and
2192
+ # read_time.
2193
+ #
2194
+ # The state_change value is derived based on the presence and state of the
2195
+ # finding at the two points in time. Intermediate state changes between the
2196
+ # two times don't affect the result. For example, the results aren't affected
2197
+ # if the finding is made inactive and then active again.
2198
+ #
2199
+ # Possible "state_change" values when compare_duration is specified:
2200
+ #
2201
+ # * "CHANGED": indicates that the finding was present and matched the given
2202
+ # filter at the start of compare_duration, but changed its
2203
+ # state at read_time.
2204
+ # * "UNCHANGED": indicates that the finding was present and matched the given
2205
+ # filter at the start of compare_duration and did not change
2206
+ # state at read_time.
2207
+ # * "ADDED": indicates that the finding did not match the given filter or
2208
+ # was not present at the start of compare_duration, but was
2209
+ # present at read_time.
2210
+ # * "REMOVED": indicates that the finding was present and matched the
2211
+ # filter at the start of compare_duration, but did not match
2212
+ # the filter at read_time.
2213
+ #
2214
+ # If compare_duration is not specified, then the only possible state_change
2215
+ # is "UNUSED", which will be the state_change set for all findings present at
2216
+ # read_time.
2217
+ # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
2218
+ # A field mask to specify the Finding fields to be listed in the response.
2219
+ # An empty field mask will list all fields.
2220
+ # @param page_token [::String]
2221
+ # The value returned by the last `ListFindingsResponse`; indicates
2222
+ # that this is a continuation of a prior `ListFindings` call, and
2223
+ # that the system should return the next page of data.
2224
+ # @param page_size [::Integer]
2225
+ # The maximum number of results to return in a single response. Default is
2226
+ # 10, minimum is 1, maximum is 1000.
2227
+ # @yield [result, operation] Access the result along with the TransportOperation object
2228
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>]
2229
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2230
+ #
2231
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>]
2232
+ #
2233
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2234
+ def list_findings request, options = nil
2235
+ raise ::ArgumentError, "request must be provided" if request.nil?
2236
+
2237
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest
2238
+
2239
+ # Converts hash and nil to an options object
2240
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2241
+
2242
+ # Customize the options with defaults
2243
+ call_metadata = @config.rpcs.list_findings.metadata.to_h
2244
+
2245
+ # Set x-goog-api-client and x-goog-user-project headers
2246
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2247
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2248
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2249
+ transports_version_send: [:rest]
2250
+
2251
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2252
+
2253
+ options.apply_defaults timeout: @config.rpcs.list_findings.timeout,
2254
+ metadata: call_metadata,
2255
+ retry_policy: @config.rpcs.list_findings.retry_policy
2256
+
2257
+ options.apply_defaults timeout: @config.timeout,
2258
+ metadata: @config.metadata,
2259
+ retry_policy: @config.retry_policy
2260
+
2261
+ @security_center_stub.list_findings request, options do |result, operation|
2262
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options
2263
+ yield result, operation if block_given?
2264
+ return result
2265
+ end
2266
+ rescue ::Gapic::Rest::Error => e
2267
+ raise ::Google::Cloud::Error.from_error(e)
2268
+ end
2269
+
2270
+ ##
2271
+ # Lists mute configs.
2272
+ #
2273
+ # @overload list_mute_configs(request, options = nil)
2274
+ # Pass arguments to `list_mute_configs` via a request object, either of type
2275
+ # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash.
2276
+ #
2277
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash]
2278
+ # A request object representing the call parameters. Required. To specify no
2279
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2280
+ # @param options [::Gapic::CallOptions, ::Hash]
2281
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2282
+ #
2283
+ # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil)
2284
+ # Pass arguments to `list_mute_configs` via keyword arguments. Note that at
2285
+ # least one keyword argument is required. To specify no parameters, or to keep all
2286
+ # the default parameter values, pass an empty Hash as a request object (see above).
2287
+ #
2288
+ # @param parent [::String]
2289
+ # Required. The parent, which owns the collection of mute configs. Its format
2290
+ # is "organizations/[organization_id]", "folders/[folder_id]",
2291
+ # "projects/[project_id]".
2292
+ # @param page_size [::Integer]
2293
+ # The maximum number of configs to return. The service may return fewer than
2294
+ # this value.
2295
+ # If unspecified, at most 10 configs will be returned.
2296
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
2297
+ # @param page_token [::String]
2298
+ # A page token, received from a previous `ListMuteConfigs` call.
2299
+ # Provide this to retrieve the subsequent page.
2300
+ #
2301
+ # When paginating, all other parameters provided to `ListMuteConfigs` must
2302
+ # match the call that provided the page token.
2303
+ # @yield [result, operation] Access the result along with the TransportOperation object
2304
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>]
2305
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2306
+ #
2307
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>]
2308
+ #
2309
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2310
+ def list_mute_configs request, options = nil
2311
+ raise ::ArgumentError, "request must be provided" if request.nil?
2312
+
2313
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest
2314
+
2315
+ # Converts hash and nil to an options object
2316
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2317
+
2318
+ # Customize the options with defaults
2319
+ call_metadata = @config.rpcs.list_mute_configs.metadata.to_h
2320
+
2321
+ # Set x-goog-api-client and x-goog-user-project headers
2322
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2323
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2324
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2325
+ transports_version_send: [:rest]
2326
+
2327
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2328
+
2329
+ options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout,
2330
+ metadata: call_metadata,
2331
+ retry_policy: @config.rpcs.list_mute_configs.retry_policy
2332
+
2333
+ options.apply_defaults timeout: @config.timeout,
2334
+ metadata: @config.metadata,
2335
+ retry_policy: @config.retry_policy
2336
+
2337
+ @security_center_stub.list_mute_configs request, options do |result, operation|
2338
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options
2339
+ yield result, operation if block_given?
2340
+ return result
2341
+ end
2342
+ rescue ::Gapic::Rest::Error => e
2343
+ raise ::Google::Cloud::Error.from_error(e)
2344
+ end
2345
+
2346
+ ##
2347
+ # Lists notification configs.
2348
+ #
2349
+ # @overload list_notification_configs(request, options = nil)
2350
+ # Pass arguments to `list_notification_configs` via a request object, either of type
2351
+ # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash.
2352
+ #
2353
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash]
2354
+ # A request object representing the call parameters. Required. To specify no
2355
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2356
+ # @param options [::Gapic::CallOptions, ::Hash]
2357
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2358
+ #
2359
+ # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil)
2360
+ # Pass arguments to `list_notification_configs` via keyword arguments. Note that at
2361
+ # least one keyword argument is required. To specify no parameters, or to keep all
2362
+ # the default parameter values, pass an empty Hash as a request object (see above).
2363
+ #
2364
+ # @param parent [::String]
2365
+ # Required. The name of the parent in which to list the notification
2366
+ # configurations. Its format is "organizations/[organization_id]",
2367
+ # "folders/[folder_id]", or "projects/[project_id]".
2368
+ # @param page_token [::String]
2369
+ # The value returned by the last `ListNotificationConfigsResponse`; indicates
2370
+ # that this is a continuation of a prior `ListNotificationConfigs` call, and
2371
+ # that the system should return the next page of data.
2372
+ # @param page_size [::Integer]
2373
+ # The maximum number of results to return in a single response. Default is
2374
+ # 10, minimum is 1, maximum is 1000.
2375
+ # @yield [result, operation] Access the result along with the TransportOperation object
2376
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>]
2377
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2378
+ #
2379
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>]
2380
+ #
2381
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2382
+ def list_notification_configs request, options = nil
2383
+ raise ::ArgumentError, "request must be provided" if request.nil?
2384
+
2385
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest
2386
+
2387
+ # Converts hash and nil to an options object
2388
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2389
+
2390
+ # Customize the options with defaults
2391
+ call_metadata = @config.rpcs.list_notification_configs.metadata.to_h
2392
+
2393
+ # Set x-goog-api-client and x-goog-user-project headers
2394
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2395
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2396
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2397
+ transports_version_send: [:rest]
2398
+
2399
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2400
+
2401
+ options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout,
2402
+ metadata: call_metadata,
2403
+ retry_policy: @config.rpcs.list_notification_configs.retry_policy
2404
+
2405
+ options.apply_defaults timeout: @config.timeout,
2406
+ metadata: @config.metadata,
2407
+ retry_policy: @config.retry_policy
2408
+
2409
+ @security_center_stub.list_notification_configs request, options do |result, operation|
2410
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options
2411
+ yield result, operation if block_given?
2412
+ return result
2413
+ end
2414
+ rescue ::Gapic::Rest::Error => e
2415
+ raise ::Google::Cloud::Error.from_error(e)
2416
+ end
2417
+
2418
+ ##
2419
+ # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the
2420
+ # given parent. This includes resident modules defined at the scope of the
2421
+ # parent, and inherited modules, inherited from CRM ancestors.
2422
+ #
2423
+ # @overload list_effective_security_health_analytics_custom_modules(request, options = nil)
2424
+ # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type
2425
+ # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
2426
+ #
2427
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
2428
+ # A request object representing the call parameters. Required. To specify no
2429
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2430
+ # @param options [::Gapic::CallOptions, ::Hash]
2431
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2432
+ #
2433
+ # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
2434
+ # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at
2435
+ # least one keyword argument is required. To specify no parameters, or to keep all
2436
+ # the default parameter values, pass an empty Hash as a request object (see above).
2437
+ #
2438
+ # @param parent [::String]
2439
+ # Required. Name of parent to list effective custom modules. Its format is
2440
+ # "organizations/\\{organization}/securityHealthAnalyticsSettings",
2441
+ # "folders/\\{folder}/securityHealthAnalyticsSettings", or
2442
+ # "projects/\\{project}/securityHealthAnalyticsSettings"
2443
+ # @param page_size [::Integer]
2444
+ # The maximum number of results to return in a single response. Default is
2445
+ # 10, minimum is 1, maximum is 1000.
2446
+ # @param page_token [::String]
2447
+ # The value returned by the last call indicating a continuation
2448
+ # @yield [result, operation] Access the result along with the TransportOperation object
2449
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>]
2450
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2451
+ #
2452
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>]
2453
+ #
2454
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2455
+ def list_effective_security_health_analytics_custom_modules request, options = nil
2456
+ raise ::ArgumentError, "request must be provided" if request.nil?
2457
+
2458
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest
2459
+
2460
+ # Converts hash and nil to an options object
2461
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2462
+
2463
+ # Customize the options with defaults
2464
+ call_metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h
2465
+
2466
+ # Set x-goog-api-client and x-goog-user-project headers
2467
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2468
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2469
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2470
+ transports_version_send: [:rest]
2471
+
2472
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2473
+
2474
+ options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout,
2475
+ metadata: call_metadata,
2476
+ retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy
2477
+
2478
+ options.apply_defaults timeout: @config.timeout,
2479
+ metadata: @config.metadata,
2480
+ retry_policy: @config.retry_policy
2481
+
2482
+ @security_center_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation|
2483
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options
2484
+ yield result, operation if block_given?
2485
+ return result
2486
+ end
2487
+ rescue ::Gapic::Rest::Error => e
2488
+ raise ::Google::Cloud::Error.from_error(e)
2489
+ end
2490
+
2491
+ ##
2492
+ # Returns a list of all SecurityHealthAnalyticsCustomModules for the given
2493
+ # parent. This includes resident modules defined at the scope of the parent,
2494
+ # and inherited modules, inherited from CRM ancestors.
2495
+ #
2496
+ # @overload list_security_health_analytics_custom_modules(request, options = nil)
2497
+ # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type
2498
+ # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
2499
+ #
2500
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
2501
+ # A request object representing the call parameters. Required. To specify no
2502
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2503
+ # @param options [::Gapic::CallOptions, ::Hash]
2504
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2505
+ #
2506
+ # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
2507
+ # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at
2508
+ # least one keyword argument is required. To specify no parameters, or to keep all
2509
+ # the default parameter values, pass an empty Hash as a request object (see above).
2510
+ #
2511
+ # @param parent [::String]
2512
+ # Required. Name of parent to list custom modules. Its format is
2513
+ # "organizations/\\{organization}/securityHealthAnalyticsSettings",
2514
+ # "folders/\\{folder}/securityHealthAnalyticsSettings", or
2515
+ # "projects/\\{project}/securityHealthAnalyticsSettings"
2516
+ # @param page_size [::Integer]
2517
+ # The maximum number of results to return in a single response. Default is
2518
+ # 10, minimum is 1, maximum is 1000.
2519
+ # @param page_token [::String]
2520
+ # The value returned by the last call indicating a continuation
2521
+ # @yield [result, operation] Access the result along with the TransportOperation object
2522
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>]
2523
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2524
+ #
2525
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>]
2526
+ #
2527
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2528
+ def list_security_health_analytics_custom_modules request, options = nil
2529
+ raise ::ArgumentError, "request must be provided" if request.nil?
2530
+
2531
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest
2532
+
2533
+ # Converts hash and nil to an options object
2534
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2535
+
2536
+ # Customize the options with defaults
2537
+ call_metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h
2538
+
2539
+ # Set x-goog-api-client and x-goog-user-project headers
2540
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2541
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2542
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2543
+ transports_version_send: [:rest]
2544
+
2545
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2546
+
2547
+ options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout,
2548
+ metadata: call_metadata,
2549
+ retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy
2550
+
2551
+ options.apply_defaults timeout: @config.timeout,
2552
+ metadata: @config.metadata,
2553
+ retry_policy: @config.retry_policy
2554
+
2555
+ @security_center_stub.list_security_health_analytics_custom_modules request, options do |result, operation|
2556
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options
2557
+ yield result, operation if block_given?
2558
+ return result
2559
+ end
2560
+ rescue ::Gapic::Rest::Error => e
2561
+ raise ::Google::Cloud::Error.from_error(e)
2562
+ end
2563
+
2564
+ ##
2565
+ # Lists all sources belonging to an organization.
2566
+ #
2567
+ # @overload list_sources(request, options = nil)
2568
+ # Pass arguments to `list_sources` via a request object, either of type
2569
+ # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash.
2570
+ #
2571
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash]
2572
+ # A request object representing the call parameters. Required. To specify no
2573
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2574
+ # @param options [::Gapic::CallOptions, ::Hash]
2575
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2576
+ #
2577
+ # @overload list_sources(parent: nil, page_token: nil, page_size: nil)
2578
+ # Pass arguments to `list_sources` via keyword arguments. Note that at
2579
+ # least one keyword argument is required. To specify no parameters, or to keep all
2580
+ # the default parameter values, pass an empty Hash as a request object (see above).
2581
+ #
2582
+ # @param parent [::String]
2583
+ # Required. Resource name of the parent of sources to list. Its format should
2584
+ # be "organizations/[organization_id]", "folders/[folder_id]", or
2585
+ # "projects/[project_id]".
2586
+ # @param page_token [::String]
2587
+ # The value returned by the last `ListSourcesResponse`; indicates
2588
+ # that this is a continuation of a prior `ListSources` call, and
2589
+ # that the system should return the next page of data.
2590
+ # @param page_size [::Integer]
2591
+ # The maximum number of results to return in a single response. Default is
2592
+ # 10, minimum is 1, maximum is 1000.
2593
+ # @yield [result, operation] Access the result along with the TransportOperation object
2594
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>]
2595
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2596
+ #
2597
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>]
2598
+ #
2599
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2600
+ def list_sources request, options = nil
2601
+ raise ::ArgumentError, "request must be provided" if request.nil?
2602
+
2603
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest
2604
+
2605
+ # Converts hash and nil to an options object
2606
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2607
+
2608
+ # Customize the options with defaults
2609
+ call_metadata = @config.rpcs.list_sources.metadata.to_h
2610
+
2611
+ # Set x-goog-api-client and x-goog-user-project headers
2612
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2613
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2614
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2615
+ transports_version_send: [:rest]
2616
+
2617
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2618
+
2619
+ options.apply_defaults timeout: @config.rpcs.list_sources.timeout,
2620
+ metadata: call_metadata,
2621
+ retry_policy: @config.rpcs.list_sources.retry_policy
2622
+
2623
+ options.apply_defaults timeout: @config.timeout,
2624
+ metadata: @config.metadata,
2625
+ retry_policy: @config.retry_policy
2626
+
2627
+ @security_center_stub.list_sources request, options do |result, operation|
2628
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options
2629
+ yield result, operation if block_given?
2630
+ return result
2631
+ end
2632
+ rescue ::Gapic::Rest::Error => e
2633
+ raise ::Google::Cloud::Error.from_error(e)
2634
+ end
2635
+
2636
+ ##
2637
+ # Runs asset discovery. The discovery is tracked with a long-running
2638
+ # operation.
2639
+ #
2640
+ # This API can only be called with limited frequency for an organization. If
2641
+ # it is called too frequently the caller will receive a TOO_MANY_REQUESTS
2642
+ # error.
2643
+ #
2644
+ # @overload run_asset_discovery(request, options = nil)
2645
+ # Pass arguments to `run_asset_discovery` via a request object, either of type
2646
+ # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash.
2647
+ #
2648
+ # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash]
2649
+ # A request object representing the call parameters. Required. To specify no
2650
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2651
+ # @param options [::Gapic::CallOptions, ::Hash]
2652
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2653
+ #
2654
+ # @overload run_asset_discovery(parent: nil)
2655
+ # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at
2656
+ # least one keyword argument is required. To specify no parameters, or to keep all
2657
+ # the default parameter values, pass an empty Hash as a request object (see above).
2658
+ #
2659
+ # @param parent [::String]
2660
+ # Required. Name of the organization to run asset discovery for. Its format
2661
+ # is "organizations/[organization_id]".
2662
+ # @yield [result, operation] Access the result along with the TransportOperation object
2663
+ # @yieldparam result [::Gapic::Operation]
2664
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2665
+ #
2666
+ # @return [::Gapic::Operation]
2667
+ #
2668
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2669
+ def run_asset_discovery request, options = nil
2670
+ raise ::ArgumentError, "request must be provided" if request.nil?
2671
+
2672
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest
2673
+
2674
+ # Converts hash and nil to an options object
2675
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2676
+
2677
+ # Customize the options with defaults
2678
+ call_metadata = @config.rpcs.run_asset_discovery.metadata.to_h
2679
+
2680
+ # Set x-goog-api-client and x-goog-user-project headers
2681
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2682
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2683
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2684
+ transports_version_send: [:rest]
2685
+
2686
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2687
+
2688
+ options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout,
2689
+ metadata: call_metadata,
2690
+ retry_policy: @config.rpcs.run_asset_discovery.retry_policy
2691
+
2692
+ options.apply_defaults timeout: @config.timeout,
2693
+ metadata: @config.metadata,
2694
+ retry_policy: @config.retry_policy
2695
+
2696
+ @security_center_stub.run_asset_discovery request, options do |result, operation|
2697
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2698
+ yield result, operation if block_given?
2699
+ return result
2700
+ end
2701
+ rescue ::Gapic::Rest::Error => e
2702
+ raise ::Google::Cloud::Error.from_error(e)
2703
+ end
2704
+
2705
+ ##
2706
+ # Updates the state of a finding.
2707
+ #
2708
+ # @overload set_finding_state(request, options = nil)
2709
+ # Pass arguments to `set_finding_state` via a request object, either of type
2710
+ # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash.
2711
+ #
2712
+ # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash]
2713
+ # A request object representing the call parameters. Required. To specify no
2714
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2715
+ # @param options [::Gapic::CallOptions, ::Hash]
2716
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2717
+ #
2718
+ # @overload set_finding_state(name: nil, state: nil, start_time: nil)
2719
+ # Pass arguments to `set_finding_state` via keyword arguments. Note that at
2720
+ # least one keyword argument is required. To specify no parameters, or to keep all
2721
+ # the default parameter values, pass an empty Hash as a request object (see above).
2722
+ #
2723
+ # @param name [::String]
2724
+ # Required. The [relative resource
2725
+ # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
2726
+ # of the finding. Example:
2727
+ # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}",
2728
+ # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}",
2729
+ # "projects/\\{project_id}/sources/\\{source_id}/findings/\\{finding_id}".
2730
+ # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State]
2731
+ # Required. The desired State of the finding.
2732
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
2733
+ # Required. The time at which the updated state takes effect.
2734
+ # @yield [result, operation] Access the result along with the TransportOperation object
2735
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding]
2736
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2737
+ #
2738
+ # @return [::Google::Cloud::SecurityCenter::V1::Finding]
2739
+ #
2740
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2741
+ def set_finding_state request, options = nil
2742
+ raise ::ArgumentError, "request must be provided" if request.nil?
2743
+
2744
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest
2745
+
2746
+ # Converts hash and nil to an options object
2747
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2748
+
2749
+ # Customize the options with defaults
2750
+ call_metadata = @config.rpcs.set_finding_state.metadata.to_h
2751
+
2752
+ # Set x-goog-api-client and x-goog-user-project headers
2753
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2754
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2755
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2756
+ transports_version_send: [:rest]
2757
+
2758
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2759
+
2760
+ options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout,
2761
+ metadata: call_metadata,
2762
+ retry_policy: @config.rpcs.set_finding_state.retry_policy
2763
+
2764
+ options.apply_defaults timeout: @config.timeout,
2765
+ metadata: @config.metadata,
2766
+ retry_policy: @config.retry_policy
2767
+
2768
+ @security_center_stub.set_finding_state request, options do |result, operation|
2769
+ yield result, operation if block_given?
2770
+ return result
2771
+ end
2772
+ rescue ::Gapic::Rest::Error => e
2773
+ raise ::Google::Cloud::Error.from_error(e)
2774
+ end
2775
+
2776
+ ##
2777
+ # Updates the mute state of a finding.
2778
+ #
2779
+ # @overload set_mute(request, options = nil)
2780
+ # Pass arguments to `set_mute` via a request object, either of type
2781
+ # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash.
2782
+ #
2783
+ # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash]
2784
+ # A request object representing the call parameters. Required. To specify no
2785
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2786
+ # @param options [::Gapic::CallOptions, ::Hash]
2787
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2788
+ #
2789
+ # @overload set_mute(name: nil, mute: nil)
2790
+ # Pass arguments to `set_mute` via keyword arguments. Note that at
2791
+ # least one keyword argument is required. To specify no parameters, or to keep all
2792
+ # the default parameter values, pass an empty Hash as a request object (see above).
2793
+ #
2794
+ # @param name [::String]
2795
+ # Required. The [relative resource
2796
+ # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
2797
+ # of the finding. Example:
2798
+ # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}",
2799
+ # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}",
2800
+ # "projects/\\{project_id}/sources/\\{source_id}/findings/\\{finding_id}".
2801
+ # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute]
2802
+ # Required. The desired state of the Mute.
2803
+ # @yield [result, operation] Access the result along with the TransportOperation object
2804
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding]
2805
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2806
+ #
2807
+ # @return [::Google::Cloud::SecurityCenter::V1::Finding]
2808
+ #
2809
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2810
+ def set_mute request, options = nil
2811
+ raise ::ArgumentError, "request must be provided" if request.nil?
2812
+
2813
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest
2814
+
2815
+ # Converts hash and nil to an options object
2816
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2817
+
2818
+ # Customize the options with defaults
2819
+ call_metadata = @config.rpcs.set_mute.metadata.to_h
2820
+
2821
+ # Set x-goog-api-client and x-goog-user-project headers
2822
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2823
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2824
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2825
+ transports_version_send: [:rest]
2826
+
2827
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2828
+
2829
+ options.apply_defaults timeout: @config.rpcs.set_mute.timeout,
2830
+ metadata: call_metadata,
2831
+ retry_policy: @config.rpcs.set_mute.retry_policy
2832
+
2833
+ options.apply_defaults timeout: @config.timeout,
2834
+ metadata: @config.metadata,
2835
+ retry_policy: @config.retry_policy
2836
+
2837
+ @security_center_stub.set_mute request, options do |result, operation|
2838
+ yield result, operation if block_given?
2839
+ return result
2840
+ end
2841
+ rescue ::Gapic::Rest::Error => e
2842
+ raise ::Google::Cloud::Error.from_error(e)
2843
+ end
2844
+
2845
+ ##
2846
+ # Sets the access control policy on the specified Source.
2847
+ #
2848
+ # @overload set_iam_policy(request, options = nil)
2849
+ # Pass arguments to `set_iam_policy` via a request object, either of type
2850
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
2851
+ #
2852
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
2853
+ # A request object representing the call parameters. Required. To specify no
2854
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2855
+ # @param options [::Gapic::CallOptions, ::Hash]
2856
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2857
+ #
2858
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
2859
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
2860
+ # least one keyword argument is required. To specify no parameters, or to keep all
2861
+ # the default parameter values, pass an empty Hash as a request object (see above).
2862
+ #
2863
+ # @param resource [::String]
2864
+ # REQUIRED: The resource for which the policy is being specified.
2865
+ # See the operation documentation for the appropriate value for this field.
2866
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
2867
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
2868
+ # the policy is limited to a few 10s of KB. An empty policy is a
2869
+ # valid policy but certain Cloud Platform services (such as Projects)
2870
+ # might reject them.
2871
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2872
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
2873
+ # the fields in the mask will be modified. If no mask is provided, the
2874
+ # following default mask is used:
2875
+ #
2876
+ # `paths: "bindings, etag"`
2877
+ # @yield [result, operation] Access the result along with the TransportOperation object
2878
+ # @yieldparam result [::Google::Iam::V1::Policy]
2879
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2880
+ #
2881
+ # @return [::Google::Iam::V1::Policy]
2882
+ #
2883
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2884
+ def set_iam_policy request, options = nil
2885
+ raise ::ArgumentError, "request must be provided" if request.nil?
2886
+
2887
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
2888
+
2889
+ # Converts hash and nil to an options object
2890
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2891
+
2892
+ # Customize the options with defaults
2893
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
2894
+
2895
+ # Set x-goog-api-client and x-goog-user-project headers
2896
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2897
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2898
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2899
+ transports_version_send: [:rest]
2900
+
2901
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2902
+
2903
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
2904
+ metadata: call_metadata,
2905
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
2906
+
2907
+ options.apply_defaults timeout: @config.timeout,
2908
+ metadata: @config.metadata,
2909
+ retry_policy: @config.retry_policy
2910
+
2911
+ @security_center_stub.set_iam_policy request, options do |result, operation|
2912
+ yield result, operation if block_given?
2913
+ return result
2914
+ end
2915
+ rescue ::Gapic::Rest::Error => e
2916
+ raise ::Google::Cloud::Error.from_error(e)
2917
+ end
2918
+
2919
+ ##
2920
+ # Returns the permissions that a caller has on the specified source.
2921
+ #
2922
+ # @overload test_iam_permissions(request, options = nil)
2923
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
2924
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
2925
+ #
2926
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
2927
+ # A request object representing the call parameters. Required. To specify no
2928
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2929
+ # @param options [::Gapic::CallOptions, ::Hash]
2930
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2931
+ #
2932
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
2933
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
2934
+ # least one keyword argument is required. To specify no parameters, or to keep all
2935
+ # the default parameter values, pass an empty Hash as a request object (see above).
2936
+ #
2937
+ # @param resource [::String]
2938
+ # REQUIRED: The resource for which the policy detail is being requested.
2939
+ # See the operation documentation for the appropriate value for this field.
2940
+ # @param permissions [::Array<::String>]
2941
+ # The set of permissions to check for the `resource`. Permissions with
2942
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
2943
+ # information see
2944
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2945
+ # @yield [result, operation] Access the result along with the TransportOperation object
2946
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
2947
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2948
+ #
2949
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
2950
+ #
2951
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2952
+ def test_iam_permissions request, options = nil
2953
+ raise ::ArgumentError, "request must be provided" if request.nil?
2954
+
2955
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
2956
+
2957
+ # Converts hash and nil to an options object
2958
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2959
+
2960
+ # Customize the options with defaults
2961
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
2962
+
2963
+ # Set x-goog-api-client and x-goog-user-project headers
2964
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2965
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2966
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
2967
+ transports_version_send: [:rest]
2968
+
2969
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2970
+
2971
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
2972
+ metadata: call_metadata,
2973
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
2974
+
2975
+ options.apply_defaults timeout: @config.timeout,
2976
+ metadata: @config.metadata,
2977
+ retry_policy: @config.retry_policy
2978
+
2979
+ @security_center_stub.test_iam_permissions request, options do |result, operation|
2980
+ yield result, operation if block_given?
2981
+ return result
2982
+ end
2983
+ rescue ::Gapic::Rest::Error => e
2984
+ raise ::Google::Cloud::Error.from_error(e)
2985
+ end
2986
+
2987
+ ##
2988
+ # Updates external system. This is for a given finding.
2989
+ #
2990
+ # @overload update_external_system(request, options = nil)
2991
+ # Pass arguments to `update_external_system` via a request object, either of type
2992
+ # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash.
2993
+ #
2994
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash]
2995
+ # A request object representing the call parameters. Required. To specify no
2996
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2997
+ # @param options [::Gapic::CallOptions, ::Hash]
2998
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2999
+ #
3000
+ # @overload update_external_system(external_system: nil, update_mask: nil)
3001
+ # Pass arguments to `update_external_system` via keyword arguments. Note that at
3002
+ # least one keyword argument is required. To specify no parameters, or to keep all
3003
+ # the default parameter values, pass an empty Hash as a request object (see above).
3004
+ #
3005
+ # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash]
3006
+ # Required. The external system resource to update.
3007
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3008
+ # The FieldMask to use when updating the external system resource.
3009
+ #
3010
+ # If empty all mutable fields will be updated.
3011
+ # @yield [result, operation] Access the result along with the TransportOperation object
3012
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem]
3013
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3014
+ #
3015
+ # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem]
3016
+ #
3017
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3018
+ def update_external_system request, options = nil
3019
+ raise ::ArgumentError, "request must be provided" if request.nil?
3020
+
3021
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest
3022
+
3023
+ # Converts hash and nil to an options object
3024
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3025
+
3026
+ # Customize the options with defaults
3027
+ call_metadata = @config.rpcs.update_external_system.metadata.to_h
3028
+
3029
+ # Set x-goog-api-client and x-goog-user-project headers
3030
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3031
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3032
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3033
+ transports_version_send: [:rest]
3034
+
3035
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3036
+
3037
+ options.apply_defaults timeout: @config.rpcs.update_external_system.timeout,
3038
+ metadata: call_metadata,
3039
+ retry_policy: @config.rpcs.update_external_system.retry_policy
3040
+
3041
+ options.apply_defaults timeout: @config.timeout,
3042
+ metadata: @config.metadata,
3043
+ retry_policy: @config.retry_policy
3044
+
3045
+ @security_center_stub.update_external_system request, options do |result, operation|
3046
+ yield result, operation if block_given?
3047
+ return result
3048
+ end
3049
+ rescue ::Gapic::Rest::Error => e
3050
+ raise ::Google::Cloud::Error.from_error(e)
3051
+ end
3052
+
3053
+ ##
3054
+ # Creates or updates a finding. The corresponding source must exist for a
3055
+ # finding creation to succeed.
3056
+ #
3057
+ # @overload update_finding(request, options = nil)
3058
+ # Pass arguments to `update_finding` via a request object, either of type
3059
+ # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash.
3060
+ #
3061
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash]
3062
+ # A request object representing the call parameters. Required. To specify no
3063
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3064
+ # @param options [::Gapic::CallOptions, ::Hash]
3065
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3066
+ #
3067
+ # @overload update_finding(finding: nil, update_mask: nil)
3068
+ # Pass arguments to `update_finding` via keyword arguments. Note that at
3069
+ # least one keyword argument is required. To specify no parameters, or to keep all
3070
+ # the default parameter values, pass an empty Hash as a request object (see above).
3071
+ #
3072
+ # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
3073
+ # Required. The finding resource to update or create if it does not already
3074
+ # exist. parent, security_marks, and update_time will be ignored.
3075
+ #
3076
+ # In the case of creation, the finding id portion of the name must be
3077
+ # alphanumeric and less than or equal to 32 characters and greater than 0
3078
+ # characters in length.
3079
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3080
+ # The FieldMask to use when updating the finding resource. This field should
3081
+ # not be specified when creating a finding.
3082
+ #
3083
+ # When updating a finding, an empty mask is treated as updating all mutable
3084
+ # fields and replacing source_properties. Individual source_properties can
3085
+ # be added/updated by using "source_properties.<property key>" in the field
3086
+ # mask.
3087
+ # @yield [result, operation] Access the result along with the TransportOperation object
3088
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding]
3089
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3090
+ #
3091
+ # @return [::Google::Cloud::SecurityCenter::V1::Finding]
3092
+ #
3093
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3094
+ def update_finding request, options = nil
3095
+ raise ::ArgumentError, "request must be provided" if request.nil?
3096
+
3097
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest
3098
+
3099
+ # Converts hash and nil to an options object
3100
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3101
+
3102
+ # Customize the options with defaults
3103
+ call_metadata = @config.rpcs.update_finding.metadata.to_h
3104
+
3105
+ # Set x-goog-api-client and x-goog-user-project headers
3106
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3107
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3108
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3109
+ transports_version_send: [:rest]
3110
+
3111
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3112
+
3113
+ options.apply_defaults timeout: @config.rpcs.update_finding.timeout,
3114
+ metadata: call_metadata,
3115
+ retry_policy: @config.rpcs.update_finding.retry_policy
3116
+
3117
+ options.apply_defaults timeout: @config.timeout,
3118
+ metadata: @config.metadata,
3119
+ retry_policy: @config.retry_policy
3120
+
3121
+ @security_center_stub.update_finding request, options do |result, operation|
3122
+ yield result, operation if block_given?
3123
+ return result
3124
+ end
3125
+ rescue ::Gapic::Rest::Error => e
3126
+ raise ::Google::Cloud::Error.from_error(e)
3127
+ end
3128
+
3129
+ ##
3130
+ # Updates a mute config.
3131
+ #
3132
+ # @overload update_mute_config(request, options = nil)
3133
+ # Pass arguments to `update_mute_config` via a request object, either of type
3134
+ # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash.
3135
+ #
3136
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash]
3137
+ # A request object representing the call parameters. Required. To specify no
3138
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3139
+ # @param options [::Gapic::CallOptions, ::Hash]
3140
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3141
+ #
3142
+ # @overload update_mute_config(mute_config: nil, update_mask: nil)
3143
+ # Pass arguments to `update_mute_config` via keyword arguments. Note that at
3144
+ # least one keyword argument is required. To specify no parameters, or to keep all
3145
+ # the default parameter values, pass an empty Hash as a request object (see above).
3146
+ #
3147
+ # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash]
3148
+ # Required. The mute config being updated.
3149
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3150
+ # The list of fields to be updated.
3151
+ # If empty all mutable fields will be updated.
3152
+ # @yield [result, operation] Access the result along with the TransportOperation object
3153
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig]
3154
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3155
+ #
3156
+ # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig]
3157
+ #
3158
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3159
+ def update_mute_config request, options = nil
3160
+ raise ::ArgumentError, "request must be provided" if request.nil?
3161
+
3162
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest
3163
+
3164
+ # Converts hash and nil to an options object
3165
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3166
+
3167
+ # Customize the options with defaults
3168
+ call_metadata = @config.rpcs.update_mute_config.metadata.to_h
3169
+
3170
+ # Set x-goog-api-client and x-goog-user-project headers
3171
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3172
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3173
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3174
+ transports_version_send: [:rest]
3175
+
3176
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3177
+
3178
+ options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout,
3179
+ metadata: call_metadata,
3180
+ retry_policy: @config.rpcs.update_mute_config.retry_policy
3181
+
3182
+ options.apply_defaults timeout: @config.timeout,
3183
+ metadata: @config.metadata,
3184
+ retry_policy: @config.retry_policy
3185
+
3186
+ @security_center_stub.update_mute_config request, options do |result, operation|
3187
+ yield result, operation if block_given?
3188
+ return result
3189
+ end
3190
+ rescue ::Gapic::Rest::Error => e
3191
+ raise ::Google::Cloud::Error.from_error(e)
3192
+ end
3193
+
3194
+ ##
3195
+ # Updates a notification config. The following update
3196
+ # fields are allowed: description, pubsub_topic, streaming_config.filter
3197
+ #
3198
+ # @overload update_notification_config(request, options = nil)
3199
+ # Pass arguments to `update_notification_config` via a request object, either of type
3200
+ # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash.
3201
+ #
3202
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash]
3203
+ # A request object representing the call parameters. Required. To specify no
3204
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3205
+ # @param options [::Gapic::CallOptions, ::Hash]
3206
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3207
+ #
3208
+ # @overload update_notification_config(notification_config: nil, update_mask: nil)
3209
+ # Pass arguments to `update_notification_config` via keyword arguments. Note that at
3210
+ # least one keyword argument is required. To specify no parameters, or to keep all
3211
+ # the default parameter values, pass an empty Hash as a request object (see above).
3212
+ #
3213
+ # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash]
3214
+ # Required. The notification config to update.
3215
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3216
+ # The FieldMask to use when updating the notification config.
3217
+ #
3218
+ # If empty all mutable fields will be updated.
3219
+ # @yield [result, operation] Access the result along with the TransportOperation object
3220
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
3221
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3222
+ #
3223
+ # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
3224
+ #
3225
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3226
+ def update_notification_config request, options = nil
3227
+ raise ::ArgumentError, "request must be provided" if request.nil?
3228
+
3229
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest
3230
+
3231
+ # Converts hash and nil to an options object
3232
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3233
+
3234
+ # Customize the options with defaults
3235
+ call_metadata = @config.rpcs.update_notification_config.metadata.to_h
3236
+
3237
+ # Set x-goog-api-client and x-goog-user-project headers
3238
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3239
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3240
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3241
+ transports_version_send: [:rest]
3242
+
3243
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3244
+
3245
+ options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout,
3246
+ metadata: call_metadata,
3247
+ retry_policy: @config.rpcs.update_notification_config.retry_policy
3248
+
3249
+ options.apply_defaults timeout: @config.timeout,
3250
+ metadata: @config.metadata,
3251
+ retry_policy: @config.retry_policy
3252
+
3253
+ @security_center_stub.update_notification_config request, options do |result, operation|
3254
+ yield result, operation if block_given?
3255
+ return result
3256
+ end
3257
+ rescue ::Gapic::Rest::Error => e
3258
+ raise ::Google::Cloud::Error.from_error(e)
3259
+ end
3260
+
3261
+ ##
3262
+ # Updates an organization's settings.
3263
+ #
3264
+ # @overload update_organization_settings(request, options = nil)
3265
+ # Pass arguments to `update_organization_settings` via a request object, either of type
3266
+ # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash.
3267
+ #
3268
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash]
3269
+ # A request object representing the call parameters. Required. To specify no
3270
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3271
+ # @param options [::Gapic::CallOptions, ::Hash]
3272
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3273
+ #
3274
+ # @overload update_organization_settings(organization_settings: nil, update_mask: nil)
3275
+ # Pass arguments to `update_organization_settings` via keyword arguments. Note that at
3276
+ # least one keyword argument is required. To specify no parameters, or to keep all
3277
+ # the default parameter values, pass an empty Hash as a request object (see above).
3278
+ #
3279
+ # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash]
3280
+ # Required. The organization settings resource to update.
3281
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3282
+ # The FieldMask to use when updating the settings resource.
3283
+ #
3284
+ # If empty all mutable fields will be updated.
3285
+ # @yield [result, operation] Access the result along with the TransportOperation object
3286
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
3287
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3288
+ #
3289
+ # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
3290
+ #
3291
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3292
+ def update_organization_settings request, options = nil
3293
+ raise ::ArgumentError, "request must be provided" if request.nil?
3294
+
3295
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest
3296
+
3297
+ # Converts hash and nil to an options object
3298
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3299
+
3300
+ # Customize the options with defaults
3301
+ call_metadata = @config.rpcs.update_organization_settings.metadata.to_h
3302
+
3303
+ # Set x-goog-api-client and x-goog-user-project headers
3304
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3305
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3306
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3307
+ transports_version_send: [:rest]
3308
+
3309
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3310
+
3311
+ options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout,
3312
+ metadata: call_metadata,
3313
+ retry_policy: @config.rpcs.update_organization_settings.retry_policy
3314
+
3315
+ options.apply_defaults timeout: @config.timeout,
3316
+ metadata: @config.metadata,
3317
+ retry_policy: @config.retry_policy
3318
+
3319
+ @security_center_stub.update_organization_settings request, options do |result, operation|
3320
+ yield result, operation if block_given?
3321
+ return result
3322
+ end
3323
+ rescue ::Gapic::Rest::Error => e
3324
+ raise ::Google::Cloud::Error.from_error(e)
3325
+ end
3326
+
3327
+ ##
3328
+ # Updates the SecurityHealthAnalyticsCustomModule under the given name based
3329
+ # on the given update mask. Updating the enablement state is supported on
3330
+ # both resident and inherited modules (though resident modules cannot have an
3331
+ # enablement state of “inherited”). Updating the display name and custom
3332
+ # config of a module is supported on resident modules only.
3333
+ #
3334
+ # @overload update_security_health_analytics_custom_module(request, options = nil)
3335
+ # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type
3336
+ # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
3337
+ #
3338
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
3339
+ # A request object representing the call parameters. Required. To specify no
3340
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3341
+ # @param options [::Gapic::CallOptions, ::Hash]
3342
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3343
+ #
3344
+ # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil)
3345
+ # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at
3346
+ # least one keyword argument is required. To specify no parameters, or to keep all
3347
+ # the default parameter values, pass an empty Hash as a request object (see above).
3348
+ #
3349
+ # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
3350
+ # Required. The SecurityHealthAnalytics custom module to update.
3351
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3352
+ # The list of fields to update.
3353
+ # @yield [result, operation] Access the result along with the TransportOperation object
3354
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
3355
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3356
+ #
3357
+ # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule]
3358
+ #
3359
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3360
+ def update_security_health_analytics_custom_module request, options = nil
3361
+ raise ::ArgumentError, "request must be provided" if request.nil?
3362
+
3363
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest
3364
+
3365
+ # Converts hash and nil to an options object
3366
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3367
+
3368
+ # Customize the options with defaults
3369
+ call_metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h
3370
+
3371
+ # Set x-goog-api-client and x-goog-user-project headers
3372
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3373
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3374
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3375
+ transports_version_send: [:rest]
3376
+
3377
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3378
+
3379
+ options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout,
3380
+ metadata: call_metadata,
3381
+ retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy
3382
+
3383
+ options.apply_defaults timeout: @config.timeout,
3384
+ metadata: @config.metadata,
3385
+ retry_policy: @config.retry_policy
3386
+
3387
+ @security_center_stub.update_security_health_analytics_custom_module request, options do |result, operation|
3388
+ yield result, operation if block_given?
3389
+ return result
3390
+ end
3391
+ rescue ::Gapic::Rest::Error => e
3392
+ raise ::Google::Cloud::Error.from_error(e)
3393
+ end
3394
+
3395
+ ##
3396
+ # Updates a source.
3397
+ #
3398
+ # @overload update_source(request, options = nil)
3399
+ # Pass arguments to `update_source` via a request object, either of type
3400
+ # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash.
3401
+ #
3402
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash]
3403
+ # A request object representing the call parameters. Required. To specify no
3404
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3405
+ # @param options [::Gapic::CallOptions, ::Hash]
3406
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3407
+ #
3408
+ # @overload update_source(source: nil, update_mask: nil)
3409
+ # Pass arguments to `update_source` via keyword arguments. Note that at
3410
+ # least one keyword argument is required. To specify no parameters, or to keep all
3411
+ # the default parameter values, pass an empty Hash as a request object (see above).
3412
+ #
3413
+ # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash]
3414
+ # Required. The source resource to update.
3415
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3416
+ # The FieldMask to use when updating the source resource.
3417
+ #
3418
+ # If empty all mutable fields will be updated.
3419
+ # @yield [result, operation] Access the result along with the TransportOperation object
3420
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source]
3421
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3422
+ #
3423
+ # @return [::Google::Cloud::SecurityCenter::V1::Source]
3424
+ #
3425
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3426
+ def update_source request, options = nil
3427
+ raise ::ArgumentError, "request must be provided" if request.nil?
3428
+
3429
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest
3430
+
3431
+ # Converts hash and nil to an options object
3432
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3433
+
3434
+ # Customize the options with defaults
3435
+ call_metadata = @config.rpcs.update_source.metadata.to_h
3436
+
3437
+ # Set x-goog-api-client and x-goog-user-project headers
3438
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3439
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3440
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3441
+ transports_version_send: [:rest]
3442
+
3443
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3444
+
3445
+ options.apply_defaults timeout: @config.rpcs.update_source.timeout,
3446
+ metadata: call_metadata,
3447
+ retry_policy: @config.rpcs.update_source.retry_policy
3448
+
3449
+ options.apply_defaults timeout: @config.timeout,
3450
+ metadata: @config.metadata,
3451
+ retry_policy: @config.retry_policy
3452
+
3453
+ @security_center_stub.update_source request, options do |result, operation|
3454
+ yield result, operation if block_given?
3455
+ return result
3456
+ end
3457
+ rescue ::Gapic::Rest::Error => e
3458
+ raise ::Google::Cloud::Error.from_error(e)
3459
+ end
3460
+
3461
+ ##
3462
+ # Updates security marks.
3463
+ #
3464
+ # @overload update_security_marks(request, options = nil)
3465
+ # Pass arguments to `update_security_marks` via a request object, either of type
3466
+ # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash.
3467
+ #
3468
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash]
3469
+ # A request object representing the call parameters. Required. To specify no
3470
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3471
+ # @param options [::Gapic::CallOptions, ::Hash]
3472
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3473
+ #
3474
+ # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil)
3475
+ # Pass arguments to `update_security_marks` via keyword arguments. Note that at
3476
+ # least one keyword argument is required. To specify no parameters, or to keep all
3477
+ # the default parameter values, pass an empty Hash as a request object (see above).
3478
+ #
3479
+ # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash]
3480
+ # Required. The security marks resource to update.
3481
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3482
+ # The FieldMask to use when updating the security marks resource.
3483
+ #
3484
+ # The field mask must not contain duplicate fields.
3485
+ # If empty or set to "marks", all marks will be replaced. Individual
3486
+ # marks can be updated using "marks.<mark_key>".
3487
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
3488
+ # The time at which the updated SecurityMarks take effect.
3489
+ # If not set uses current server time. Updates will be applied to the
3490
+ # SecurityMarks that are active immediately preceding this time. Must be
3491
+ # earlier or equal to the server time.
3492
+ # @yield [result, operation] Access the result along with the TransportOperation object
3493
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks]
3494
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3495
+ #
3496
+ # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks]
3497
+ #
3498
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3499
+ def update_security_marks request, options = nil
3500
+ raise ::ArgumentError, "request must be provided" if request.nil?
3501
+
3502
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest
3503
+
3504
+ # Converts hash and nil to an options object
3505
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3506
+
3507
+ # Customize the options with defaults
3508
+ call_metadata = @config.rpcs.update_security_marks.metadata.to_h
3509
+
3510
+ # Set x-goog-api-client and x-goog-user-project headers
3511
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3512
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3513
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3514
+ transports_version_send: [:rest]
3515
+
3516
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3517
+
3518
+ options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout,
3519
+ metadata: call_metadata,
3520
+ retry_policy: @config.rpcs.update_security_marks.retry_policy
3521
+
3522
+ options.apply_defaults timeout: @config.timeout,
3523
+ metadata: @config.metadata,
3524
+ retry_policy: @config.retry_policy
3525
+
3526
+ @security_center_stub.update_security_marks request, options do |result, operation|
3527
+ yield result, operation if block_given?
3528
+ return result
3529
+ end
3530
+ rescue ::Gapic::Rest::Error => e
3531
+ raise ::Google::Cloud::Error.from_error(e)
3532
+ end
3533
+
3534
+ ##
3535
+ # Creates a BigQuery export.
3536
+ #
3537
+ # @overload create_big_query_export(request, options = nil)
3538
+ # Pass arguments to `create_big_query_export` via a request object, either of type
3539
+ # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash.
3540
+ #
3541
+ # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash]
3542
+ # A request object representing the call parameters. Required. To specify no
3543
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3544
+ # @param options [::Gapic::CallOptions, ::Hash]
3545
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3546
+ #
3547
+ # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil)
3548
+ # Pass arguments to `create_big_query_export` via keyword arguments. Note that at
3549
+ # least one keyword argument is required. To specify no parameters, or to keep all
3550
+ # the default parameter values, pass an empty Hash as a request object (see above).
3551
+ #
3552
+ # @param parent [::String]
3553
+ # Required. The name of the parent resource of the new BigQuery export. Its
3554
+ # format is "organizations/[organization_id]", "folders/[folder_id]", or
3555
+ # "projects/[project_id]".
3556
+ # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
3557
+ # Required. The BigQuery export being created.
3558
+ # @param big_query_export_id [::String]
3559
+ # Required. Unique identifier provided by the client within the parent scope.
3560
+ # It must consist of lower case letters, numbers, and hyphen, with the first
3561
+ # character a letter, the last a letter or a number, and a 63 character
3562
+ # maximum.
3563
+ # @yield [result, operation] Access the result along with the TransportOperation object
3564
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
3565
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3566
+ #
3567
+ # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
3568
+ #
3569
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3570
+ def create_big_query_export request, options = nil
3571
+ raise ::ArgumentError, "request must be provided" if request.nil?
3572
+
3573
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest
3574
+
3575
+ # Converts hash and nil to an options object
3576
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3577
+
3578
+ # Customize the options with defaults
3579
+ call_metadata = @config.rpcs.create_big_query_export.metadata.to_h
3580
+
3581
+ # Set x-goog-api-client and x-goog-user-project headers
3582
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3583
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3584
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3585
+ transports_version_send: [:rest]
3586
+
3587
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3588
+
3589
+ options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout,
3590
+ metadata: call_metadata,
3591
+ retry_policy: @config.rpcs.create_big_query_export.retry_policy
3592
+
3593
+ options.apply_defaults timeout: @config.timeout,
3594
+ metadata: @config.metadata,
3595
+ retry_policy: @config.retry_policy
3596
+
3597
+ @security_center_stub.create_big_query_export request, options do |result, operation|
3598
+ yield result, operation if block_given?
3599
+ return result
3600
+ end
3601
+ rescue ::Gapic::Rest::Error => e
3602
+ raise ::Google::Cloud::Error.from_error(e)
3603
+ end
3604
+
3605
+ ##
3606
+ # Deletes an existing BigQuery export.
3607
+ #
3608
+ # @overload delete_big_query_export(request, options = nil)
3609
+ # Pass arguments to `delete_big_query_export` via a request object, either of type
3610
+ # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash.
3611
+ #
3612
+ # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash]
3613
+ # A request object representing the call parameters. Required. To specify no
3614
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3615
+ # @param options [::Gapic::CallOptions, ::Hash]
3616
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3617
+ #
3618
+ # @overload delete_big_query_export(name: nil)
3619
+ # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at
3620
+ # least one keyword argument is required. To specify no parameters, or to keep all
3621
+ # the default parameter values, pass an empty Hash as a request object (see above).
3622
+ #
3623
+ # @param name [::String]
3624
+ # Required. The name of the BigQuery export to delete. Its format is
3625
+ # organizations/\\{organization}/bigQueryExports/\\{export_id},
3626
+ # folders/\\{folder}/bigQueryExports/\\{export_id}, or
3627
+ # projects/\\{project}/bigQueryExports/\\{export_id}
3628
+ # @yield [result, operation] Access the result along with the TransportOperation object
3629
+ # @yieldparam result [::Google::Protobuf::Empty]
3630
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3631
+ #
3632
+ # @return [::Google::Protobuf::Empty]
3633
+ #
3634
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3635
+ def delete_big_query_export request, options = nil
3636
+ raise ::ArgumentError, "request must be provided" if request.nil?
3637
+
3638
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest
3639
+
3640
+ # Converts hash and nil to an options object
3641
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3642
+
3643
+ # Customize the options with defaults
3644
+ call_metadata = @config.rpcs.delete_big_query_export.metadata.to_h
3645
+
3646
+ # Set x-goog-api-client and x-goog-user-project headers
3647
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3648
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3649
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3650
+ transports_version_send: [:rest]
3651
+
3652
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3653
+
3654
+ options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout,
3655
+ metadata: call_metadata,
3656
+ retry_policy: @config.rpcs.delete_big_query_export.retry_policy
3657
+
3658
+ options.apply_defaults timeout: @config.timeout,
3659
+ metadata: @config.metadata,
3660
+ retry_policy: @config.retry_policy
3661
+
3662
+ @security_center_stub.delete_big_query_export request, options do |result, operation|
3663
+ yield result, operation if block_given?
3664
+ return result
3665
+ end
3666
+ rescue ::Gapic::Rest::Error => e
3667
+ raise ::Google::Cloud::Error.from_error(e)
3668
+ end
3669
+
3670
+ ##
3671
+ # Updates a BigQuery export.
3672
+ #
3673
+ # @overload update_big_query_export(request, options = nil)
3674
+ # Pass arguments to `update_big_query_export` via a request object, either of type
3675
+ # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash.
3676
+ #
3677
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash]
3678
+ # A request object representing the call parameters. Required. To specify no
3679
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3680
+ # @param options [::Gapic::CallOptions, ::Hash]
3681
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3682
+ #
3683
+ # @overload update_big_query_export(big_query_export: nil, update_mask: nil)
3684
+ # Pass arguments to `update_big_query_export` via keyword arguments. Note that at
3685
+ # least one keyword argument is required. To specify no parameters, or to keep all
3686
+ # the default parameter values, pass an empty Hash as a request object (see above).
3687
+ #
3688
+ # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash]
3689
+ # Required. The BigQuery export being updated.
3690
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3691
+ # The list of fields to be updated.
3692
+ # If empty all mutable fields will be updated.
3693
+ # @yield [result, operation] Access the result along with the TransportOperation object
3694
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
3695
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3696
+ #
3697
+ # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport]
3698
+ #
3699
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3700
+ def update_big_query_export request, options = nil
3701
+ raise ::ArgumentError, "request must be provided" if request.nil?
3702
+
3703
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest
3704
+
3705
+ # Converts hash and nil to an options object
3706
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3707
+
3708
+ # Customize the options with defaults
3709
+ call_metadata = @config.rpcs.update_big_query_export.metadata.to_h
3710
+
3711
+ # Set x-goog-api-client and x-goog-user-project headers
3712
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3713
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3714
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3715
+ transports_version_send: [:rest]
3716
+
3717
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3718
+
3719
+ options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout,
3720
+ metadata: call_metadata,
3721
+ retry_policy: @config.rpcs.update_big_query_export.retry_policy
3722
+
3723
+ options.apply_defaults timeout: @config.timeout,
3724
+ metadata: @config.metadata,
3725
+ retry_policy: @config.retry_policy
3726
+
3727
+ @security_center_stub.update_big_query_export request, options do |result, operation|
3728
+ yield result, operation if block_given?
3729
+ return result
3730
+ end
3731
+ rescue ::Gapic::Rest::Error => e
3732
+ raise ::Google::Cloud::Error.from_error(e)
3733
+ end
3734
+
3735
+ ##
3736
+ # Lists BigQuery exports. Note that when requesting BigQuery exports at a
3737
+ # given level all exports under that level are also returned e.g. if
3738
+ # requesting BigQuery exports under a folder, then all BigQuery exports
3739
+ # immediately under the folder plus the ones created under the projects
3740
+ # within the folder are returned.
3741
+ #
3742
+ # @overload list_big_query_exports(request, options = nil)
3743
+ # Pass arguments to `list_big_query_exports` via a request object, either of type
3744
+ # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash.
3745
+ #
3746
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash]
3747
+ # A request object representing the call parameters. Required. To specify no
3748
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3749
+ # @param options [::Gapic::CallOptions, ::Hash]
3750
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3751
+ #
3752
+ # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil)
3753
+ # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at
3754
+ # least one keyword argument is required. To specify no parameters, or to keep all
3755
+ # the default parameter values, pass an empty Hash as a request object (see above).
3756
+ #
3757
+ # @param parent [::String]
3758
+ # Required. The parent, which owns the collection of BigQuery exports. Its
3759
+ # format is "organizations/[organization_id]", "folders/[folder_id]",
3760
+ # "projects/[project_id]".
3761
+ # @param page_size [::Integer]
3762
+ # The maximum number of configs to return. The service may return fewer than
3763
+ # this value.
3764
+ # If unspecified, at most 10 configs will be returned.
3765
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
3766
+ # @param page_token [::String]
3767
+ # A page token, received from a previous `ListBigQueryExports` call.
3768
+ # Provide this to retrieve the subsequent page.
3769
+ # When paginating, all other parameters provided to `ListBigQueryExports`
3770
+ # must match the call that provided the page token.
3771
+ # @yield [result, operation] Access the result along with the TransportOperation object
3772
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>]
3773
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3774
+ #
3775
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>]
3776
+ #
3777
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3778
+ def list_big_query_exports request, options = nil
3779
+ raise ::ArgumentError, "request must be provided" if request.nil?
3780
+
3781
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest
3782
+
3783
+ # Converts hash and nil to an options object
3784
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3785
+
3786
+ # Customize the options with defaults
3787
+ call_metadata = @config.rpcs.list_big_query_exports.metadata.to_h
3788
+
3789
+ # Set x-goog-api-client and x-goog-user-project headers
3790
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3791
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3792
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION,
3793
+ transports_version_send: [:rest]
3794
+
3795
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3796
+
3797
+ options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout,
3798
+ metadata: call_metadata,
3799
+ retry_policy: @config.rpcs.list_big_query_exports.retry_policy
3800
+
3801
+ options.apply_defaults timeout: @config.timeout,
3802
+ metadata: @config.metadata,
3803
+ retry_policy: @config.retry_policy
3804
+
3805
+ @security_center_stub.list_big_query_exports request, options do |result, operation|
3806
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options
3807
+ yield result, operation if block_given?
3808
+ return result
3809
+ end
3810
+ rescue ::Gapic::Rest::Error => e
3811
+ raise ::Google::Cloud::Error.from_error(e)
3812
+ end
3813
+
3814
+ ##
3815
+ # Configuration class for the SecurityCenter REST API.
3816
+ #
3817
+ # This class represents the configuration for SecurityCenter REST,
3818
+ # providing control over timeouts, retry behavior, logging, transport
3819
+ # parameters, and other low-level controls. Certain parameters can also be
3820
+ # applied individually to specific RPCs. See
3821
+ # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration::Rpcs}
3822
+ # for a list of RPCs that can be configured independently.
3823
+ #
3824
+ # Configuration can be applied globally to all clients, or to a single client
3825
+ # on construction.
3826
+ #
3827
+ # @example
3828
+ #
3829
+ # # Modify the global config, setting the timeout for
3830
+ # # bulk_mute_findings to 20 seconds,
3831
+ # # and all remaining timeouts to 10 seconds.
3832
+ # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config|
3833
+ # config.timeout = 10.0
3834
+ # config.rpcs.bulk_mute_findings.timeout = 20.0
3835
+ # end
3836
+ #
3837
+ # # Apply the above configuration only to a new client.
3838
+ # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config|
3839
+ # config.timeout = 10.0
3840
+ # config.rpcs.bulk_mute_findings.timeout = 20.0
3841
+ # end
3842
+ #
3843
+ # @!attribute [rw] endpoint
3844
+ # The hostname or hostname:port of the service endpoint.
3845
+ # Defaults to `"securitycenter.googleapis.com"`.
3846
+ # @return [::String]
3847
+ # @!attribute [rw] credentials
3848
+ # Credentials to send with calls. You may provide any of the following types:
3849
+ # * (`String`) The path to a service account key file in JSON format
3850
+ # * (`Hash`) A service account key as a Hash
3851
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3852
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3853
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3854
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3855
+ # * (`nil`) indicating no credentials
3856
+ # @return [::Object]
3857
+ # @!attribute [rw] scope
3858
+ # The OAuth scopes
3859
+ # @return [::Array<::String>]
3860
+ # @!attribute [rw] lib_name
3861
+ # The library name as recorded in instrumentation and logging
3862
+ # @return [::String]
3863
+ # @!attribute [rw] lib_version
3864
+ # The library version as recorded in instrumentation and logging
3865
+ # @return [::String]
3866
+ # @!attribute [rw] timeout
3867
+ # The call timeout in seconds.
3868
+ # @return [::Numeric]
3869
+ # @!attribute [rw] metadata
3870
+ # Additional headers to be sent with the call.
3871
+ # @return [::Hash{::Symbol=>::String}]
3872
+ # @!attribute [rw] retry_policy
3873
+ # The retry policy. The value is a hash with the following keys:
3874
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3875
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3876
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3877
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3878
+ # trigger a retry.
3879
+ # @return [::Hash]
3880
+ # @!attribute [rw] quota_project
3881
+ # A separate project against which to charge quota.
3882
+ # @return [::String]
3883
+ #
3884
+ class Configuration
3885
+ extend ::Gapic::Config
3886
+
3887
+ config_attr :endpoint, "securitycenter.googleapis.com", ::String
3888
+ config_attr :credentials, nil do |value|
3889
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3890
+ allowed.any? { |klass| klass === value }
3891
+ end
3892
+ config_attr :scope, nil, ::String, ::Array, nil
3893
+ config_attr :lib_name, nil, ::String, nil
3894
+ config_attr :lib_version, nil, ::String, nil
3895
+ config_attr :timeout, nil, ::Numeric, nil
3896
+ config_attr :metadata, nil, ::Hash, nil
3897
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3898
+ config_attr :quota_project, nil, ::String, nil
3899
+
3900
+ # @private
3901
+ def initialize parent_config = nil
3902
+ @parent_config = parent_config unless parent_config.nil?
3903
+
3904
+ yield self if block_given?
3905
+ end
3906
+
3907
+ ##
3908
+ # Configurations for individual RPCs
3909
+ # @return [Rpcs]
3910
+ #
3911
+ def rpcs
3912
+ @rpcs ||= begin
3913
+ parent_rpcs = nil
3914
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3915
+ Rpcs.new parent_rpcs
3916
+ end
3917
+ end
3918
+
3919
+ ##
3920
+ # Configuration RPC class for the SecurityCenter API.
3921
+ #
3922
+ # Includes fields providing the configuration for each RPC in this service.
3923
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3924
+ # the following configuration fields:
3925
+ #
3926
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3927
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
3928
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3929
+ # include the following keys:
3930
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3931
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3932
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3933
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3934
+ # trigger a retry.
3935
+ #
3936
+ class Rpcs
3937
+ ##
3938
+ # RPC-specific configuration for `bulk_mute_findings`
3939
+ # @return [::Gapic::Config::Method]
3940
+ #
3941
+ attr_reader :bulk_mute_findings
3942
+ ##
3943
+ # RPC-specific configuration for `create_security_health_analytics_custom_module`
3944
+ # @return [::Gapic::Config::Method]
3945
+ #
3946
+ attr_reader :create_security_health_analytics_custom_module
3947
+ ##
3948
+ # RPC-specific configuration for `create_source`
3949
+ # @return [::Gapic::Config::Method]
3950
+ #
3951
+ attr_reader :create_source
3952
+ ##
3953
+ # RPC-specific configuration for `create_finding`
3954
+ # @return [::Gapic::Config::Method]
3955
+ #
3956
+ attr_reader :create_finding
3957
+ ##
3958
+ # RPC-specific configuration for `create_mute_config`
3959
+ # @return [::Gapic::Config::Method]
3960
+ #
3961
+ attr_reader :create_mute_config
3962
+ ##
3963
+ # RPC-specific configuration for `create_notification_config`
3964
+ # @return [::Gapic::Config::Method]
3965
+ #
3966
+ attr_reader :create_notification_config
3967
+ ##
3968
+ # RPC-specific configuration for `delete_mute_config`
3969
+ # @return [::Gapic::Config::Method]
3970
+ #
3971
+ attr_reader :delete_mute_config
3972
+ ##
3973
+ # RPC-specific configuration for `delete_notification_config`
3974
+ # @return [::Gapic::Config::Method]
3975
+ #
3976
+ attr_reader :delete_notification_config
3977
+ ##
3978
+ # RPC-specific configuration for `delete_security_health_analytics_custom_module`
3979
+ # @return [::Gapic::Config::Method]
3980
+ #
3981
+ attr_reader :delete_security_health_analytics_custom_module
3982
+ ##
3983
+ # RPC-specific configuration for `get_big_query_export`
3984
+ # @return [::Gapic::Config::Method]
3985
+ #
3986
+ attr_reader :get_big_query_export
3987
+ ##
3988
+ # RPC-specific configuration for `get_iam_policy`
3989
+ # @return [::Gapic::Config::Method]
3990
+ #
3991
+ attr_reader :get_iam_policy
3992
+ ##
3993
+ # RPC-specific configuration for `get_mute_config`
3994
+ # @return [::Gapic::Config::Method]
3995
+ #
3996
+ attr_reader :get_mute_config
3997
+ ##
3998
+ # RPC-specific configuration for `get_notification_config`
3999
+ # @return [::Gapic::Config::Method]
4000
+ #
4001
+ attr_reader :get_notification_config
4002
+ ##
4003
+ # RPC-specific configuration for `get_organization_settings`
4004
+ # @return [::Gapic::Config::Method]
4005
+ #
4006
+ attr_reader :get_organization_settings
4007
+ ##
4008
+ # RPC-specific configuration for `get_effective_security_health_analytics_custom_module`
4009
+ # @return [::Gapic::Config::Method]
4010
+ #
4011
+ attr_reader :get_effective_security_health_analytics_custom_module
4012
+ ##
4013
+ # RPC-specific configuration for `get_security_health_analytics_custom_module`
4014
+ # @return [::Gapic::Config::Method]
4015
+ #
4016
+ attr_reader :get_security_health_analytics_custom_module
4017
+ ##
4018
+ # RPC-specific configuration for `get_source`
4019
+ # @return [::Gapic::Config::Method]
4020
+ #
4021
+ attr_reader :get_source
4022
+ ##
4023
+ # RPC-specific configuration for `group_assets`
4024
+ # @return [::Gapic::Config::Method]
4025
+ #
4026
+ attr_reader :group_assets
4027
+ ##
4028
+ # RPC-specific configuration for `group_findings`
4029
+ # @return [::Gapic::Config::Method]
4030
+ #
4031
+ attr_reader :group_findings
4032
+ ##
4033
+ # RPC-specific configuration for `list_assets`
4034
+ # @return [::Gapic::Config::Method]
4035
+ #
4036
+ attr_reader :list_assets
4037
+ ##
4038
+ # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules`
4039
+ # @return [::Gapic::Config::Method]
4040
+ #
4041
+ attr_reader :list_descendant_security_health_analytics_custom_modules
4042
+ ##
4043
+ # RPC-specific configuration for `list_findings`
4044
+ # @return [::Gapic::Config::Method]
4045
+ #
4046
+ attr_reader :list_findings
4047
+ ##
4048
+ # RPC-specific configuration for `list_mute_configs`
4049
+ # @return [::Gapic::Config::Method]
4050
+ #
4051
+ attr_reader :list_mute_configs
4052
+ ##
4053
+ # RPC-specific configuration for `list_notification_configs`
4054
+ # @return [::Gapic::Config::Method]
4055
+ #
4056
+ attr_reader :list_notification_configs
4057
+ ##
4058
+ # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules`
4059
+ # @return [::Gapic::Config::Method]
4060
+ #
4061
+ attr_reader :list_effective_security_health_analytics_custom_modules
4062
+ ##
4063
+ # RPC-specific configuration for `list_security_health_analytics_custom_modules`
4064
+ # @return [::Gapic::Config::Method]
4065
+ #
4066
+ attr_reader :list_security_health_analytics_custom_modules
4067
+ ##
4068
+ # RPC-specific configuration for `list_sources`
4069
+ # @return [::Gapic::Config::Method]
4070
+ #
4071
+ attr_reader :list_sources
4072
+ ##
4073
+ # RPC-specific configuration for `run_asset_discovery`
4074
+ # @return [::Gapic::Config::Method]
4075
+ #
4076
+ attr_reader :run_asset_discovery
4077
+ ##
4078
+ # RPC-specific configuration for `set_finding_state`
4079
+ # @return [::Gapic::Config::Method]
4080
+ #
4081
+ attr_reader :set_finding_state
4082
+ ##
4083
+ # RPC-specific configuration for `set_mute`
4084
+ # @return [::Gapic::Config::Method]
4085
+ #
4086
+ attr_reader :set_mute
4087
+ ##
4088
+ # RPC-specific configuration for `set_iam_policy`
4089
+ # @return [::Gapic::Config::Method]
4090
+ #
4091
+ attr_reader :set_iam_policy
4092
+ ##
4093
+ # RPC-specific configuration for `test_iam_permissions`
4094
+ # @return [::Gapic::Config::Method]
4095
+ #
4096
+ attr_reader :test_iam_permissions
4097
+ ##
4098
+ # RPC-specific configuration for `update_external_system`
4099
+ # @return [::Gapic::Config::Method]
4100
+ #
4101
+ attr_reader :update_external_system
4102
+ ##
4103
+ # RPC-specific configuration for `update_finding`
4104
+ # @return [::Gapic::Config::Method]
4105
+ #
4106
+ attr_reader :update_finding
4107
+ ##
4108
+ # RPC-specific configuration for `update_mute_config`
4109
+ # @return [::Gapic::Config::Method]
4110
+ #
4111
+ attr_reader :update_mute_config
4112
+ ##
4113
+ # RPC-specific configuration for `update_notification_config`
4114
+ # @return [::Gapic::Config::Method]
4115
+ #
4116
+ attr_reader :update_notification_config
4117
+ ##
4118
+ # RPC-specific configuration for `update_organization_settings`
4119
+ # @return [::Gapic::Config::Method]
4120
+ #
4121
+ attr_reader :update_organization_settings
4122
+ ##
4123
+ # RPC-specific configuration for `update_security_health_analytics_custom_module`
4124
+ # @return [::Gapic::Config::Method]
4125
+ #
4126
+ attr_reader :update_security_health_analytics_custom_module
4127
+ ##
4128
+ # RPC-specific configuration for `update_source`
4129
+ # @return [::Gapic::Config::Method]
4130
+ #
4131
+ attr_reader :update_source
4132
+ ##
4133
+ # RPC-specific configuration for `update_security_marks`
4134
+ # @return [::Gapic::Config::Method]
4135
+ #
4136
+ attr_reader :update_security_marks
4137
+ ##
4138
+ # RPC-specific configuration for `create_big_query_export`
4139
+ # @return [::Gapic::Config::Method]
4140
+ #
4141
+ attr_reader :create_big_query_export
4142
+ ##
4143
+ # RPC-specific configuration for `delete_big_query_export`
4144
+ # @return [::Gapic::Config::Method]
4145
+ #
4146
+ attr_reader :delete_big_query_export
4147
+ ##
4148
+ # RPC-specific configuration for `update_big_query_export`
4149
+ # @return [::Gapic::Config::Method]
4150
+ #
4151
+ attr_reader :update_big_query_export
4152
+ ##
4153
+ # RPC-specific configuration for `list_big_query_exports`
4154
+ # @return [::Gapic::Config::Method]
4155
+ #
4156
+ attr_reader :list_big_query_exports
4157
+
4158
+ # @private
4159
+ def initialize parent_rpcs = nil
4160
+ bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings
4161
+ @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config
4162
+ create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module
4163
+ @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config
4164
+ create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source
4165
+ @create_source = ::Gapic::Config::Method.new create_source_config
4166
+ create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding
4167
+ @create_finding = ::Gapic::Config::Method.new create_finding_config
4168
+ create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config
4169
+ @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config
4170
+ create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config
4171
+ @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config
4172
+ delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config
4173
+ @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config
4174
+ delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
4175
+ @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
4176
+ delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module
4177
+ @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config
4178
+ get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
4179
+ @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
4180
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
4181
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
4182
+ get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config
4183
+ @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config
4184
+ get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config
4185
+ @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config
4186
+ get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings
4187
+ @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config
4188
+ get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module
4189
+ @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config
4190
+ get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module
4191
+ @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config
4192
+ get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source
4193
+ @get_source = ::Gapic::Config::Method.new get_source_config
4194
+ group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets
4195
+ @group_assets = ::Gapic::Config::Method.new group_assets_config
4196
+ group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings
4197
+ @group_findings = ::Gapic::Config::Method.new group_findings_config
4198
+ list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets
4199
+ @list_assets = ::Gapic::Config::Method.new list_assets_config
4200
+ list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules
4201
+ @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config
4202
+ list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings
4203
+ @list_findings = ::Gapic::Config::Method.new list_findings_config
4204
+ list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs
4205
+ @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config
4206
+ list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs
4207
+ @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config
4208
+ list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules
4209
+ @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config
4210
+ list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules
4211
+ @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config
4212
+ list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources
4213
+ @list_sources = ::Gapic::Config::Method.new list_sources_config
4214
+ run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery
4215
+ @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config
4216
+ set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state
4217
+ @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config
4218
+ set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute
4219
+ @set_mute = ::Gapic::Config::Method.new set_mute_config
4220
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
4221
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
4222
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
4223
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
4224
+ update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system
4225
+ @update_external_system = ::Gapic::Config::Method.new update_external_system_config
4226
+ update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding
4227
+ @update_finding = ::Gapic::Config::Method.new update_finding_config
4228
+ update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config
4229
+ @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config
4230
+ update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config
4231
+ @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config
4232
+ update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings
4233
+ @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config
4234
+ update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module
4235
+ @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config
4236
+ update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source
4237
+ @update_source = ::Gapic::Config::Method.new update_source_config
4238
+ update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks
4239
+ @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config
4240
+ create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export
4241
+ @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config
4242
+ delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export
4243
+ @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config
4244
+ update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export
4245
+ @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config
4246
+ list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports
4247
+ @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config
4248
+
4249
+ yield self if block_given?
4250
+ end
4251
+ end
4252
+ end
4253
+ end
4254
+ end
4255
+ end
4256
+ end
4257
+ end
4258
+ end
4259
+ end