google-cloud-security_center_management-v1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/security_center_management/v1/bindings_override.rb +102 -0
  6. data/lib/google/cloud/security_center_management/v1/rest.rb +38 -0
  7. data/lib/google/cloud/security_center_management/v1/security_center_management/client.rb +2668 -0
  8. data/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb +47 -0
  9. data/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb +374 -0
  10. data/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb +2503 -0
  11. data/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb +1623 -0
  12. data/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb +53 -0
  13. data/lib/google/cloud/security_center_management/v1/security_center_management.rb +55 -0
  14. data/lib/google/cloud/security_center_management/v1/version.rb +7 -2
  15. data/lib/google/cloud/security_center_management/v1.rb +45 -0
  16. data/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb +114 -0
  17. data/lib/google/cloud/securitycentermanagement/v1/security_center_management_services_pb.rb +122 -0
  18. data/lib/google-cloud-security_center_management-v1.rb +21 -0
  19. data/proto_docs/README.md +4 -0
  20. data/proto_docs/google/api/client.rb +399 -0
  21. data/proto_docs/google/api/field_behavior.rb +85 -0
  22. data/proto_docs/google/api/launch_stage.rb +71 -0
  23. data/proto_docs/google/api/resource.rb +222 -0
  24. data/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb +1230 -0
  25. data/proto_docs/google/iam/v1/policy.rb +426 -0
  26. data/proto_docs/google/protobuf/any.rb +145 -0
  27. data/proto_docs/google/protobuf/duration.rb +98 -0
  28. data/proto_docs/google/protobuf/empty.rb +34 -0
  29. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  30. data/proto_docs/google/protobuf/struct.rb +96 -0
  31. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  32. data/proto_docs/google/rpc/status.rb +48 -0
  33. data/proto_docs/google/type/expr.rb +75 -0
  34. metadata +112 -11
