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

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