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

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