@@ -0,0 +1,2503 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/securitycentermanagement/v1/security_center_management_pb"
21
+ require "google/cloud/security_center_management/v1/security_center_management/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module SecurityCenterManagement
27
+ module V1
28
+ module SecurityCenterManagement
29
+ module Rest
30
+ ##
31
+ # REST client for the SecurityCenterManagement service.
32
+ #
33
+ # Service describing handlers for resources
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "securitycentermanagement.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :security_center_management_stub
46
+
47
+ ##
48
+ # Configure the SecurityCenterManagement Client class.
49
+ #
50
+ # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all SecurityCenterManagement clients
56
+ # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "SecurityCenterManagement", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0
77
+ default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = {
78
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
79
+ }
80
+
81
+ default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0
82
+ default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = {
83
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
84
+ }
85
+
86
+ default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0
87
+ default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = {
88
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
89
+ }
90
+
91
+ default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0
92
+ default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = {
93
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
94
+ }
95
+
96
+ default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0
97
+ default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = {
98
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
99
+ }
100
+
101
+ default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0
102
+
103
+ default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0
104
+
105
+ default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0
106
+
107
+ default_config.rpcs.simulate_security_health_analytics_custom_module.timeout = 60.0
108
+ default_config.rpcs.simulate_security_health_analytics_custom_module.retry_policy = {
109
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
110
+ }
111
+
112
+ default_config.rpcs.list_effective_event_threat_detection_custom_modules.timeout = 60.0
113
+ default_config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy = {
114
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
115
+ }
116
+
117
+ default_config.rpcs.get_effective_event_threat_detection_custom_module.timeout = 60.0
118
+ default_config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy = {
119
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
120
+ }
121
+
122
+ default_config.rpcs.list_event_threat_detection_custom_modules.timeout = 60.0
123
+ default_config.rpcs.list_event_threat_detection_custom_modules.retry_policy = {
124
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
125
+ }
126
+
127
+ default_config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout = 60.0
128
+ default_config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy = {
129
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
130
+ }
131
+
132
+ default_config.rpcs.get_event_threat_detection_custom_module.timeout = 60.0
133
+ default_config.rpcs.get_event_threat_detection_custom_module.retry_policy = {
134
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
135
+ }
136
+
137
+ default_config.rpcs.create_event_threat_detection_custom_module.timeout = 60.0
138
+
139
+ default_config.rpcs.update_event_threat_detection_custom_module.timeout = 60.0
140
+
141
+ default_config.rpcs.delete_event_threat_detection_custom_module.timeout = 60.0
142
+
143
+ default_config.rpcs.validate_event_threat_detection_custom_module.timeout = 60.0
144
+ default_config.rpcs.validate_event_threat_detection_custom_module.retry_policy = {
145
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
146
+ }
147
+
148
+ default_config
149
+ end
150
+ yield @configure if block_given?
151
+ @configure
152
+ end
153
+
154
+ ##
155
+ # Configure the SecurityCenterManagement Client instance.
156
+ #
157
+ # The configuration is set to the derived mode, meaning that values can be changed,
158
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
159
+ # should be made on {Client.configure}.
160
+ #
161
+ # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration}
162
+ # for a description of the configuration fields.
163
+ #
164
+ # @yield [config] Configure the Client client.
165
+ # @yieldparam config [Client::Configuration]
166
+ #
167
+ # @return [Client::Configuration]
168
+ #
169
+ def configure
170
+ yield @config if block_given?
171
+ @config
172
+ end
173
+
174
+ ##
175
+ # The effective universe domain
176
+ #
177
+ # @return [String]
178
+ #
179
+ def universe_domain
180
+ @security_center_management_stub.universe_domain
181
+ end
182
+
183
+ ##
184
+ # Create a new SecurityCenterManagement REST client object.
185
+ #
186
+ # @example
187
+ #
188
+ # # Create a client using the default configuration
189
+ # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
190
+ #
191
+ # # Create a client using a custom configuration
192
+ # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config|
193
+ # config.timeout = 10.0
194
+ # end
195
+ #
196
+ # @yield [config] Configure the SecurityCenterManagement client.
197
+ # @yieldparam config [Client::Configuration]
198
+ #
199
+ def initialize
200
+ # Create the configuration object
201
+ @config = Configuration.new Client.configure
202
+
203
+ # Yield the configuration if needed
204
+ yield @config if block_given?
205
+
206
+ # Create credentials
207
+ credentials = @config.credentials
208
+ # Use self-signed JWT if the endpoint is unchanged from default,
209
+ # but only if the default endpoint does not have a region prefix.
210
+ enable_self_signed_jwt = @config.endpoint.nil? ||
211
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
212
+ !@config.endpoint.split(".").first.include?("-"))
213
+ credentials ||= Credentials.default scope: @config.scope,
214
+ enable_self_signed_jwt: enable_self_signed_jwt
215
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
216
+ credentials = Credentials.new credentials, scope: @config.scope
217
+ end
218
+
219
+ @quota_project_id = @config.quota_project
220
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
221
+
222
+ @security_center_management_stub = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.new(
223
+ endpoint: @config.endpoint,
224
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
225
+ universe_domain: @config.universe_domain,
226
+ credentials: credentials
227
+ )
228
+
229
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
230
+ config.credentials = credentials
231
+ config.quota_project = @quota_project_id
232
+ config.endpoint = @security_center_management_stub.endpoint
233
+ config.universe_domain = @security_center_management_stub.universe_domain
234
+ config.bindings_override = @config.bindings_override
235
+ end
236
+ end
237
+
238
+ ##
239
+ # Get the associated client for mix-in of the Locations.
240
+ #
241
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
242
+ #
243
+ attr_reader :location_client
244
+
245
+ # Service calls
246
+
247
+ ##
248
+ # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the
249
+ # given parent. This includes resident modules defined at the scope of the
250
+ # parent, and inherited modules, inherited from CRM ancestors (no
251
+ # descendants).
252
+ #
253
+ # @overload list_effective_security_health_analytics_custom_modules(request, options = nil)
254
+ # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type
255
+ # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
256
+ #
257
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
258
+ # A request object representing the call parameters. Required. To specify no
259
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
260
+ # @param options [::Gapic::CallOptions, ::Hash]
261
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
262
+ #
263
+ # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
264
+ # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at
265
+ # least one keyword argument is required. To specify no parameters, or to keep all
266
+ # the default parameter values, pass an empty Hash as a request object (see above).
267
+ #
268
+ # @param parent [::String]
269
+ # Required. Name of parent to list effective custom modules. specified in one
270
+ # of the following formats:
271
+ # * `organizations/{organization}/locations/{location}`
272
+ # * `folders/{folder}/locations/{location}`
273
+ # or
274
+ # `projects/{project}/locations/{location}`
275
+ # @param page_size [::Integer]
276
+ # Optional. The maximum number of results to return in a single response.
277
+ # Default is 10, minimum is 1, maximum is 1000.
278
+ # @param page_token [::String]
279
+ # Optional. The value returned by the last call indicating a continuation.
280
+ # @yield [result, operation] Access the result along with the TransportOperation object
281
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>]
282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
283
+ #
284
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>]
285
+ #
286
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
287
+ #
288
+ # @example Basic example
289
+ # require "google/cloud/security_center_management/v1"
290
+ #
291
+ # # Create a client object. The client can be reused for multiple calls.
292
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
293
+ #
294
+ # # Create a request. To set request fields, pass in keyword arguments.
295
+ # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new
296
+ #
297
+ # # Call the list_effective_security_health_analytics_custom_modules method.
298
+ # result = client.list_effective_security_health_analytics_custom_modules request
299
+ #
300
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
301
+ # # over elements, and API calls will be issued to fetch pages as needed.
302
+ # result.each do |item|
303
+ # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.
304
+ # p item
305
+ # end
306
+ #
307
+ def list_effective_security_health_analytics_custom_modules request, options = nil
308
+ raise ::ArgumentError, "request must be provided" if request.nil?
309
+
310
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest
311
+
312
+ # Converts hash and nil to an options object
313
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
314
+
315
+ # Customize the options with defaults
316
+ call_metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h
317
+
318
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
319
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
320
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
321
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
322
+ transports_version_send: [:rest]
323
+
324
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
325
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
326
+
327
+ options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout,
328
+ metadata: call_metadata,
329
+ retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy
330
+
331
+ options.apply_defaults timeout: @config.timeout,
332
+ metadata: @config.metadata,
333
+ retry_policy: @config.retry_policy
334
+
335
+ @security_center_management_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation|
336
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options
337
+ yield result, operation if block_given?
338
+ return result
339
+ end
340
+ rescue ::Gapic::Rest::Error => e
341
+ raise ::Google::Cloud::Error.from_error(e)
342
+ end
343
+
344
+ ##
345
+ # Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule.
346
+ #
347
+ # @overload get_effective_security_health_analytics_custom_module(request, options = nil)
348
+ # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type
349
+ # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
350
+ #
351
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
352
+ # A request object representing the call parameters. Required. To specify no
353
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
354
+ # @param options [::Gapic::CallOptions, ::Hash]
355
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
356
+ #
357
+ # @overload get_effective_security_health_analytics_custom_module(name: nil)
358
+ # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at
359
+ # least one keyword argument is required. To specify no parameters, or to keep all
360
+ # the default parameter values, pass an empty Hash as a request object (see above).
361
+ #
362
+ # @param name [::String]
363
+ # Required. The full resource name of the custom module, specified in one of
364
+ # the following formats:
365
+ #
366
+ # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}`
367
+ # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}`
368
+ # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}`
369
+ # @yield [result, operation] Access the result along with the TransportOperation object
370
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule]
371
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
372
+ #
373
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule]
374
+ #
375
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
376
+ #
377
+ # @example Basic example
378
+ # require "google/cloud/security_center_management/v1"
379
+ #
380
+ # # Create a client object. The client can be reused for multiple calls.
381
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
382
+ #
383
+ # # Create a request. To set request fields, pass in keyword arguments.
384
+ # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new
385
+ #
386
+ # # Call the get_effective_security_health_analytics_custom_module method.
387
+ # result = client.get_effective_security_health_analytics_custom_module request
388
+ #
389
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.
390
+ # p result
391
+ #
392
+ def get_effective_security_health_analytics_custom_module request, options = nil
393
+ raise ::ArgumentError, "request must be provided" if request.nil?
394
+
395
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest
396
+
397
+ # Converts hash and nil to an options object
398
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
399
+
400
+ # Customize the options with defaults
401
+ call_metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h
402
+
403
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
404
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
405
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
406
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
407
+ transports_version_send: [:rest]
408
+
409
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
410
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
411
+
412
+ options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout,
413
+ metadata: call_metadata,
414
+ retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy
415
+
416
+ options.apply_defaults timeout: @config.timeout,
417
+ metadata: @config.metadata,
418
+ retry_policy: @config.retry_policy
419
+
420
+ @security_center_management_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation|
421
+ yield result, operation if block_given?
422
+ return result
423
+ end
424
+ rescue ::Gapic::Rest::Error => e
425
+ raise ::Google::Cloud::Error.from_error(e)
426
+ end
427
+
428
+ ##
429
+ # Returns a list of all SecurityHealthAnalyticsCustomModules for the given
430
+ # parent. This includes resident modules defined at the scope of the parent,
431
+ # and inherited modules, inherited from CRM ancestors (no descendants).
432
+ #
433
+ # @overload list_security_health_analytics_custom_modules(request, options = nil)
434
+ # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type
435
+ # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
436
+ #
437
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
438
+ # A request object representing the call parameters. Required. To specify no
439
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
440
+ # @param options [::Gapic::CallOptions, ::Hash]
441
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
442
+ #
443
+ # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
444
+ # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at
445
+ # least one keyword argument is required. To specify no parameters, or to keep all
446
+ # the default parameter values, pass an empty Hash as a request object (see above).
447
+ #
448
+ # @param parent [::String]
449
+ # Required. Name of parent organization, folder, or project in which to list
450
+ # custom modules, specified in one of the following formats:
451
+ #
452
+ # * `organizations/{organization}/locations/{location}`
453
+ # * `folders/{folder}/locations/{location}`
454
+ # * `projects/{project}/locations/{location}`
455
+ # @param page_size [::Integer]
456
+ # Optional. The maximum number of results to return in a single response.
457
+ # Default is 10, minimum is 1, maximum is 1000.
458
+ # @param page_token [::String]
459
+ # Optional. A token identifying a page of results the server should return.
460
+ # @yield [result, operation] Access the result along with the TransportOperation object
461
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>]
462
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
463
+ #
464
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>]
465
+ #
466
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
467
+ #
468
+ # @example Basic example
469
+ # require "google/cloud/security_center_management/v1"
470
+ #
471
+ # # Create a client object. The client can be reused for multiple calls.
472
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
473
+ #
474
+ # # Create a request. To set request fields, pass in keyword arguments.
475
+ # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new
476
+ #
477
+ # # Call the list_security_health_analytics_custom_modules method.
478
+ # result = client.list_security_health_analytics_custom_modules request
479
+ #
480
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
481
+ # # over elements, and API calls will be issued to fetch pages as needed.
482
+ # result.each do |item|
483
+ # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
484
+ # p item
485
+ # end
486
+ #
487
+ def list_security_health_analytics_custom_modules request, options = nil
488
+ raise ::ArgumentError, "request must be provided" if request.nil?
489
+
490
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest
491
+
492
+ # Converts hash and nil to an options object
493
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
494
+
495
+ # Customize the options with defaults
496
+ call_metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h
497
+
498
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
499
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
500
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
501
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
502
+ transports_version_send: [:rest]
503
+
504
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
505
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
+
507
+ options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout,
508
+ metadata: call_metadata,
509
+ retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy
510
+
511
+ options.apply_defaults timeout: @config.timeout,
512
+ metadata: @config.metadata,
513
+ retry_policy: @config.retry_policy
514
+
515
+ @security_center_management_stub.list_security_health_analytics_custom_modules request, options do |result, operation|
516
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options
517
+ yield result, operation if block_given?
518
+ return result
519
+ end
520
+ rescue ::Gapic::Rest::Error => e
521
+ raise ::Google::Cloud::Error.from_error(e)
522
+ end
523
+
524
+ ##
525
+ # Returns a list of all resident SecurityHealthAnalyticsCustomModules under
526
+ # the given CRM parent and all of the parent's CRM descendants.
527
+ #
528
+ # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil)
529
+ # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type
530
+ # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash.
531
+ #
532
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash]
533
+ # A request object representing the call parameters. Required. To specify no
534
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
535
+ # @param options [::Gapic::CallOptions, ::Hash]
536
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
537
+ #
538
+ # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil)
539
+ # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at
540
+ # least one keyword argument is required. To specify no parameters, or to keep all
541
+ # the default parameter values, pass an empty Hash as a request object (see above).
542
+ #
543
+ # @param parent [::String]
544
+ # Required. Name of the parent organization, folder, or project in which to
545
+ # list custom modules, specified in one of the following formats:
546
+ #
547
+ # * `organizations/{organization}/locations/{location}`
548
+ # * `folders/{folder}/locations/{location}`
549
+ # * `projects/{project}/locations/{location}`
550
+ # @param page_size [::Integer]
551
+ # Optional. The maximum number of results to return in a single response.
552
+ # Default is 10, minimum is 1, maximum is 1000.
553
+ # @param page_token [::String]
554
+ # Optional. A token identifying a page of results the server should return.
555
+ # @yield [result, operation] Access the result along with the TransportOperation object
556
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>]
557
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
558
+ #
559
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>]
560
+ #
561
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
562
+ #
563
+ # @example Basic example
564
+ # require "google/cloud/security_center_management/v1"
565
+ #
566
+ # # Create a client object. The client can be reused for multiple calls.
567
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
568
+ #
569
+ # # Create a request. To set request fields, pass in keyword arguments.
570
+ # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new
571
+ #
572
+ # # Call the list_descendant_security_health_analytics_custom_modules method.
573
+ # result = client.list_descendant_security_health_analytics_custom_modules request
574
+ #
575
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
576
+ # # over elements, and API calls will be issued to fetch pages as needed.
577
+ # result.each do |item|
578
+ # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
579
+ # p item
580
+ # end
581
+ #
582
+ def list_descendant_security_health_analytics_custom_modules request, options = nil
583
+ raise ::ArgumentError, "request must be provided" if request.nil?
584
+
585
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest
586
+
587
+ # Converts hash and nil to an options object
588
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
589
+
590
+ # Customize the options with defaults
591
+ call_metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h
592
+
593
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
594
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
595
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
596
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
597
+ transports_version_send: [:rest]
598
+
599
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
600
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
601
+
602
+ options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout,
603
+ metadata: call_metadata,
604
+ retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy
605
+
606
+ options.apply_defaults timeout: @config.timeout,
607
+ metadata: @config.metadata,
608
+ retry_policy: @config.retry_policy
609
+
610
+ @security_center_management_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation|
611
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options
612
+ yield result, operation if block_given?
613
+ return result
614
+ end
615
+ rescue ::Gapic::Rest::Error => e
616
+ raise ::Google::Cloud::Error.from_error(e)
617
+ end
618
+
619
+ ##
620
+ # Retrieves a SecurityHealthAnalyticsCustomModule.
621
+ #
622
+ # @overload get_security_health_analytics_custom_module(request, options = nil)
623
+ # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type
624
+ # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
625
+ #
626
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
627
+ # A request object representing the call parameters. Required. To specify no
628
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
629
+ # @param options [::Gapic::CallOptions, ::Hash]
630
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
631
+ #
632
+ # @overload get_security_health_analytics_custom_module(name: nil)
633
+ # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at
634
+ # least one keyword argument is required. To specify no parameters, or to keep all
635
+ # the default parameter values, pass an empty Hash as a request object (see above).
636
+ #
637
+ # @param name [::String]
638
+ # Required. Name of the resource
639
+ # @yield [result, operation] Access the result along with the TransportOperation object
640
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
641
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
642
+ #
643
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
644
+ #
645
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
646
+ #
647
+ # @example Basic example
648
+ # require "google/cloud/security_center_management/v1"
649
+ #
650
+ # # Create a client object. The client can be reused for multiple calls.
651
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
652
+ #
653
+ # # Create a request. To set request fields, pass in keyword arguments.
654
+ # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new
655
+ #
656
+ # # Call the get_security_health_analytics_custom_module method.
657
+ # result = client.get_security_health_analytics_custom_module request
658
+ #
659
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
660
+ # p result
661
+ #
662
+ def get_security_health_analytics_custom_module request, options = nil
663
+ raise ::ArgumentError, "request must be provided" if request.nil?
664
+
665
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest
666
+
667
+ # Converts hash and nil to an options object
668
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
669
+
670
+ # Customize the options with defaults
671
+ call_metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h
672
+
673
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
674
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
675
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
676
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
677
+ transports_version_send: [:rest]
678
+
679
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
680
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
681
+
682
+ options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout,
683
+ metadata: call_metadata,
684
+ retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy
685
+
686
+ options.apply_defaults timeout: @config.timeout,
687
+ metadata: @config.metadata,
688
+ retry_policy: @config.retry_policy
689
+
690
+ @security_center_management_stub.get_security_health_analytics_custom_module request, options do |result, operation|
691
+ yield result, operation if block_given?
692
+ return result
693
+ end
694
+ rescue ::Gapic::Rest::Error => e
695
+ raise ::Google::Cloud::Error.from_error(e)
696
+ end
697
+
698
+ ##
699
+ # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the
700
+ # given CRM parent, and also creates inherited
701
+ # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given
702
+ # parent. These modules are enabled by default.
703
+ #
704
+ # @overload create_security_health_analytics_custom_module(request, options = nil)
705
+ # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type
706
+ # {::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
707
+ #
708
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
709
+ # A request object representing the call parameters. Required. To specify no
710
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
711
+ # @param options [::Gapic::CallOptions, ::Hash]
712
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
713
+ #
714
+ # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil, validate_only: nil)
715
+ # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at
716
+ # least one keyword argument is required. To specify no parameters, or to keep all
717
+ # the default parameter values, pass an empty Hash as a request object (see above).
718
+ #
719
+ # @param parent [::String]
720
+ # Required. Name of the parent organization, folder, or project of the
721
+ # module, specified in one of the following formats:
722
+ #
723
+ # * `organizations/{organization}/locations/{location}`
724
+ # * `folders/{folder}/locations/{location}`
725
+ # * `projects/{project}/locations/{location}`
726
+ # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
727
+ # Required. The resource being created
728
+ # @param validate_only [::Boolean]
729
+ # Optional. When set to true, only validations (including IAM checks) will
730
+ # done for the request (no module will be created). An OK response indicates
731
+ # the request is valid while an error response indicates the request is
732
+ # invalid. Note that a subsequent request to actually create the module could
733
+ # still fail because:
734
+ # 1. the state could have changed (e.g. IAM permission lost) or
735
+ # 2. A failure occurred during creation of the module.
736
+ # Defaults to false.
737
+ # @yield [result, operation] Access the result along with the TransportOperation object
738
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
739
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
740
+ #
741
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
742
+ #
743
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
744
+ #
745
+ # @example Basic example
746
+ # require "google/cloud/security_center_management/v1"
747
+ #
748
+ # # Create a client object. The client can be reused for multiple calls.
749
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
750
+ #
751
+ # # Create a request. To set request fields, pass in keyword arguments.
752
+ # request = Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new
753
+ #
754
+ # # Call the create_security_health_analytics_custom_module method.
755
+ # result = client.create_security_health_analytics_custom_module request
756
+ #
757
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
758
+ # p result
759
+ #
760
+ def create_security_health_analytics_custom_module request, options = nil
761
+ raise ::ArgumentError, "request must be provided" if request.nil?
762
+
763
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest
764
+
765
+ # Converts hash and nil to an options object
766
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
767
+
768
+ # Customize the options with defaults
769
+ call_metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h
770
+
771
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
772
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
773
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
774
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
775
+ transports_version_send: [:rest]
776
+
777
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
778
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
779
+
780
+ options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout,
781
+ metadata: call_metadata,
782
+ retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy
783
+
784
+ options.apply_defaults timeout: @config.timeout,
785
+ metadata: @config.metadata,
786
+ retry_policy: @config.retry_policy
787
+
788
+ @security_center_management_stub.create_security_health_analytics_custom_module request, options do |result, operation|
789
+ yield result, operation if block_given?
790
+ return result
791
+ end
792
+ rescue ::Gapic::Rest::Error => e
793
+ raise ::Google::Cloud::Error.from_error(e)
794
+ end
795
+
796
+ ##
797
+ # Updates the SecurityHealthAnalyticsCustomModule under the given name based
798
+ # on the given update mask. Updating the enablement state is supported on
799
+ # both resident and inherited modules (though resident modules cannot have an
800
+ # enablement state of "inherited"). Updating the display name and custom
801
+ # config of a module is supported on resident modules only.
802
+ #
803
+ # @overload update_security_health_analytics_custom_module(request, options = nil)
804
+ # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type
805
+ # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
806
+ #
807
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
808
+ # A request object representing the call parameters. Required. To specify no
809
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
810
+ # @param options [::Gapic::CallOptions, ::Hash]
811
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
812
+ #
813
+ # @overload update_security_health_analytics_custom_module(update_mask: nil, security_health_analytics_custom_module: nil, validate_only: nil)
814
+ # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at
815
+ # least one keyword argument is required. To specify no parameters, or to keep all
816
+ # the default parameter values, pass an empty Hash as a request object (see above).
817
+ #
818
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
819
+ # Required. The list of fields to be updated. The only fields that can be
820
+ # updated are `enablement_state` and `custom_config`. If empty or set to the
821
+ # wildcard value `*`, both `enablement_state` and `custom_config` are
822
+ # updated.
823
+ # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
824
+ # Required. The resource being updated
825
+ # @param validate_only [::Boolean]
826
+ # Optional. When set to true, only validations (including IAM checks) will
827
+ # done for the request (module will not be updated). An OK response indicates
828
+ # the request is valid while an error response indicates the request is
829
+ # invalid. Note that a subsequent request to actually update the module could
830
+ # still fail because 1. the state could have changed (e.g. IAM permission
831
+ # lost) or
832
+ # 2. A failure occurred while trying to update the module.
833
+ # @yield [result, operation] Access the result along with the TransportOperation object
834
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
835
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
836
+ #
837
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
838
+ #
839
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
840
+ #
841
+ # @example Basic example
842
+ # require "google/cloud/security_center_management/v1"
843
+ #
844
+ # # Create a client object. The client can be reused for multiple calls.
845
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
846
+ #
847
+ # # Create a request. To set request fields, pass in keyword arguments.
848
+ # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new
849
+ #
850
+ # # Call the update_security_health_analytics_custom_module method.
851
+ # result = client.update_security_health_analytics_custom_module request
852
+ #
853
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
854
+ # p result
855
+ #
856
+ def update_security_health_analytics_custom_module request, options = nil
857
+ raise ::ArgumentError, "request must be provided" if request.nil?
858
+
859
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest
860
+
861
+ # Converts hash and nil to an options object
862
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
863
+
864
+ # Customize the options with defaults
865
+ call_metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h
866
+
867
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
868
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
869
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
870
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
871
+ transports_version_send: [:rest]
872
+
873
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
874
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
875
+
876
+ options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout,
877
+ metadata: call_metadata,
878
+ retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy
879
+
880
+ options.apply_defaults timeout: @config.timeout,
881
+ metadata: @config.metadata,
882
+ retry_policy: @config.retry_policy
883
+
884
+ @security_center_management_stub.update_security_health_analytics_custom_module request, options do |result, operation|
885
+ yield result, operation if block_given?
886
+ return result
887
+ end
888
+ rescue ::Gapic::Rest::Error => e
889
+ raise ::Google::Cloud::Error.from_error(e)
890
+ end
891
+
892
+ ##
893
+ # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its
894
+ # descendants in the CRM hierarchy. This method is only supported for
895
+ # resident custom modules.
896
+ #
897
+ # @overload delete_security_health_analytics_custom_module(request, options = nil)
898
+ # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type
899
+ # {::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
900
+ #
901
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
902
+ # A request object representing the call parameters. Required. To specify no
903
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
904
+ # @param options [::Gapic::CallOptions, ::Hash]
905
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
906
+ #
907
+ # @overload delete_security_health_analytics_custom_module(name: nil, validate_only: nil)
908
+ # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at
909
+ # least one keyword argument is required. To specify no parameters, or to keep all
910
+ # the default parameter values, pass an empty Hash as a request object (see above).
911
+ #
912
+ # @param name [::String]
913
+ # Required. The resource name of the SHA custom module.
914
+ #
915
+ # Its format is:
916
+ #
917
+ # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`.
918
+ # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`.
919
+ # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`.
920
+ # @param validate_only [::Boolean]
921
+ # Optional. When set to true, only validations (including IAM checks) will
922
+ # done for the request (module will not be deleted). An OK response indicates
923
+ # the request is valid while an error response indicates the request is
924
+ # invalid. Note that a subsequent request to actually delete the module could
925
+ # still fail because 1. the state could have changed (e.g. IAM permission
926
+ # lost) or
927
+ # 2. A failure occurred while trying to delete the module.
928
+ # @yield [result, operation] Access the result along with the TransportOperation object
929
+ # @yieldparam result [::Google::Protobuf::Empty]
930
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
931
+ #
932
+ # @return [::Google::Protobuf::Empty]
933
+ #
934
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
935
+ #
936
+ # @example Basic example
937
+ # require "google/cloud/security_center_management/v1"
938
+ #
939
+ # # Create a client object. The client can be reused for multiple calls.
940
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
941
+ #
942
+ # # Create a request. To set request fields, pass in keyword arguments.
943
+ # request = Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new
944
+ #
945
+ # # Call the delete_security_health_analytics_custom_module method.
946
+ # result = client.delete_security_health_analytics_custom_module request
947
+ #
948
+ # # The returned object is of type Google::Protobuf::Empty.
949
+ # p result
950
+ #
951
+ def delete_security_health_analytics_custom_module request, options = nil
952
+ raise ::ArgumentError, "request must be provided" if request.nil?
953
+
954
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest
955
+
956
+ # Converts hash and nil to an options object
957
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
958
+
959
+ # Customize the options with defaults
960
+ call_metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h
961
+
962
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
963
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
964
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
965
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
966
+ transports_version_send: [:rest]
967
+
968
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
969
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
970
+
971
+ options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout,
972
+ metadata: call_metadata,
973
+ retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy
974
+
975
+ options.apply_defaults timeout: @config.timeout,
976
+ metadata: @config.metadata,
977
+ retry_policy: @config.retry_policy
978
+
979
+ @security_center_management_stub.delete_security_health_analytics_custom_module request, options do |result, operation|
980
+ yield result, operation if block_given?
981
+ return result
982
+ end
983
+ rescue ::Gapic::Rest::Error => e
984
+ raise ::Google::Cloud::Error.from_error(e)
985
+ end
986
+
987
+ ##
988
+ # Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
989
+ #
990
+ # @overload simulate_security_health_analytics_custom_module(request, options = nil)
991
+ # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type
992
+ # {::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash.
993
+ #
994
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash]
995
+ # A request object representing the call parameters. Required. To specify no
996
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
997
+ # @param options [::Gapic::CallOptions, ::Hash]
998
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
999
+ #
1000
+ # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil)
1001
+ # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at
1002
+ # least one keyword argument is required. To specify no parameters, or to keep all
1003
+ # the default parameter values, pass an empty Hash as a request object (see above).
1004
+ #
1005
+ # @param parent [::String]
1006
+ # Required. The relative resource name of the organization, project, or
1007
+ # folder. For more information about relative resource names, see [Relative
1008
+ # Resource
1009
+ # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
1010
+ # Example: `organizations/{organization_id}`.
1011
+ # @param custom_config [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig, ::Hash]
1012
+ # Required. The custom configuration that you need to test.
1013
+ # @param resource [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash]
1014
+ # Required. Resource data to simulate custom module against.
1015
+ # @yield [result, operation] Access the result along with the TransportOperation object
1016
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse]
1017
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1018
+ #
1019
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse]
1020
+ #
1021
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1022
+ #
1023
+ # @example Basic example
1024
+ # require "google/cloud/security_center_management/v1"
1025
+ #
1026
+ # # Create a client object. The client can be reused for multiple calls.
1027
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1028
+ #
1029
+ # # Create a request. To set request fields, pass in keyword arguments.
1030
+ # request = Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new
1031
+ #
1032
+ # # Call the simulate_security_health_analytics_custom_module method.
1033
+ # result = client.simulate_security_health_analytics_custom_module request
1034
+ #
1035
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.
1036
+ # p result
1037
+ #
1038
+ def simulate_security_health_analytics_custom_module request, options = nil
1039
+ raise ::ArgumentError, "request must be provided" if request.nil?
1040
+
1041
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest
1042
+
1043
+ # Converts hash and nil to an options object
1044
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1045
+
1046
+ # Customize the options with defaults
1047
+ call_metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h
1048
+
1049
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1050
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1051
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1052
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1053
+ transports_version_send: [:rest]
1054
+
1055
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1056
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1057
+
1058
+ options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout,
1059
+ metadata: call_metadata,
1060
+ retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy
1061
+
1062
+ options.apply_defaults timeout: @config.timeout,
1063
+ metadata: @config.metadata,
1064
+ retry_policy: @config.retry_policy
1065
+
1066
+ @security_center_management_stub.simulate_security_health_analytics_custom_module request, options do |result, operation|
1067
+ yield result, operation if block_given?
1068
+ return result
1069
+ end
1070
+ rescue ::Gapic::Rest::Error => e
1071
+ raise ::Google::Cloud::Error.from_error(e)
1072
+ end
1073
+
1074
+ ##
1075
+ # Lists all effective Event Threat Detection custom modules for the
1076
+ # given parent. This includes resident modules defined at the scope of the
1077
+ # parent along with modules inherited from its ancestors.
1078
+ #
1079
+ # @overload list_effective_event_threat_detection_custom_modules(request, options = nil)
1080
+ # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type
1081
+ # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
1082
+ #
1083
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash]
1084
+ # A request object representing the call parameters. Required. To specify no
1085
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1086
+ # @param options [::Gapic::CallOptions, ::Hash]
1087
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1088
+ #
1089
+ # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil)
1090
+ # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at
1091
+ # least one keyword argument is required. To specify no parameters, or to keep all
1092
+ # the default parameter values, pass an empty Hash as a request object (see above).
1093
+ #
1094
+ # @param parent [::String]
1095
+ # Required. Name of parent to list effective custom modules. Its format is
1096
+ # `organizations/{organization}/locations/{location}`,
1097
+ # `folders/{folder}/locations/{location}`,
1098
+ # or
1099
+ # `projects/{project}/locations/{location}`
1100
+ # @param page_size [::Integer]
1101
+ # Optional. The maximum number of results to return in a single response.
1102
+ # Default is 10, minimum is 1, maximum is 1000.
1103
+ # @param page_token [::String]
1104
+ # Optional. The value returned by the last call indicating a continuation
1105
+ # @yield [result, operation] Access the result along with the TransportOperation object
1106
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>]
1107
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1108
+ #
1109
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>]
1110
+ #
1111
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1112
+ #
1113
+ # @example Basic example
1114
+ # require "google/cloud/security_center_management/v1"
1115
+ #
1116
+ # # Create a client object. The client can be reused for multiple calls.
1117
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1118
+ #
1119
+ # # Create a request. To set request fields, pass in keyword arguments.
1120
+ # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new
1121
+ #
1122
+ # # Call the list_effective_event_threat_detection_custom_modules method.
1123
+ # result = client.list_effective_event_threat_detection_custom_modules request
1124
+ #
1125
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1126
+ # # over elements, and API calls will be issued to fetch pages as needed.
1127
+ # result.each do |item|
1128
+ # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.
1129
+ # p item
1130
+ # end
1131
+ #
1132
+ def list_effective_event_threat_detection_custom_modules request, options = nil
1133
+ raise ::ArgumentError, "request must be provided" if request.nil?
1134
+
1135
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest
1136
+
1137
+ # Converts hash and nil to an options object
1138
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1139
+
1140
+ # Customize the options with defaults
1141
+ call_metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h
1142
+
1143
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1144
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1145
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1146
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1147
+ transports_version_send: [:rest]
1148
+
1149
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1150
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1151
+
1152
+ options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout,
1153
+ metadata: call_metadata,
1154
+ retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy
1155
+
1156
+ options.apply_defaults timeout: @config.timeout,
1157
+ metadata: @config.metadata,
1158
+ retry_policy: @config.retry_policy
1159
+
1160
+ @security_center_management_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation|
1161
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options
1162
+ yield result, operation if block_given?
1163
+ return result
1164
+ end
1165
+ rescue ::Gapic::Rest::Error => e
1166
+ raise ::Google::Cloud::Error.from_error(e)
1167
+ end
1168
+
1169
+ ##
1170
+ # Gets an effective ETD custom module. Retrieves the effective module at the
1171
+ # given level. The difference between an EffectiveCustomModule and a
1172
+ # CustomModule is that the fields for an EffectiveCustomModule are computed
1173
+ # from ancestors if needed. For example, the enablement_state for a
1174
+ # CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the
1175
+ # enablement_state for an EffectiveCustomModule is always computed to ENABLED
1176
+ # or DISABLED (the effective enablement_state).
1177
+ #
1178
+ # @overload get_effective_event_threat_detection_custom_module(request, options = nil)
1179
+ # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type
1180
+ # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
1181
+ #
1182
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash]
1183
+ # A request object representing the call parameters. Required. To specify no
1184
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1185
+ # @param options [::Gapic::CallOptions, ::Hash]
1186
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1187
+ #
1188
+ # @overload get_effective_event_threat_detection_custom_module(name: nil)
1189
+ # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at
1190
+ # least one keyword argument is required. To specify no parameters, or to keep all
1191
+ # the default parameter values, pass an empty Hash as a request object (see above).
1192
+ #
1193
+ # @param name [::String]
1194
+ # Required. The resource name of the ETD custom module.
1195
+ #
1196
+ # Its format is:
1197
+ #
1198
+ # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`.
1199
+ # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`.
1200
+ # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`.
1201
+ # @yield [result, operation] Access the result along with the TransportOperation object
1202
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule]
1203
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1204
+ #
1205
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule]
1206
+ #
1207
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1208
+ #
1209
+ # @example Basic example
1210
+ # require "google/cloud/security_center_management/v1"
1211
+ #
1212
+ # # Create a client object. The client can be reused for multiple calls.
1213
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1214
+ #
1215
+ # # Create a request. To set request fields, pass in keyword arguments.
1216
+ # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new
1217
+ #
1218
+ # # Call the get_effective_event_threat_detection_custom_module method.
1219
+ # result = client.get_effective_event_threat_detection_custom_module request
1220
+ #
1221
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.
1222
+ # p result
1223
+ #
1224
+ def get_effective_event_threat_detection_custom_module request, options = nil
1225
+ raise ::ArgumentError, "request must be provided" if request.nil?
1226
+
1227
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest
1228
+
1229
+ # Converts hash and nil to an options object
1230
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1231
+
1232
+ # Customize the options with defaults
1233
+ call_metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h
1234
+
1235
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1236
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1237
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1238
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1239
+ transports_version_send: [:rest]
1240
+
1241
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1242
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1243
+
1244
+ options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout,
1245
+ metadata: call_metadata,
1246
+ retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy
1247
+
1248
+ options.apply_defaults timeout: @config.timeout,
1249
+ metadata: @config.metadata,
1250
+ retry_policy: @config.retry_policy
1251
+
1252
+ @security_center_management_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation|
1253
+ yield result, operation if block_given?
1254
+ return result
1255
+ end
1256
+ rescue ::Gapic::Rest::Error => e
1257
+ raise ::Google::Cloud::Error.from_error(e)
1258
+ end
1259
+
1260
+ ##
1261
+ # Lists all Event Threat Detection custom modules for the given
1262
+ # Resource Manager parent. This includes resident modules defined at the
1263
+ # scope of the parent along with modules inherited from ancestors.
1264
+ #
1265
+ # @overload list_event_threat_detection_custom_modules(request, options = nil)
1266
+ # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type
1267
+ # {::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
1268
+ #
1269
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash]
1270
+ # A request object representing the call parameters. Required. To specify no
1271
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1272
+ # @param options [::Gapic::CallOptions, ::Hash]
1273
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1274
+ #
1275
+ # @overload list_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil)
1276
+ # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at
1277
+ # least one keyword argument is required. To specify no parameters, or to keep all
1278
+ # the default parameter values, pass an empty Hash as a request object (see above).
1279
+ #
1280
+ # @param parent [::String]
1281
+ # Required. Name of parent to list custom modules. Its format is
1282
+ # `organizations/{organization}/locations/{location}`,
1283
+ # `folders/{folder}/locations/{location}`,
1284
+ # or
1285
+ # `projects/{project}/locations/{location}`
1286
+ # @param page_size [::Integer]
1287
+ # Optional. The maximum number of modules to return. The service may return
1288
+ # fewer than this value. If unspecified, at most 10 configs will be returned.
1289
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1290
+ # @param page_token [::String]
1291
+ # Optional. A page token, received from a previous
1292
+ # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the
1293
+ # subsequent page.
1294
+ #
1295
+ # When paginating, all other parameters provided to
1296
+ # `ListEventThreatDetectionCustomModules` must match the call that provided
1297
+ # the page token.
1298
+ # @yield [result, operation] Access the result along with the TransportOperation object
1299
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>]
1300
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1301
+ #
1302
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>]
1303
+ #
1304
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1305
+ #
1306
+ # @example Basic example
1307
+ # require "google/cloud/security_center_management/v1"
1308
+ #
1309
+ # # Create a client object. The client can be reused for multiple calls.
1310
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1311
+ #
1312
+ # # Create a request. To set request fields, pass in keyword arguments.
1313
+ # request = Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new
1314
+ #
1315
+ # # Call the list_event_threat_detection_custom_modules method.
1316
+ # result = client.list_event_threat_detection_custom_modules request
1317
+ #
1318
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1319
+ # # over elements, and API calls will be issued to fetch pages as needed.
1320
+ # result.each do |item|
1321
+ # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
1322
+ # p item
1323
+ # end
1324
+ #
1325
+ def list_event_threat_detection_custom_modules request, options = nil
1326
+ raise ::ArgumentError, "request must be provided" if request.nil?
1327
+
1328
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest
1329
+
1330
+ # Converts hash and nil to an options object
1331
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1332
+
1333
+ # Customize the options with defaults
1334
+ call_metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h
1335
+
1336
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1337
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1338
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1339
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1340
+ transports_version_send: [:rest]
1341
+
1342
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1343
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1344
+
1345
+ options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout,
1346
+ metadata: call_metadata,
1347
+ retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy
1348
+
1349
+ options.apply_defaults timeout: @config.timeout,
1350
+ metadata: @config.metadata,
1351
+ retry_policy: @config.retry_policy
1352
+
1353
+ @security_center_management_stub.list_event_threat_detection_custom_modules request, options do |result, operation|
1354
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options
1355
+ yield result, operation if block_given?
1356
+ return result
1357
+ end
1358
+ rescue ::Gapic::Rest::Error => e
1359
+ raise ::Google::Cloud::Error.from_error(e)
1360
+ end
1361
+
1362
+ ##
1363
+ # Lists all resident Event Threat Detection custom modules under the
1364
+ # given Resource Manager parent and its descendants.
1365
+ #
1366
+ # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil)
1367
+ # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type
1368
+ # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash.
1369
+ #
1370
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash]
1371
+ # A request object representing the call parameters. Required. To specify no
1372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1373
+ # @param options [::Gapic::CallOptions, ::Hash]
1374
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1375
+ #
1376
+ # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil)
1377
+ # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at
1378
+ # least one keyword argument is required. To specify no parameters, or to keep all
1379
+ # the default parameter values, pass an empty Hash as a request object (see above).
1380
+ #
1381
+ # @param parent [::String]
1382
+ # Required. Name of parent to list custom modules. Its format is
1383
+ # `organizations/{organization}/locations/{location}`,
1384
+ # `folders/{folder}/locations/{location}`,
1385
+ # or
1386
+ # `projects/{project}/locations/{location}`
1387
+ # @param page_size [::Integer]
1388
+ # Optional. The maximum number of modules to return. The service may return
1389
+ # fewer than this value. If unspecified, at most 10 configs will be returned.
1390
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1391
+ # @param page_token [::String]
1392
+ # Optional. A token identifying a page of results the server should return.
1393
+ # @yield [result, operation] Access the result along with the TransportOperation object
1394
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>]
1395
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1396
+ #
1397
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>]
1398
+ #
1399
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1400
+ #
1401
+ # @example Basic example
1402
+ # require "google/cloud/security_center_management/v1"
1403
+ #
1404
+ # # Create a client object. The client can be reused for multiple calls.
1405
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1406
+ #
1407
+ # # Create a request. To set request fields, pass in keyword arguments.
1408
+ # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new
1409
+ #
1410
+ # # Call the list_descendant_event_threat_detection_custom_modules method.
1411
+ # result = client.list_descendant_event_threat_detection_custom_modules request
1412
+ #
1413
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1414
+ # # over elements, and API calls will be issued to fetch pages as needed.
1415
+ # result.each do |item|
1416
+ # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
1417
+ # p item
1418
+ # end
1419
+ #
1420
+ def list_descendant_event_threat_detection_custom_modules request, options = nil
1421
+ raise ::ArgumentError, "request must be provided" if request.nil?
1422
+
1423
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest
1424
+
1425
+ # Converts hash and nil to an options object
1426
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1427
+
1428
+ # Customize the options with defaults
1429
+ call_metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h
1430
+
1431
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1432
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1433
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1434
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1435
+ transports_version_send: [:rest]
1436
+
1437
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1438
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1439
+
1440
+ options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout,
1441
+ metadata: call_metadata,
1442
+ retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy
1443
+
1444
+ options.apply_defaults timeout: @config.timeout,
1445
+ metadata: @config.metadata,
1446
+ retry_policy: @config.retry_policy
1447
+
1448
+ @security_center_management_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation|
1449
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options
1450
+ yield result, operation if block_given?
1451
+ return result
1452
+ end
1453
+ rescue ::Gapic::Rest::Error => e
1454
+ raise ::Google::Cloud::Error.from_error(e)
1455
+ end
1456
+
1457
+ ##
1458
+ # Gets an Event Threat Detection custom module.
1459
+ #
1460
+ # @overload get_event_threat_detection_custom_module(request, options = nil)
1461
+ # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type
1462
+ # {::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
1463
+ #
1464
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash]
1465
+ # A request object representing the call parameters. Required. To specify no
1466
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1467
+ # @param options [::Gapic::CallOptions, ::Hash]
1468
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1469
+ #
1470
+ # @overload get_event_threat_detection_custom_module(name: nil)
1471
+ # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at
1472
+ # least one keyword argument is required. To specify no parameters, or to keep all
1473
+ # the default parameter values, pass an empty Hash as a request object (see above).
1474
+ #
1475
+ # @param name [::String]
1476
+ # Required. The resource name of the ETD custom module.
1477
+ #
1478
+ # Its format is:
1479
+ #
1480
+ # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1481
+ # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1482
+ # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1483
+ # @yield [result, operation] Access the result along with the TransportOperation object
1484
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1485
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1486
+ #
1487
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1488
+ #
1489
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1490
+ #
1491
+ # @example Basic example
1492
+ # require "google/cloud/security_center_management/v1"
1493
+ #
1494
+ # # Create a client object. The client can be reused for multiple calls.
1495
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1496
+ #
1497
+ # # Create a request. To set request fields, pass in keyword arguments.
1498
+ # request = Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new
1499
+ #
1500
+ # # Call the get_event_threat_detection_custom_module method.
1501
+ # result = client.get_event_threat_detection_custom_module request
1502
+ #
1503
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
1504
+ # p result
1505
+ #
1506
+ def get_event_threat_detection_custom_module request, options = nil
1507
+ raise ::ArgumentError, "request must be provided" if request.nil?
1508
+
1509
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest
1510
+
1511
+ # Converts hash and nil to an options object
1512
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1513
+
1514
+ # Customize the options with defaults
1515
+ call_metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h
1516
+
1517
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1518
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1519
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1520
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1521
+ transports_version_send: [:rest]
1522
+
1523
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1524
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1525
+
1526
+ options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout,
1527
+ metadata: call_metadata,
1528
+ retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy
1529
+
1530
+ options.apply_defaults timeout: @config.timeout,
1531
+ metadata: @config.metadata,
1532
+ retry_policy: @config.retry_policy
1533
+
1534
+ @security_center_management_stub.get_event_threat_detection_custom_module request, options do |result, operation|
1535
+ yield result, operation if block_given?
1536
+ return result
1537
+ end
1538
+ rescue ::Gapic::Rest::Error => e
1539
+ raise ::Google::Cloud::Error.from_error(e)
1540
+ end
1541
+
1542
+ ##
1543
+ # Creates a resident Event Threat Detection custom module at the scope of the
1544
+ # given Resource Manager parent, and also creates inherited custom modules
1545
+ # for all descendants of the given parent. These modules are enabled by
1546
+ # default.
1547
+ #
1548
+ # @overload create_event_threat_detection_custom_module(request, options = nil)
1549
+ # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type
1550
+ # {::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
1551
+ #
1552
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash]
1553
+ # A request object representing the call parameters. Required. To specify no
1554
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1555
+ # @param options [::Gapic::CallOptions, ::Hash]
1556
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1557
+ #
1558
+ # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil, validate_only: nil)
1559
+ # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at
1560
+ # least one keyword argument is required. To specify no parameters, or to keep all
1561
+ # the default parameter values, pass an empty Hash as a request object (see above).
1562
+ #
1563
+ # @param parent [::String]
1564
+ # Required. Name of parent for the module. Its format is
1565
+ # `organizations/{organization}/locations/{location}`,
1566
+ # `folders/{folder}/locations/{location}`,
1567
+ # or
1568
+ # `projects/{project}/locations/{location}`
1569
+ # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash]
1570
+ # Required. The module to create. The
1571
+ # event_threat_detection_custom_module.name will be ignored and server
1572
+ # generated.
1573
+ # @param validate_only [::Boolean]
1574
+ # Optional. When set to true, only validations (including IAM checks) will
1575
+ # done for the request (no module will be created). An OK response indicates
1576
+ # the request is valid while an error response indicates the request is
1577
+ # invalid. Note that a subsequent request to actually create the module could
1578
+ # still fail because 1. the state could have changed (e.g. IAM permission
1579
+ # lost) or
1580
+ # 2. A failure occurred during creation of the module.
1581
+ # @yield [result, operation] Access the result along with the TransportOperation object
1582
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1583
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1584
+ #
1585
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1586
+ #
1587
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1588
+ #
1589
+ # @example Basic example
1590
+ # require "google/cloud/security_center_management/v1"
1591
+ #
1592
+ # # Create a client object. The client can be reused for multiple calls.
1593
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1594
+ #
1595
+ # # Create a request. To set request fields, pass in keyword arguments.
1596
+ # request = Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new
1597
+ #
1598
+ # # Call the create_event_threat_detection_custom_module method.
1599
+ # result = client.create_event_threat_detection_custom_module request
1600
+ #
1601
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
1602
+ # p result
1603
+ #
1604
+ def create_event_threat_detection_custom_module request, options = nil
1605
+ raise ::ArgumentError, "request must be provided" if request.nil?
1606
+
1607
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest
1608
+
1609
+ # Converts hash and nil to an options object
1610
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1611
+
1612
+ # Customize the options with defaults
1613
+ call_metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h
1614
+
1615
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1616
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1617
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1618
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1619
+ transports_version_send: [:rest]
1620
+
1621
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1622
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1623
+
1624
+ options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout,
1625
+ metadata: call_metadata,
1626
+ retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy
1627
+
1628
+ options.apply_defaults timeout: @config.timeout,
1629
+ metadata: @config.metadata,
1630
+ retry_policy: @config.retry_policy
1631
+
1632
+ @security_center_management_stub.create_event_threat_detection_custom_module request, options do |result, operation|
1633
+ yield result, operation if block_given?
1634
+ return result
1635
+ end
1636
+ rescue ::Gapic::Rest::Error => e
1637
+ raise ::Google::Cloud::Error.from_error(e)
1638
+ end
1639
+
1640
+ ##
1641
+ # Updates the Event Threat Detection custom module with the given name based
1642
+ # on the given update mask. Updating the enablement state is supported for
1643
+ # both resident and inherited modules (though resident modules cannot have an
1644
+ # enablement state of "inherited"). Updating the display name or
1645
+ # configuration of a module is supported for resident modules only. The type
1646
+ # of a module cannot be changed.
1647
+ #
1648
+ # @overload update_event_threat_detection_custom_module(request, options = nil)
1649
+ # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type
1650
+ # {::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
1651
+ #
1652
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash]
1653
+ # A request object representing the call parameters. Required. To specify no
1654
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1655
+ # @param options [::Gapic::CallOptions, ::Hash]
1656
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1657
+ #
1658
+ # @overload update_event_threat_detection_custom_module(update_mask: nil, event_threat_detection_custom_module: nil, validate_only: nil)
1659
+ # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at
1660
+ # least one keyword argument is required. To specify no parameters, or to keep all
1661
+ # the default parameter values, pass an empty Hash as a request object (see above).
1662
+ #
1663
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1664
+ # Required. Field mask is used to specify the fields to be overwritten in the
1665
+ # EventThreatDetectionCustomModule resource by the update.
1666
+ # The fields specified in the update_mask are relative to the resource, not
1667
+ # the full request. A field will be overwritten if it is in the mask. If the
1668
+ # user does not provide a mask then all fields will be overwritten.
1669
+ # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash]
1670
+ # Required. The module being updated
1671
+ # @param validate_only [::Boolean]
1672
+ # Optional. When set to true, only validations (including IAM checks) will
1673
+ # done for the request (module will not be updated). An OK response indicates
1674
+ # the request is valid while an error response indicates the request is
1675
+ # invalid. Note that a subsequent request to actually update the module could
1676
+ # still fail because 1. the state could have changed (e.g. IAM permission
1677
+ # lost) or
1678
+ # 2. A failure occurred while trying to update the module.
1679
+ # @yield [result, operation] Access the result along with the TransportOperation object
1680
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1681
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1682
+ #
1683
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1684
+ #
1685
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1686
+ #
1687
+ # @example Basic example
1688
+ # require "google/cloud/security_center_management/v1"
1689
+ #
1690
+ # # Create a client object. The client can be reused for multiple calls.
1691
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1692
+ #
1693
+ # # Create a request. To set request fields, pass in keyword arguments.
1694
+ # request = Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new
1695
+ #
1696
+ # # Call the update_event_threat_detection_custom_module method.
1697
+ # result = client.update_event_threat_detection_custom_module request
1698
+ #
1699
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
1700
+ # p result
1701
+ #
1702
+ def update_event_threat_detection_custom_module request, options = nil
1703
+ raise ::ArgumentError, "request must be provided" if request.nil?
1704
+
1705
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest
1706
+
1707
+ # Converts hash and nil to an options object
1708
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1709
+
1710
+ # Customize the options with defaults
1711
+ call_metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h
1712
+
1713
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1714
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1715
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1716
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1717
+ transports_version_send: [:rest]
1718
+
1719
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1720
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1721
+
1722
+ options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout,
1723
+ metadata: call_metadata,
1724
+ retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy
1725
+
1726
+ options.apply_defaults timeout: @config.timeout,
1727
+ metadata: @config.metadata,
1728
+ retry_policy: @config.retry_policy
1729
+
1730
+ @security_center_management_stub.update_event_threat_detection_custom_module request, options do |result, operation|
1731
+ yield result, operation if block_given?
1732
+ return result
1733
+ end
1734
+ rescue ::Gapic::Rest::Error => e
1735
+ raise ::Google::Cloud::Error.from_error(e)
1736
+ end
1737
+
1738
+ ##
1739
+ # Deletes the specified Event Threat Detection custom module and all of its
1740
+ # descendants in the Resource Manager hierarchy. This method is only
1741
+ # supported for resident custom modules.
1742
+ #
1743
+ # @overload delete_event_threat_detection_custom_module(request, options = nil)
1744
+ # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type
1745
+ # {::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
1746
+ #
1747
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash]
1748
+ # A request object representing the call parameters. Required. To specify no
1749
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1750
+ # @param options [::Gapic::CallOptions, ::Hash]
1751
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1752
+ #
1753
+ # @overload delete_event_threat_detection_custom_module(name: nil, validate_only: nil)
1754
+ # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at
1755
+ # least one keyword argument is required. To specify no parameters, or to keep all
1756
+ # the default parameter values, pass an empty Hash as a request object (see above).
1757
+ #
1758
+ # @param name [::String]
1759
+ # Required. The resource name of the ETD custom module.
1760
+ #
1761
+ # Its format is:
1762
+ #
1763
+ # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1764
+ # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1765
+ # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1766
+ # @param validate_only [::Boolean]
1767
+ # Optional. When set to true, only validations (including IAM checks) will
1768
+ # done for the request (module will not be deleted). An OK response indicates
1769
+ # the request is valid while an error response indicates the request is
1770
+ # invalid. Note that a subsequent request to actually delete the module could
1771
+ # still fail because 1. the state could have changed (e.g. IAM permission
1772
+ # lost) or
1773
+ # 2. A failure occurred while trying to delete the module.
1774
+ # @yield [result, operation] Access the result along with the TransportOperation object
1775
+ # @yieldparam result [::Google::Protobuf::Empty]
1776
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1777
+ #
1778
+ # @return [::Google::Protobuf::Empty]
1779
+ #
1780
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1781
+ #
1782
+ # @example Basic example
1783
+ # require "google/cloud/security_center_management/v1"
1784
+ #
1785
+ # # Create a client object. The client can be reused for multiple calls.
1786
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1787
+ #
1788
+ # # Create a request. To set request fields, pass in keyword arguments.
1789
+ # request = Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new
1790
+ #
1791
+ # # Call the delete_event_threat_detection_custom_module method.
1792
+ # result = client.delete_event_threat_detection_custom_module request
1793
+ #
1794
+ # # The returned object is of type Google::Protobuf::Empty.
1795
+ # p result
1796
+ #
1797
+ def delete_event_threat_detection_custom_module request, options = nil
1798
+ raise ::ArgumentError, "request must be provided" if request.nil?
1799
+
1800
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest
1801
+
1802
+ # Converts hash and nil to an options object
1803
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1804
+
1805
+ # Customize the options with defaults
1806
+ call_metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h
1807
+
1808
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1809
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1810
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1811
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1812
+ transports_version_send: [:rest]
1813
+
1814
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1815
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1816
+
1817
+ options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout,
1818
+ metadata: call_metadata,
1819
+ retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy
1820
+
1821
+ options.apply_defaults timeout: @config.timeout,
1822
+ metadata: @config.metadata,
1823
+ retry_policy: @config.retry_policy
1824
+
1825
+ @security_center_management_stub.delete_event_threat_detection_custom_module request, options do |result, operation|
1826
+ yield result, operation if block_given?
1827
+ return result
1828
+ end
1829
+ rescue ::Gapic::Rest::Error => e
1830
+ raise ::Google::Cloud::Error.from_error(e)
1831
+ end
1832
+
1833
+ ##
1834
+ # Validates the given Event Threat Detection custom module.
1835
+ #
1836
+ # @overload validate_event_threat_detection_custom_module(request, options = nil)
1837
+ # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type
1838
+ # {::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash.
1839
+ #
1840
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash]
1841
+ # A request object representing the call parameters. Required. To specify no
1842
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1843
+ # @param options [::Gapic::CallOptions, ::Hash]
1844
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1845
+ #
1846
+ # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil)
1847
+ # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at
1848
+ # least one keyword argument is required. To specify no parameters, or to keep all
1849
+ # the default parameter values, pass an empty Hash as a request object (see above).
1850
+ #
1851
+ # @param parent [::String]
1852
+ # Required. Resource name of the parent to validate the Custom Module under.
1853
+ #
1854
+ # Its format is:
1855
+ #
1856
+ # * `organizations/{organization}/locations/{location}`.
1857
+ # @param raw_text [::String]
1858
+ # Required. The raw text of the module's contents. Used to generate error
1859
+ # messages.
1860
+ # @param type [::String]
1861
+ # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP).
1862
+ # @yield [result, operation] Access the result along with the TransportOperation object
1863
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse]
1864
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1865
+ #
1866
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse]
1867
+ #
1868
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1869
+ #
1870
+ # @example Basic example
1871
+ # require "google/cloud/security_center_management/v1"
1872
+ #
1873
+ # # Create a client object. The client can be reused for multiple calls.
1874
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1875
+ #
1876
+ # # Create a request. To set request fields, pass in keyword arguments.
1877
+ # request = Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new
1878
+ #
1879
+ # # Call the validate_event_threat_detection_custom_module method.
1880
+ # result = client.validate_event_threat_detection_custom_module request
1881
+ #
1882
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse.
1883
+ # p result
1884
+ #
1885
+ def validate_event_threat_detection_custom_module request, options = nil
1886
+ raise ::ArgumentError, "request must be provided" if request.nil?
1887
+
1888
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest
1889
+
1890
+ # Converts hash and nil to an options object
1891
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1892
+
1893
+ # Customize the options with defaults
1894
+ call_metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h
1895
+
1896
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1897
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1898
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1899
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1900
+ transports_version_send: [:rest]
1901
+
1902
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1903
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1904
+
1905
+ options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout,
1906
+ metadata: call_metadata,
1907
+ retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy
1908
+
1909
+ options.apply_defaults timeout: @config.timeout,
1910
+ metadata: @config.metadata,
1911
+ retry_policy: @config.retry_policy
1912
+
1913
+ @security_center_management_stub.validate_event_threat_detection_custom_module request, options do |result, operation|
1914
+ yield result, operation if block_given?
1915
+ return result
1916
+ end
1917
+ rescue ::Gapic::Rest::Error => e
1918
+ raise ::Google::Cloud::Error.from_error(e)
1919
+ end
1920
+
1921
+ ##
1922
+ # Gets service settings for the specified Security Command Center service.
1923
+ #
1924
+ # @overload get_security_center_service(request, options = nil)
1925
+ # Pass arguments to `get_security_center_service` via a request object, either of type
1926
+ # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest} or an equivalent Hash.
1927
+ #
1928
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest, ::Hash]
1929
+ # A request object representing the call parameters. Required. To specify no
1930
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1931
+ # @param options [::Gapic::CallOptions, ::Hash]
1932
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1933
+ #
1934
+ # @overload get_security_center_service(name: nil)
1935
+ # Pass arguments to `get_security_center_service` via keyword arguments. Note that at
1936
+ # least one keyword argument is required. To specify no parameters, or to keep all
1937
+ # the default parameter values, pass an empty Hash as a request object (see above).
1938
+ #
1939
+ # @param name [::String]
1940
+ # Required. The Security Command Center service to retrieve.
1941
+ #
1942
+ # Formats:
1943
+ #
1944
+ # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service}
1945
+ # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service}
1946
+ # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service}
1947
+ #
1948
+ # The possible values for id \\{service} are:
1949
+ #
1950
+ # * container-threat-detection
1951
+ # * event-threat-detection
1952
+ # * security-health-analytics
1953
+ # * vm-threat-detection
1954
+ # * web-security-scanner
1955
+ # @yield [result, operation] Access the result along with the TransportOperation object
1956
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService]
1957
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1958
+ #
1959
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService]
1960
+ #
1961
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1962
+ #
1963
+ # @example Basic example
1964
+ # require "google/cloud/security_center_management/v1"
1965
+ #
1966
+ # # Create a client object. The client can be reused for multiple calls.
1967
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
1968
+ #
1969
+ # # Create a request. To set request fields, pass in keyword arguments.
1970
+ # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new
1971
+ #
1972
+ # # Call the get_security_center_service method.
1973
+ # result = client.get_security_center_service request
1974
+ #
1975
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.
1976
+ # p result
1977
+ #
1978
+ def get_security_center_service request, options = nil
1979
+ raise ::ArgumentError, "request must be provided" if request.nil?
1980
+
1981
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest
1982
+
1983
+ # Converts hash and nil to an options object
1984
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1985
+
1986
+ # Customize the options with defaults
1987
+ call_metadata = @config.rpcs.get_security_center_service.metadata.to_h
1988
+
1989
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1990
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1991
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1992
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
1993
+ transports_version_send: [:rest]
1994
+
1995
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1996
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1997
+
1998
+ options.apply_defaults timeout: @config.rpcs.get_security_center_service.timeout,
1999
+ metadata: call_metadata,
2000
+ retry_policy: @config.rpcs.get_security_center_service.retry_policy
2001
+
2002
+ options.apply_defaults timeout: @config.timeout,
2003
+ metadata: @config.metadata,
2004
+ retry_policy: @config.retry_policy
2005
+
2006
+ @security_center_management_stub.get_security_center_service request, options do |result, operation|
2007
+ yield result, operation if block_given?
2008
+ return result
2009
+ end
2010
+ rescue ::Gapic::Rest::Error => e
2011
+ raise ::Google::Cloud::Error.from_error(e)
2012
+ end
2013
+
2014
+ ##
2015
+ # Returns a list of all Security Command Center services for the given
2016
+ # parent.
2017
+ #
2018
+ # @overload list_security_center_services(request, options = nil)
2019
+ # Pass arguments to `list_security_center_services` via a request object, either of type
2020
+ # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest} or an equivalent Hash.
2021
+ #
2022
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest, ::Hash]
2023
+ # A request object representing the call parameters. Required. To specify no
2024
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2025
+ # @param options [::Gapic::CallOptions, ::Hash]
2026
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2027
+ #
2028
+ # @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil)
2029
+ # Pass arguments to `list_security_center_services` via keyword arguments. Note that at
2030
+ # least one keyword argument is required. To specify no parameters, or to keep all
2031
+ # the default parameter values, pass an empty Hash as a request object (see above).
2032
+ #
2033
+ # @param parent [::String]
2034
+ # Required. The name of the parent to list Security Command Center services.
2035
+ #
2036
+ # Formats:
2037
+ #
2038
+ # * organizations/\\{organization}/locations/\\{location}
2039
+ # * folders/\\{folder}/locations/\\{location}
2040
+ # * projects/\\{project}/locations/\\{location}
2041
+ # @param page_size [::Integer]
2042
+ # Optional. The maximum number of results to return in a single response.
2043
+ # Default is 10, minimum is 1, maximum is 1000.
2044
+ # @param page_token [::String]
2045
+ # Optional. The value returned by the last call indicating a continuation.
2046
+ # @yield [result, operation] Access the result along with the TransportOperation object
2047
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>]
2048
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2049
+ #
2050
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>]
2051
+ #
2052
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2053
+ #
2054
+ # @example Basic example
2055
+ # require "google/cloud/security_center_management/v1"
2056
+ #
2057
+ # # Create a client object. The client can be reused for multiple calls.
2058
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
2059
+ #
2060
+ # # Create a request. To set request fields, pass in keyword arguments.
2061
+ # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new
2062
+ #
2063
+ # # Call the list_security_center_services method.
2064
+ # result = client.list_security_center_services request
2065
+ #
2066
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2067
+ # # over elements, and API calls will be issued to fetch pages as needed.
2068
+ # result.each do |item|
2069
+ # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.
2070
+ # p item
2071
+ # end
2072
+ #
2073
+ def list_security_center_services request, options = nil
2074
+ raise ::ArgumentError, "request must be provided" if request.nil?
2075
+
2076
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest
2077
+
2078
+ # Converts hash and nil to an options object
2079
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2080
+
2081
+ # Customize the options with defaults
2082
+ call_metadata = @config.rpcs.list_security_center_services.metadata.to_h
2083
+
2084
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2085
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2086
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2087
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
2088
+ transports_version_send: [:rest]
2089
+
2090
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2091
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2092
+
2093
+ options.apply_defaults timeout: @config.rpcs.list_security_center_services.timeout,
2094
+ metadata: call_metadata,
2095
+ retry_policy: @config.rpcs.list_security_center_services.retry_policy
2096
+
2097
+ options.apply_defaults timeout: @config.timeout,
2098
+ metadata: @config.metadata,
2099
+ retry_policy: @config.retry_policy
2100
+
2101
+ @security_center_management_stub.list_security_center_services request, options do |result, operation|
2102
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_security_center_services, "security_center_services", request, result, options
2103
+ yield result, operation if block_given?
2104
+ return result
2105
+ end
2106
+ rescue ::Gapic::Rest::Error => e
2107
+ raise ::Google::Cloud::Error.from_error(e)
2108
+ end
2109
+
2110
+ ##
2111
+ # Updates a Security Command Center service using the given update mask.
2112
+ #
2113
+ # @overload update_security_center_service(request, options = nil)
2114
+ # Pass arguments to `update_security_center_service` via a request object, either of type
2115
+ # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest} or an equivalent Hash.
2116
+ #
2117
+ # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest, ::Hash]
2118
+ # A request object representing the call parameters. Required. To specify no
2119
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2120
+ # @param options [::Gapic::CallOptions, ::Hash]
2121
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2122
+ #
2123
+ # @overload update_security_center_service(security_center_service: nil, update_mask: nil, validate_only: nil)
2124
+ # Pass arguments to `update_security_center_service` via keyword arguments. Note that at
2125
+ # least one keyword argument is required. To specify no parameters, or to keep all
2126
+ # the default parameter values, pass an empty Hash as a request object (see above).
2127
+ #
2128
+ # @param security_center_service [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService, ::Hash]
2129
+ # Required. The updated service.
2130
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2131
+ # Required. The list of fields to be updated. Possible values:
2132
+ #
2133
+ # * "intended_enablement_state"
2134
+ # * "modules"
2135
+ # @param validate_only [::Boolean]
2136
+ # Optional. When set to true, only validations (including IAM checks) will
2137
+ # done for the request (service will not be updated). An OK response
2138
+ # indicates the request is valid while an error response indicates the
2139
+ # request is invalid. Note that a subsequent request to actually update the
2140
+ # service could still fail because 1. the state could have changed (e.g. IAM
2141
+ # permission lost) or
2142
+ # 2. A failure occurred while trying to delete the module.
2143
+ # @yield [result, operation] Access the result along with the TransportOperation object
2144
+ # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService]
2145
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2146
+ #
2147
+ # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService]
2148
+ #
2149
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2150
+ #
2151
+ # @example Basic example
2152
+ # require "google/cloud/security_center_management/v1"
2153
+ #
2154
+ # # Create a client object. The client can be reused for multiple calls.
2155
+ # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new
2156
+ #
2157
+ # # Create a request. To set request fields, pass in keyword arguments.
2158
+ # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new
2159
+ #
2160
+ # # Call the update_security_center_service method.
2161
+ # result = client.update_security_center_service request
2162
+ #
2163
+ # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.
2164
+ # p result
2165
+ #
2166
+ def update_security_center_service request, options = nil
2167
+ raise ::ArgumentError, "request must be provided" if request.nil?
2168
+
2169
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest
2170
+
2171
+ # Converts hash and nil to an options object
2172
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2173
+
2174
+ # Customize the options with defaults
2175
+ call_metadata = @config.rpcs.update_security_center_service.metadata.to_h
2176
+
2177
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2178
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2179
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2180
+ gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION,
2181
+ transports_version_send: [:rest]
2182
+
2183
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2184
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2185
+
2186
+ options.apply_defaults timeout: @config.rpcs.update_security_center_service.timeout,
2187
+ metadata: call_metadata,
2188
+ retry_policy: @config.rpcs.update_security_center_service.retry_policy
2189
+
2190
+ options.apply_defaults timeout: @config.timeout,
2191
+ metadata: @config.metadata,
2192
+ retry_policy: @config.retry_policy
2193
+
2194
+ @security_center_management_stub.update_security_center_service request, options do |result, operation|
2195
+ yield result, operation if block_given?
2196
+ return result
2197
+ end
2198
+ rescue ::Gapic::Rest::Error => e
2199
+ raise ::Google::Cloud::Error.from_error(e)
2200
+ end
2201
+
2202
+ ##
2203
+ # Configuration class for the SecurityCenterManagement REST API.
2204
+ #
2205
+ # This class represents the configuration for SecurityCenterManagement REST,
2206
+ # providing control over timeouts, retry behavior, logging, transport
2207
+ # parameters, and other low-level controls. Certain parameters can also be
2208
+ # applied individually to specific RPCs. See
2209
+ # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration::Rpcs}
2210
+ # for a list of RPCs that can be configured independently.
2211
+ #
2212
+ # Configuration can be applied globally to all clients, or to a single client
2213
+ # on construction.
2214
+ #
2215
+ # @example
2216
+ #
2217
+ # # Modify the global config, setting the timeout for
2218
+ # # list_effective_security_health_analytics_custom_modules to 20 seconds,
2219
+ # # and all remaining timeouts to 10 seconds.
2220
+ # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.configure do |config|
2221
+ # config.timeout = 10.0
2222
+ # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0
2223
+ # end
2224
+ #
2225
+ # # Apply the above configuration only to a new client.
2226
+ # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config|
2227
+ # config.timeout = 10.0
2228
+ # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0
2229
+ # end
2230
+ #
2231
+ # @!attribute [rw] endpoint
2232
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2233
+ # nil, indicating to use the default endpoint in the current universe domain.
2234
+ # @return [::String,nil]
2235
+ # @!attribute [rw] credentials
2236
+ # Credentials to send with calls. You may provide any of the following types:
2237
+ # * (`String`) The path to a service account key file in JSON format
2238
+ # * (`Hash`) A service account key as a Hash
2239
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2240
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2241
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2242
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2243
+ # * (`nil`) indicating no credentials
2244
+ # @return [::Object]
2245
+ # @!attribute [rw] scope
2246
+ # The OAuth scopes
2247
+ # @return [::Array<::String>]
2248
+ # @!attribute [rw] lib_name
2249
+ # The library name as recorded in instrumentation and logging
2250
+ # @return [::String]
2251
+ # @!attribute [rw] lib_version
2252
+ # The library version as recorded in instrumentation and logging
2253
+ # @return [::String]
2254
+ # @!attribute [rw] timeout
2255
+ # The call timeout in seconds.
2256
+ # @return [::Numeric]
2257
+ # @!attribute [rw] metadata
2258
+ # Additional headers to be sent with the call.
2259
+ # @return [::Hash{::Symbol=>::String}]
2260
+ # @!attribute [rw] retry_policy
2261
+ # The retry policy. The value is a hash with the following keys:
2262
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2263
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2264
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2265
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2266
+ # trigger a retry.
2267
+ # @return [::Hash]
2268
+ # @!attribute [rw] quota_project
2269
+ # A separate project against which to charge quota.
2270
+ # @return [::String]
2271
+ # @!attribute [rw] universe_domain
2272
+ # The universe domain within which to make requests. This determines the
2273
+ # default endpoint URL. The default value of nil uses the environment
2274
+ # universe (usually the default "googleapis.com" universe).
2275
+ # @return [::String,nil]
2276
+ #
2277
+ class Configuration
2278
+ extend ::Gapic::Config
2279
+
2280
+ # @private
2281
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2282
+ DEFAULT_ENDPOINT = "securitycentermanagement.googleapis.com"
2283
+
2284
+ config_attr :endpoint, nil, ::String, nil
2285
+ config_attr :credentials, nil do |value|
2286
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2287
+ allowed.any? { |klass| klass === value }
2288
+ end
2289
+ config_attr :scope, nil, ::String, ::Array, nil
2290
+ config_attr :lib_name, nil, ::String, nil
2291
+ config_attr :lib_version, nil, ::String, nil
2292
+ config_attr :timeout, nil, ::Numeric, nil
2293
+ config_attr :metadata, nil, ::Hash, nil
2294
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2295
+ config_attr :quota_project, nil, ::String, nil
2296
+ config_attr :universe_domain, nil, ::String, nil
2297
+
2298
+ # @private
2299
+ # Overrides for http bindings for the RPCs of this service
2300
+ # are only used when this service is used as mixin, and only
2301
+ # by the host service.
2302
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2303
+ config_attr :bindings_override, {}, ::Hash, nil
2304
+
2305
+ # @private
2306
+ def initialize parent_config = nil
2307
+ @parent_config = parent_config unless parent_config.nil?
2308
+
2309
+ yield self if block_given?
2310
+ end
2311
+
2312
+ ##
2313
+ # Configurations for individual RPCs
2314
+ # @return [Rpcs]
2315
+ #
2316
+ def rpcs
2317
+ @rpcs ||= begin
2318
+ parent_rpcs = nil
2319
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2320
+ Rpcs.new parent_rpcs
2321
+ end
2322
+ end
2323
+
2324
+ ##
2325
+ # Configuration RPC class for the SecurityCenterManagement API.
2326
+ #
2327
+ # Includes fields providing the configuration for each RPC in this service.
2328
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2329
+ # the following configuration fields:
2330
+ #
2331
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2332
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2333
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2334
+ # include the following keys:
2335
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2336
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2337
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2338
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2339
+ # trigger a retry.
2340
+ #
2341
+ class Rpcs
2342
+ ##
2343
+ # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules`
2344
+ # @return [::Gapic::Config::Method]
2345
+ #
2346
+ attr_reader :list_effective_security_health_analytics_custom_modules
2347
+ ##
2348
+ # RPC-specific configuration for `get_effective_security_health_analytics_custom_module`
2349
+ # @return [::Gapic::Config::Method]
2350
+ #
2351
+ attr_reader :get_effective_security_health_analytics_custom_module
2352
+ ##
2353
+ # RPC-specific configuration for `list_security_health_analytics_custom_modules`
2354
+ # @return [::Gapic::Config::Method]
2355
+ #
2356
+ attr_reader :list_security_health_analytics_custom_modules
2357
+ ##
2358
+ # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules`
2359
+ # @return [::Gapic::Config::Method]
2360
+ #
2361
+ attr_reader :list_descendant_security_health_analytics_custom_modules
2362
+ ##
2363
+ # RPC-specific configuration for `get_security_health_analytics_custom_module`
2364
+ # @return [::Gapic::Config::Method]
2365
+ #
2366
+ attr_reader :get_security_health_analytics_custom_module
2367
+ ##
2368
+ # RPC-specific configuration for `create_security_health_analytics_custom_module`
2369
+ # @return [::Gapic::Config::Method]
2370
+ #
2371
+ attr_reader :create_security_health_analytics_custom_module
2372
+ ##
2373
+ # RPC-specific configuration for `update_security_health_analytics_custom_module`
2374
+ # @return [::Gapic::Config::Method]
2375
+ #
2376
+ attr_reader :update_security_health_analytics_custom_module
2377
+ ##
2378
+ # RPC-specific configuration for `delete_security_health_analytics_custom_module`
2379
+ # @return [::Gapic::Config::Method]
2380
+ #
2381
+ attr_reader :delete_security_health_analytics_custom_module
2382
+ ##
2383
+ # RPC-specific configuration for `simulate_security_health_analytics_custom_module`
2384
+ # @return [::Gapic::Config::Method]
2385
+ #
2386
+ attr_reader :simulate_security_health_analytics_custom_module
2387
+ ##
2388
+ # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules`
2389
+ # @return [::Gapic::Config::Method]
2390
+ #
2391
+ attr_reader :list_effective_event_threat_detection_custom_modules
2392
+ ##
2393
+ # RPC-specific configuration for `get_effective_event_threat_detection_custom_module`
2394
+ # @return [::Gapic::Config::Method]
2395
+ #
2396
+ attr_reader :get_effective_event_threat_detection_custom_module
2397
+ ##
2398
+ # RPC-specific configuration for `list_event_threat_detection_custom_modules`
2399
+ # @return [::Gapic::Config::Method]
2400
+ #
2401
+ attr_reader :list_event_threat_detection_custom_modules
2402
+ ##
2403
+ # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules`
2404
+ # @return [::Gapic::Config::Method]
2405
+ #
2406
+ attr_reader :list_descendant_event_threat_detection_custom_modules
2407
+ ##
2408
+ # RPC-specific configuration for `get_event_threat_detection_custom_module`
2409
+ # @return [::Gapic::Config::Method]
2410
+ #
2411
+ attr_reader :get_event_threat_detection_custom_module
2412
+ ##
2413
+ # RPC-specific configuration for `create_event_threat_detection_custom_module`
2414
+ # @return [::Gapic::Config::Method]
2415
+ #
2416
+ attr_reader :create_event_threat_detection_custom_module
2417
+ ##
2418
+ # RPC-specific configuration for `update_event_threat_detection_custom_module`
2419
+ # @return [::Gapic::Config::Method]
2420
+ #
2421
+ attr_reader :update_event_threat_detection_custom_module
2422
+ ##
2423
+ # RPC-specific configuration for `delete_event_threat_detection_custom_module`
2424
+ # @return [::Gapic::Config::Method]
2425
+ #
2426
+ attr_reader :delete_event_threat_detection_custom_module
2427
+ ##
2428
+ # RPC-specific configuration for `validate_event_threat_detection_custom_module`
2429
+ # @return [::Gapic::Config::Method]
2430
+ #
2431
+ attr_reader :validate_event_threat_detection_custom_module
2432
+ ##
2433
+ # RPC-specific configuration for `get_security_center_service`
2434
+ # @return [::Gapic::Config::Method]
2435
+ #
2436
+ attr_reader :get_security_center_service
2437
+ ##
2438
+ # RPC-specific configuration for `list_security_center_services`
2439
+ # @return [::Gapic::Config::Method]
2440
+ #
2441
+ attr_reader :list_security_center_services
2442
+ ##
2443
+ # RPC-specific configuration for `update_security_center_service`
2444
+ # @return [::Gapic::Config::Method]
2445
+ #
2446
+ attr_reader :update_security_center_service
2447
+
2448
+ # @private
2449
+ def initialize parent_rpcs = nil
2450
+ 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
2451
+ @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config
2452
+ 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
2453
+ @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config
2454
+ 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
2455
+ @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config
2456
+ 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
2457
+ @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config
2458
+ 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
2459
+ @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config
2460
+ 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
2461
+ @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config
2462
+ 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
2463
+ @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config
2464
+ 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
2465
+ @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config
2466
+ simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module
2467
+ @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config
2468
+ list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules
2469
+ @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config
2470
+ get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module
2471
+ @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config
2472
+ list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules
2473
+ @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config
2474
+ list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules
2475
+ @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config
2476
+ get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module
2477
+ @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config
2478
+ create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module
2479
+ @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config
2480
+ update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module
2481
+ @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config
2482
+ delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module
2483
+ @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config
2484
+ validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module
2485
+ @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config
2486
+ get_security_center_service_config = parent_rpcs.get_security_center_service if parent_rpcs.respond_to? :get_security_center_service
2487
+ @get_security_center_service = ::Gapic::Config::Method.new get_security_center_service_config
2488
+ list_security_center_services_config = parent_rpcs.list_security_center_services if parent_rpcs.respond_to? :list_security_center_services
2489
+ @list_security_center_services = ::Gapic::Config::Method.new list_security_center_services_config
2490
+ update_security_center_service_config = parent_rpcs.update_security_center_service if parent_rpcs.respond_to? :update_security_center_service
2491
+ @update_security_center_service = ::Gapic::Config::Method.new update_security_center_service_config
2492
+
2493
+ yield self if block_given?
2494
+ end
2495
+ end
2496
+ end
2497
+ end
2498
+ end
2499
+ end
2500
+ end
2501
+ end
2502
+ end
2503
+ end