google-cloud-security_center-v1 0.9.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -214,6 +214,7 @@ module Google
214
214
 
215
215
  @operations_client = Operations.new do |config|
216
216
  config.credentials = credentials
217
+ config.quota_project = @quota_project_id
217
218
  config.endpoint = @config.endpoint
218
219
  end
219
220
 
@@ -235,6 +236,127 @@ module Google
235
236
 
236
237
  # Service calls
237
238
 
239
+ ##
240
+ # Kicks off an LRO to bulk mute findings for a parent based on a filter. The
241
+ # parent can be either an organization, folder or project. The findings
242
+ # matched by the filter will be muted after the LRO is done.
243
+ #
244
+ # @overload bulk_mute_findings(request, options = nil)
245
+ # Pass arguments to `bulk_mute_findings` via a request object, either of type
246
+ # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash.
247
+ #
248
+ # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash]
249
+ # A request object representing the call parameters. Required. To specify no
250
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
251
+ # @param options [::Gapic::CallOptions, ::Hash]
252
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
253
+ #
254
+ # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil)
255
+ # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at
256
+ # least one keyword argument is required. To specify no parameters, or to keep all
257
+ # the default parameter values, pass an empty Hash as a request object (see above).
258
+ #
259
+ # @param parent [::String]
260
+ # Required. The parent, at which bulk action needs to be applied. Its format is
261
+ # "organizations/[organization_id]", "folders/[folder_id]",
262
+ # "projects/[project_id]".
263
+ # @param filter [::String]
264
+ # Expression that identifies findings that should be updated.
265
+ # The expression is a list of zero or more restrictions combined
266
+ # via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
267
+ # has higher precedence than `AND`.
268
+ #
269
+ # Restrictions have the form `<field> <operator> <value>` and may have a
270
+ # `-` character in front of them to indicate negation. The fields map to
271
+ # those defined in the corresponding resource.
272
+ #
273
+ # The supported operators are:
274
+ #
275
+ # * `=` for all value types.
276
+ # * `>`, `<`, `>=`, `<=` for integer values.
277
+ # * `:`, meaning substring matching, for strings.
278
+ #
279
+ # The supported value types are:
280
+ #
281
+ # * string literals in quotes.
282
+ # * integer literals without quotes.
283
+ # * boolean literals `true` and `false` without quotes.
284
+ # @param mute_annotation [::String]
285
+ # This can be a mute configuration name or any identifier for mute/unmute
286
+ # of findings based on the filter.
287
+ #
288
+ # @yield [response, operation] Access the result along with the RPC operation
289
+ # @yieldparam response [::Gapic::Operation]
290
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
291
+ #
292
+ # @return [::Gapic::Operation]
293
+ #
294
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
295
+ #
296
+ # @example Basic example
297
+ # require "google/cloud/security_center/v1"
298
+ #
299
+ # # Create a client object. The client can be reused for multiple calls.
300
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
301
+ #
302
+ # # Create a request. To set request fields, pass in keyword arguments.
303
+ # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new
304
+ #
305
+ # # Call the bulk_mute_findings method.
306
+ # result = client.bulk_mute_findings request
307
+ #
308
+ # # The returned object is of type Gapic::Operation. You can use this
309
+ # # object to check the status of an operation, cancel it, or wait
310
+ # # for results. Here is how to block until completion:
311
+ # result.wait_until_done! timeout: 60
312
+ # if result.response?
313
+ # p result.response
314
+ # else
315
+ # puts "Error!"
316
+ # end
317
+ #
318
+ def bulk_mute_findings request, options = nil
319
+ raise ::ArgumentError, "request must be provided" if request.nil?
320
+
321
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest
322
+
323
+ # Converts hash and nil to an options object
324
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
325
+
326
+ # Customize the options with defaults
327
+ metadata = @config.rpcs.bulk_mute_findings.metadata.to_h
328
+
329
+ # Set x-goog-api-client and x-goog-user-project headers
330
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
331
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
332
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
333
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
334
+
335
+ header_params = {}
336
+ if request.parent
337
+ header_params["parent"] = request.parent
338
+ end
339
+
340
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
341
+ metadata[:"x-goog-request-params"] ||= request_params_header
342
+
343
+ options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout,
344
+ metadata: metadata,
345
+ retry_policy: @config.rpcs.bulk_mute_findings.retry_policy
346
+
347
+ options.apply_defaults timeout: @config.timeout,
348
+ metadata: @config.metadata,
349
+ retry_policy: @config.retry_policy
350
+
351
+ @security_center_stub.call_rpc :bulk_mute_findings, request, options: options do |response, operation|
352
+ response = ::Gapic::Operation.new response, @operations_client, options: options
353
+ yield response, operation if block_given?
354
+ return response
355
+ end
356
+ rescue ::GRPC::BadStatus => e
357
+ raise ::Google::Cloud::Error.from_error(e)
358
+ end
359
+
238
360
  ##
239
361
  # Creates a source.
240
362
  #
@@ -268,6 +390,21 @@ module Google
268
390
  #
269
391
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
270
392
  #
393
+ # @example Basic example
394
+ # require "google/cloud/security_center/v1"
395
+ #
396
+ # # Create a client object. The client can be reused for multiple calls.
397
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
398
+ #
399
+ # # Create a request. To set request fields, pass in keyword arguments.
400
+ # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new
401
+ #
402
+ # # Call the create_source method.
403
+ # result = client.create_source request
404
+ #
405
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source.
406
+ # p result
407
+ #
271
408
  def create_source request, options = nil
272
409
  raise ::ArgumentError, "request must be provided" if request.nil?
273
410
 
@@ -285,9 +422,11 @@ module Google
285
422
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
286
423
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
287
424
 
288
- header_params = {
289
- "parent" => request.parent
290
- }
425
+ header_params = {}
426
+ if request.parent
427
+ header_params["parent"] = request.parent
428
+ end
429
+
291
430
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
292
431
  metadata[:"x-goog-request-params"] ||= request_params_header
293
432
 
@@ -345,6 +484,21 @@ module Google
345
484
  #
346
485
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
347
486
  #
487
+ # @example Basic example
488
+ # require "google/cloud/security_center/v1"
489
+ #
490
+ # # Create a client object. The client can be reused for multiple calls.
491
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
492
+ #
493
+ # # Create a request. To set request fields, pass in keyword arguments.
494
+ # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new
495
+ #
496
+ # # Call the create_finding method.
497
+ # result = client.create_finding request
498
+ #
499
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding.
500
+ # p result
501
+ #
348
502
  def create_finding request, options = nil
349
503
  raise ::ArgumentError, "request must be provided" if request.nil?
350
504
 
@@ -362,9 +516,11 @@ module Google
362
516
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
363
517
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
364
518
 
365
- header_params = {
366
- "parent" => request.parent
367
- }
519
+ header_params = {}
520
+ if request.parent
521
+ header_params["parent"] = request.parent
522
+ end
523
+
368
524
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
369
525
  metadata[:"x-goog-request-params"] ||= request_params_header
370
526
 
@@ -384,6 +540,100 @@ module Google
384
540
  raise ::Google::Cloud::Error.from_error(e)
385
541
  end
386
542
 
543
+ ##
544
+ # Creates a mute config.
545
+ #
546
+ # @overload create_mute_config(request, options = nil)
547
+ # Pass arguments to `create_mute_config` via a request object, either of type
548
+ # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash.
549
+ #
550
+ # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash]
551
+ # A request object representing the call parameters. Required. To specify no
552
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
553
+ # @param options [::Gapic::CallOptions, ::Hash]
554
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
555
+ #
556
+ # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil)
557
+ # Pass arguments to `create_mute_config` via keyword arguments. Note that at
558
+ # least one keyword argument is required. To specify no parameters, or to keep all
559
+ # the default parameter values, pass an empty Hash as a request object (see above).
560
+ #
561
+ # @param parent [::String]
562
+ # Required. Resource name of the new mute configs's parent. Its format is
563
+ # "organizations/[organization_id]", "folders/[folder_id]", or
564
+ # "projects/[project_id]".
565
+ # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash]
566
+ # Required. The mute config being created.
567
+ # @param mute_config_id [::String]
568
+ # Required. Unique identifier provided by the client within the parent scope.
569
+ # It must consist of lower case letters, numbers, and hyphen, with the first
570
+ # character a letter, the last a letter or a number, and a 63 character
571
+ # maximum.
572
+ #
573
+ # @yield [response, operation] Access the result along with the RPC operation
574
+ # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig]
575
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
576
+ #
577
+ # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig]
578
+ #
579
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
580
+ #
581
+ # @example Basic example
582
+ # require "google/cloud/security_center/v1"
583
+ #
584
+ # # Create a client object. The client can be reused for multiple calls.
585
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
586
+ #
587
+ # # Create a request. To set request fields, pass in keyword arguments.
588
+ # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new
589
+ #
590
+ # # Call the create_mute_config method.
591
+ # result = client.create_mute_config request
592
+ #
593
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig.
594
+ # p result
595
+ #
596
+ def create_mute_config request, options = nil
597
+ raise ::ArgumentError, "request must be provided" if request.nil?
598
+
599
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest
600
+
601
+ # Converts hash and nil to an options object
602
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
603
+
604
+ # Customize the options with defaults
605
+ metadata = @config.rpcs.create_mute_config.metadata.to_h
606
+
607
+ # Set x-goog-api-client and x-goog-user-project headers
608
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
609
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
610
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
611
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
612
+
613
+ header_params = {}
614
+ if request.parent
615
+ header_params["parent"] = request.parent
616
+ end
617
+
618
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
619
+ metadata[:"x-goog-request-params"] ||= request_params_header
620
+
621
+ options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout,
622
+ metadata: metadata,
623
+ retry_policy: @config.rpcs.create_mute_config.retry_policy
624
+
625
+ options.apply_defaults timeout: @config.timeout,
626
+ metadata: @config.metadata,
627
+ retry_policy: @config.retry_policy
628
+
629
+ @security_center_stub.call_rpc :create_mute_config, request, options: options do |response, operation|
630
+ yield response, operation if block_given?
631
+ return response
632
+ end
633
+ rescue ::GRPC::BadStatus => e
634
+ raise ::Google::Cloud::Error.from_error(e)
635
+ end
636
+
387
637
  ##
388
638
  # Creates a notification config.
389
639
  #
@@ -422,6 +672,21 @@ module Google
422
672
  #
423
673
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
424
674
  #
675
+ # @example Basic example
676
+ # require "google/cloud/security_center/v1"
677
+ #
678
+ # # Create a client object. The client can be reused for multiple calls.
679
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
680
+ #
681
+ # # Create a request. To set request fields, pass in keyword arguments.
682
+ # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new
683
+ #
684
+ # # Call the create_notification_config method.
685
+ # result = client.create_notification_config request
686
+ #
687
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig.
688
+ # p result
689
+ #
425
690
  def create_notification_config request, options = nil
426
691
  raise ::ArgumentError, "request must be provided" if request.nil?
427
692
 
@@ -439,9 +704,11 @@ module Google
439
704
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
440
705
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
441
706
 
442
- header_params = {
443
- "parent" => request.parent
444
- }
707
+ header_params = {}
708
+ if request.parent
709
+ header_params["parent"] = request.parent
710
+ end
711
+
445
712
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
446
713
  metadata[:"x-goog-request-params"] ||= request_params_header
447
714
 
@@ -461,6 +728,94 @@ module Google
461
728
  raise ::Google::Cloud::Error.from_error(e)
462
729
  end
463
730
 
731
+ ##
732
+ # Deletes an existing mute config.
733
+ #
734
+ # @overload delete_mute_config(request, options = nil)
735
+ # Pass arguments to `delete_mute_config` via a request object, either of type
736
+ # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash.
737
+ #
738
+ # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash]
739
+ # A request object representing the call parameters. Required. To specify no
740
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
741
+ # @param options [::Gapic::CallOptions, ::Hash]
742
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
743
+ #
744
+ # @overload delete_mute_config(name: nil)
745
+ # Pass arguments to `delete_mute_config` via keyword arguments. Note that at
746
+ # least one keyword argument is required. To specify no parameters, or to keep all
747
+ # the default parameter values, pass an empty Hash as a request object (see above).
748
+ #
749
+ # @param name [::String]
750
+ # Required. Name of the mute config to delete. Its format is
751
+ # organizations/\\{organization}/muteConfigs/\\{config_id},
752
+ # folders/\\{folder}/muteConfigs/\\{config_id}, or
753
+ # projects/\\{project}/muteConfigs/\\{config_id}
754
+ #
755
+ # @yield [response, operation] Access the result along with the RPC operation
756
+ # @yieldparam response [::Google::Protobuf::Empty]
757
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
758
+ #
759
+ # @return [::Google::Protobuf::Empty]
760
+ #
761
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
762
+ #
763
+ # @example Basic example
764
+ # require "google/cloud/security_center/v1"
765
+ #
766
+ # # Create a client object. The client can be reused for multiple calls.
767
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
768
+ #
769
+ # # Create a request. To set request fields, pass in keyword arguments.
770
+ # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new
771
+ #
772
+ # # Call the delete_mute_config method.
773
+ # result = client.delete_mute_config request
774
+ #
775
+ # # The returned object is of type Google::Protobuf::Empty.
776
+ # p result
777
+ #
778
+ def delete_mute_config request, options = nil
779
+ raise ::ArgumentError, "request must be provided" if request.nil?
780
+
781
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest
782
+
783
+ # Converts hash and nil to an options object
784
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
785
+
786
+ # Customize the options with defaults
787
+ metadata = @config.rpcs.delete_mute_config.metadata.to_h
788
+
789
+ # Set x-goog-api-client and x-goog-user-project headers
790
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
791
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
792
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
793
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
794
+
795
+ header_params = {}
796
+ if request.name
797
+ header_params["name"] = request.name
798
+ end
799
+
800
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
801
+ metadata[:"x-goog-request-params"] ||= request_params_header
802
+
803
+ options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout,
804
+ metadata: metadata,
805
+ retry_policy: @config.rpcs.delete_mute_config.retry_policy
806
+
807
+ options.apply_defaults timeout: @config.timeout,
808
+ metadata: @config.metadata,
809
+ retry_policy: @config.retry_policy
810
+
811
+ @security_center_stub.call_rpc :delete_mute_config, request, options: options do |response, operation|
812
+ yield response, operation if block_given?
813
+ return response
814
+ end
815
+ rescue ::GRPC::BadStatus => e
816
+ raise ::Google::Cloud::Error.from_error(e)
817
+ end
818
+
464
819
  ##
465
820
  # Deletes a notification config.
466
821
  #
@@ -491,6 +846,21 @@ module Google
491
846
  #
492
847
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
493
848
  #
849
+ # @example Basic example
850
+ # require "google/cloud/security_center/v1"
851
+ #
852
+ # # Create a client object. The client can be reused for multiple calls.
853
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
854
+ #
855
+ # # Create a request. To set request fields, pass in keyword arguments.
856
+ # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new
857
+ #
858
+ # # Call the delete_notification_config method.
859
+ # result = client.delete_notification_config request
860
+ #
861
+ # # The returned object is of type Google::Protobuf::Empty.
862
+ # p result
863
+ #
494
864
  def delete_notification_config request, options = nil
495
865
  raise ::ArgumentError, "request must be provided" if request.nil?
496
866
 
@@ -508,9 +878,11 @@ module Google
508
878
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
509
879
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
510
880
 
511
- header_params = {
512
- "name" => request.name
513
- }
881
+ header_params = {}
882
+ if request.name
883
+ header_params["name"] = request.name
884
+ end
885
+
514
886
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
515
887
  metadata[:"x-goog-request-params"] ||= request_params_header
516
888
 
@@ -563,6 +935,21 @@ module Google
563
935
  #
564
936
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
565
937
  #
938
+ # @example Basic example
939
+ # require "google/cloud/security_center/v1"
940
+ #
941
+ # # Create a client object. The client can be reused for multiple calls.
942
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
943
+ #
944
+ # # Create a request. To set request fields, pass in keyword arguments.
945
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
946
+ #
947
+ # # Call the get_iam_policy method.
948
+ # result = client.get_iam_policy request
949
+ #
950
+ # # The returned object is of type Google::Iam::V1::Policy.
951
+ # p result
952
+ #
566
953
  def get_iam_policy request, options = nil
567
954
  raise ::ArgumentError, "request must be provided" if request.nil?
568
955
 
@@ -580,9 +967,11 @@ module Google
580
967
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
581
968
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
969
 
583
- header_params = {
584
- "resource" => request.resource
585
- }
970
+ header_params = {}
971
+ if request.resource
972
+ header_params["resource"] = request.resource
973
+ end
974
+
586
975
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
587
976
  metadata[:"x-goog-request-params"] ||= request_params_header
588
977
 
@@ -602,6 +991,94 @@ module Google
602
991
  raise ::Google::Cloud::Error.from_error(e)
603
992
  end
604
993
 
994
+ ##
995
+ # Gets a mute config.
996
+ #
997
+ # @overload get_mute_config(request, options = nil)
998
+ # Pass arguments to `get_mute_config` via a request object, either of type
999
+ # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash.
1000
+ #
1001
+ # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash]
1002
+ # A request object representing the call parameters. Required. To specify no
1003
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1004
+ # @param options [::Gapic::CallOptions, ::Hash]
1005
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1006
+ #
1007
+ # @overload get_mute_config(name: nil)
1008
+ # Pass arguments to `get_mute_config` via keyword arguments. Note that at
1009
+ # least one keyword argument is required. To specify no parameters, or to keep all
1010
+ # the default parameter values, pass an empty Hash as a request object (see above).
1011
+ #
1012
+ # @param name [::String]
1013
+ # Required. Name of the mute config to retrieve. Its format is
1014
+ # organizations/\\{organization}/muteConfigs/\\{config_id},
1015
+ # folders/\\{folder}/muteConfigs/\\{config_id}, or
1016
+ # projects/\\{project}/muteConfigs/\\{config_id}
1017
+ #
1018
+ # @yield [response, operation] Access the result along with the RPC operation
1019
+ # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig]
1020
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1021
+ #
1022
+ # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig]
1023
+ #
1024
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1025
+ #
1026
+ # @example Basic example
1027
+ # require "google/cloud/security_center/v1"
1028
+ #
1029
+ # # Create a client object. The client can be reused for multiple calls.
1030
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
1031
+ #
1032
+ # # Create a request. To set request fields, pass in keyword arguments.
1033
+ # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new
1034
+ #
1035
+ # # Call the get_mute_config method.
1036
+ # result = client.get_mute_config request
1037
+ #
1038
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig.
1039
+ # p result
1040
+ #
1041
+ def get_mute_config request, options = nil
1042
+ raise ::ArgumentError, "request must be provided" if request.nil?
1043
+
1044
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest
1045
+
1046
+ # Converts hash and nil to an options object
1047
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1048
+
1049
+ # Customize the options with defaults
1050
+ metadata = @config.rpcs.get_mute_config.metadata.to_h
1051
+
1052
+ # Set x-goog-api-client and x-goog-user-project headers
1053
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1054
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1055
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1056
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1057
+
1058
+ header_params = {}
1059
+ if request.name
1060
+ header_params["name"] = request.name
1061
+ end
1062
+
1063
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1064
+ metadata[:"x-goog-request-params"] ||= request_params_header
1065
+
1066
+ options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout,
1067
+ metadata: metadata,
1068
+ retry_policy: @config.rpcs.get_mute_config.retry_policy
1069
+
1070
+ options.apply_defaults timeout: @config.timeout,
1071
+ metadata: @config.metadata,
1072
+ retry_policy: @config.retry_policy
1073
+
1074
+ @security_center_stub.call_rpc :get_mute_config, request, options: options do |response, operation|
1075
+ yield response, operation if block_given?
1076
+ return response
1077
+ end
1078
+ rescue ::GRPC::BadStatus => e
1079
+ raise ::Google::Cloud::Error.from_error(e)
1080
+ end
1081
+
605
1082
  ##
606
1083
  # Gets a notification config.
607
1084
  #
@@ -632,6 +1109,21 @@ module Google
632
1109
  #
633
1110
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
634
1111
  #
1112
+ # @example Basic example
1113
+ # require "google/cloud/security_center/v1"
1114
+ #
1115
+ # # Create a client object. The client can be reused for multiple calls.
1116
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
1117
+ #
1118
+ # # Create a request. To set request fields, pass in keyword arguments.
1119
+ # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new
1120
+ #
1121
+ # # Call the get_notification_config method.
1122
+ # result = client.get_notification_config request
1123
+ #
1124
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig.
1125
+ # p result
1126
+ #
635
1127
  def get_notification_config request, options = nil
636
1128
  raise ::ArgumentError, "request must be provided" if request.nil?
637
1129
 
@@ -649,9 +1141,11 @@ module Google
649
1141
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
650
1142
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
651
1143
 
652
- header_params = {
653
- "name" => request.name
654
- }
1144
+ header_params = {}
1145
+ if request.name
1146
+ header_params["name"] = request.name
1147
+ end
1148
+
655
1149
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
656
1150
  metadata[:"x-goog-request-params"] ||= request_params_header
657
1151
 
@@ -701,6 +1195,21 @@ module Google
701
1195
  #
702
1196
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
703
1197
  #
1198
+ # @example Basic example
1199
+ # require "google/cloud/security_center/v1"
1200
+ #
1201
+ # # Create a client object. The client can be reused for multiple calls.
1202
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
1203
+ #
1204
+ # # Create a request. To set request fields, pass in keyword arguments.
1205
+ # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new
1206
+ #
1207
+ # # Call the get_organization_settings method.
1208
+ # result = client.get_organization_settings request
1209
+ #
1210
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings.
1211
+ # p result
1212
+ #
704
1213
  def get_organization_settings request, options = nil
705
1214
  raise ::ArgumentError, "request must be provided" if request.nil?
706
1215
 
@@ -718,9 +1227,11 @@ module Google
718
1227
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
719
1228
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
720
1229
 
721
- header_params = {
722
- "name" => request.name
723
- }
1230
+ header_params = {}
1231
+ if request.name
1232
+ header_params["name"] = request.name
1233
+ end
1234
+
724
1235
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
725
1236
  metadata[:"x-goog-request-params"] ||= request_params_header
726
1237
 
@@ -770,6 +1281,21 @@ module Google
770
1281
  #
771
1282
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
772
1283
  #
1284
+ # @example Basic example
1285
+ # require "google/cloud/security_center/v1"
1286
+ #
1287
+ # # Create a client object. The client can be reused for multiple calls.
1288
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
1289
+ #
1290
+ # # Create a request. To set request fields, pass in keyword arguments.
1291
+ # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new
1292
+ #
1293
+ # # Call the get_source method.
1294
+ # result = client.get_source request
1295
+ #
1296
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source.
1297
+ # p result
1298
+ #
773
1299
  def get_source request, options = nil
774
1300
  raise ::ArgumentError, "request must be provided" if request.nil?
775
1301
 
@@ -787,9 +1313,11 @@ module Google
787
1313
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
788
1314
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
789
1315
 
790
- header_params = {
791
- "name" => request.name
792
- }
1316
+ header_params = {}
1317
+ if request.name
1318
+ header_params["name"] = request.name
1319
+ end
1320
+
793
1321
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
794
1322
  metadata[:"x-goog-request-params"] ||= request_params_header
795
1323
 
@@ -963,6 +1491,27 @@ module Google
963
1491
  #
964
1492
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
965
1493
  #
1494
+ # @example Basic example
1495
+ # require "google/cloud/security_center/v1"
1496
+ #
1497
+ # # Create a client object. The client can be reused for multiple calls.
1498
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
1499
+ #
1500
+ # # Create a request. To set request fields, pass in keyword arguments.
1501
+ # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new
1502
+ #
1503
+ # # Call the group_assets method.
1504
+ # result = client.group_assets request
1505
+ #
1506
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1507
+ # # iterate over all elements by calling #each, and the enumerable
1508
+ # # will lazily make API calls to fetch subsequent pages. Other
1509
+ # # methods are also available for managing paging directly.
1510
+ # result.each do |response|
1511
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult.
1512
+ # p response
1513
+ # end
1514
+ #
966
1515
  def group_assets request, options = nil
967
1516
  raise ::ArgumentError, "request must be provided" if request.nil?
968
1517
 
@@ -980,9 +1529,11 @@ module Google
980
1529
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
981
1530
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
982
1531
 
983
- header_params = {
984
- "parent" => request.parent
985
- }
1532
+ header_params = {}
1533
+ if request.parent
1534
+ header_params["parent"] = request.parent
1535
+ end
1536
+
986
1537
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
987
1538
  metadata[:"x-goog-request-params"] ||= request_params_header
988
1539
 
@@ -1165,6 +1716,27 @@ module Google
1165
1716
  #
1166
1717
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1167
1718
  #
1719
+ # @example Basic example
1720
+ # require "google/cloud/security_center/v1"
1721
+ #
1722
+ # # Create a client object. The client can be reused for multiple calls.
1723
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
1724
+ #
1725
+ # # Create a request. To set request fields, pass in keyword arguments.
1726
+ # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new
1727
+ #
1728
+ # # Call the group_findings method.
1729
+ # result = client.group_findings request
1730
+ #
1731
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1732
+ # # iterate over all elements by calling #each, and the enumerable
1733
+ # # will lazily make API calls to fetch subsequent pages. Other
1734
+ # # methods are also available for managing paging directly.
1735
+ # result.each do |response|
1736
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult.
1737
+ # p response
1738
+ # end
1739
+ #
1168
1740
  def group_findings request, options = nil
1169
1741
  raise ::ArgumentError, "request must be provided" if request.nil?
1170
1742
 
@@ -1182,9 +1754,11 @@ module Google
1182
1754
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1183
1755
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1184
1756
 
1185
- header_params = {
1186
- "parent" => request.parent
1187
- }
1757
+ header_params = {}
1758
+ if request.parent
1759
+ header_params["parent"] = request.parent
1760
+ end
1761
+
1188
1762
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1189
1763
  metadata[:"x-goog-request-params"] ||= request_params_header
1190
1764
 
@@ -1362,6 +1936,27 @@ module Google
1362
1936
  #
1363
1937
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1364
1938
  #
1939
+ # @example Basic example
1940
+ # require "google/cloud/security_center/v1"
1941
+ #
1942
+ # # Create a client object. The client can be reused for multiple calls.
1943
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
1944
+ #
1945
+ # # Create a request. To set request fields, pass in keyword arguments.
1946
+ # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new
1947
+ #
1948
+ # # Call the list_assets method.
1949
+ # result = client.list_assets request
1950
+ #
1951
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1952
+ # # iterate over all elements by calling #each, and the enumerable
1953
+ # # will lazily make API calls to fetch subsequent pages. Other
1954
+ # # methods are also available for managing paging directly.
1955
+ # result.each do |response|
1956
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult.
1957
+ # p response
1958
+ # end
1959
+ #
1365
1960
  def list_assets request, options = nil
1366
1961
  raise ::ArgumentError, "request must be provided" if request.nil?
1367
1962
 
@@ -1379,9 +1974,11 @@ module Google
1379
1974
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1380
1975
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1381
1976
 
1382
- header_params = {
1383
- "parent" => request.parent
1384
- }
1977
+ header_params = {}
1978
+ if request.parent
1979
+ header_params["parent"] = request.parent
1980
+ end
1981
+
1385
1982
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1386
1983
  metadata[:"x-goog-request-params"] ||= request_params_header
1387
1984
 
@@ -1492,6 +2089,7 @@ module Google
1492
2089
  # * resource.project_display_name: `=`, `:`
1493
2090
  # * resource.type: `=`, `:`
1494
2091
  # * resource.folders.resource_folder: `=`, `:`
2092
+ # * resource.display_name: `=`, `:`
1495
2093
  # @param order_by [::String]
1496
2094
  # Expression that defines what fields and order to use for sorting. The
1497
2095
  # string value should follow SQL syntax: comma separated list of fields. For
@@ -1566,6 +2164,27 @@ module Google
1566
2164
  #
1567
2165
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1568
2166
  #
2167
+ # @example Basic example
2168
+ # require "google/cloud/security_center/v1"
2169
+ #
2170
+ # # Create a client object. The client can be reused for multiple calls.
2171
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2172
+ #
2173
+ # # Create a request. To set request fields, pass in keyword arguments.
2174
+ # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new
2175
+ #
2176
+ # # Call the list_findings method.
2177
+ # result = client.list_findings request
2178
+ #
2179
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2180
+ # # iterate over all elements by calling #each, and the enumerable
2181
+ # # will lazily make API calls to fetch subsequent pages. Other
2182
+ # # methods are also available for managing paging directly.
2183
+ # result.each do |response|
2184
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult.
2185
+ # p response
2186
+ # end
2187
+ #
1569
2188
  def list_findings request, options = nil
1570
2189
  raise ::ArgumentError, "request must be provided" if request.nil?
1571
2190
 
@@ -1583,9 +2202,11 @@ module Google
1583
2202
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1584
2203
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1585
2204
 
1586
- header_params = {
1587
- "parent" => request.parent
1588
- }
2205
+ header_params = {}
2206
+ if request.parent
2207
+ header_params["parent"] = request.parent
2208
+ end
2209
+
1589
2210
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1590
2211
  metadata[:"x-goog-request-params"] ||= request_params_header
1591
2212
 
@@ -1606,6 +2227,111 @@ module Google
1606
2227
  raise ::Google::Cloud::Error.from_error(e)
1607
2228
  end
1608
2229
 
2230
+ ##
2231
+ # Lists mute configs.
2232
+ #
2233
+ # @overload list_mute_configs(request, options = nil)
2234
+ # Pass arguments to `list_mute_configs` via a request object, either of type
2235
+ # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash.
2236
+ #
2237
+ # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash]
2238
+ # A request object representing the call parameters. Required. To specify no
2239
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2240
+ # @param options [::Gapic::CallOptions, ::Hash]
2241
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2242
+ #
2243
+ # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil)
2244
+ # Pass arguments to `list_mute_configs` via keyword arguments. Note that at
2245
+ # least one keyword argument is required. To specify no parameters, or to keep all
2246
+ # the default parameter values, pass an empty Hash as a request object (see above).
2247
+ #
2248
+ # @param parent [::String]
2249
+ # Required. The parent, which owns the collection of mute configs. Its format is
2250
+ # "organizations/[organization_id]", "folders/[folder_id]",
2251
+ # "projects/[project_id]".
2252
+ # @param page_size [::Integer]
2253
+ # The maximum number of configs to return. The service may return fewer than
2254
+ # this value.
2255
+ # If unspecified, at most 10 configs will be returned.
2256
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
2257
+ # @param page_token [::String]
2258
+ # A page token, received from a previous `ListMuteConfigs` call.
2259
+ # Provide this to retrieve the subsequent page.
2260
+ #
2261
+ # When paginating, all other parameters provided to `ListMuteConfigs` must
2262
+ # match the call that provided the page token.
2263
+ #
2264
+ # @yield [response, operation] Access the result along with the RPC operation
2265
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>]
2266
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2267
+ #
2268
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>]
2269
+ #
2270
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2271
+ #
2272
+ # @example Basic example
2273
+ # require "google/cloud/security_center/v1"
2274
+ #
2275
+ # # Create a client object. The client can be reused for multiple calls.
2276
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2277
+ #
2278
+ # # Create a request. To set request fields, pass in keyword arguments.
2279
+ # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new
2280
+ #
2281
+ # # Call the list_mute_configs method.
2282
+ # result = client.list_mute_configs request
2283
+ #
2284
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2285
+ # # iterate over all elements by calling #each, and the enumerable
2286
+ # # will lazily make API calls to fetch subsequent pages. Other
2287
+ # # methods are also available for managing paging directly.
2288
+ # result.each do |response|
2289
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig.
2290
+ # p response
2291
+ # end
2292
+ #
2293
+ def list_mute_configs request, options = nil
2294
+ raise ::ArgumentError, "request must be provided" if request.nil?
2295
+
2296
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest
2297
+
2298
+ # Converts hash and nil to an options object
2299
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2300
+
2301
+ # Customize the options with defaults
2302
+ metadata = @config.rpcs.list_mute_configs.metadata.to_h
2303
+
2304
+ # Set x-goog-api-client and x-goog-user-project headers
2305
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2306
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2307
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2308
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2309
+
2310
+ header_params = {}
2311
+ if request.parent
2312
+ header_params["parent"] = request.parent
2313
+ end
2314
+
2315
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2316
+ metadata[:"x-goog-request-params"] ||= request_params_header
2317
+
2318
+ options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout,
2319
+ metadata: metadata,
2320
+ retry_policy: @config.rpcs.list_mute_configs.retry_policy
2321
+
2322
+ options.apply_defaults timeout: @config.timeout,
2323
+ metadata: @config.metadata,
2324
+ retry_policy: @config.retry_policy
2325
+
2326
+ @security_center_stub.call_rpc :list_mute_configs, request, options: options do |response, operation|
2327
+ response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_mute_configs, request, response, operation, options
2328
+ yield response, operation if block_given?
2329
+ return response
2330
+ end
2331
+ rescue ::GRPC::BadStatus => e
2332
+ raise ::Google::Cloud::Error.from_error(e)
2333
+ end
2334
+
1609
2335
  ##
1610
2336
  # Lists notification configs.
1611
2337
  #
@@ -1643,6 +2369,27 @@ module Google
1643
2369
  #
1644
2370
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1645
2371
  #
2372
+ # @example Basic example
2373
+ # require "google/cloud/security_center/v1"
2374
+ #
2375
+ # # Create a client object. The client can be reused for multiple calls.
2376
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2377
+ #
2378
+ # # Create a request. To set request fields, pass in keyword arguments.
2379
+ # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new
2380
+ #
2381
+ # # Call the list_notification_configs method.
2382
+ # result = client.list_notification_configs request
2383
+ #
2384
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2385
+ # # iterate over all elements by calling #each, and the enumerable
2386
+ # # will lazily make API calls to fetch subsequent pages. Other
2387
+ # # methods are also available for managing paging directly.
2388
+ # result.each do |response|
2389
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig.
2390
+ # p response
2391
+ # end
2392
+ #
1646
2393
  def list_notification_configs request, options = nil
1647
2394
  raise ::ArgumentError, "request must be provided" if request.nil?
1648
2395
 
@@ -1660,9 +2407,11 @@ module Google
1660
2407
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1661
2408
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1662
2409
 
1663
- header_params = {
1664
- "parent" => request.parent
1665
- }
2410
+ header_params = {}
2411
+ if request.parent
2412
+ header_params["parent"] = request.parent
2413
+ end
2414
+
1666
2415
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1667
2416
  metadata[:"x-goog-request-params"] ||= request_params_header
1668
2417
 
@@ -1721,6 +2470,27 @@ module Google
1721
2470
  #
1722
2471
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1723
2472
  #
2473
+ # @example Basic example
2474
+ # require "google/cloud/security_center/v1"
2475
+ #
2476
+ # # Create a client object. The client can be reused for multiple calls.
2477
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2478
+ #
2479
+ # # Create a request. To set request fields, pass in keyword arguments.
2480
+ # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new
2481
+ #
2482
+ # # Call the list_sources method.
2483
+ # result = client.list_sources request
2484
+ #
2485
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2486
+ # # iterate over all elements by calling #each, and the enumerable
2487
+ # # will lazily make API calls to fetch subsequent pages. Other
2488
+ # # methods are also available for managing paging directly.
2489
+ # result.each do |response|
2490
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source.
2491
+ # p response
2492
+ # end
2493
+ #
1724
2494
  def list_sources request, options = nil
1725
2495
  raise ::ArgumentError, "request must be provided" if request.nil?
1726
2496
 
@@ -1738,9 +2508,11 @@ module Google
1738
2508
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1739
2509
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1740
2510
 
1741
- header_params = {
1742
- "parent" => request.parent
1743
- }
2511
+ header_params = {}
2512
+ if request.parent
2513
+ header_params["parent"] = request.parent
2514
+ end
2515
+
1744
2516
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1745
2517
  metadata[:"x-goog-request-params"] ||= request_params_header
1746
2518
 
@@ -1773,39 +2545,154 @@ module Google
1773
2545
  # Pass arguments to `run_asset_discovery` via a request object, either of type
1774
2546
  # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash.
1775
2547
  #
1776
- # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash]
2548
+ # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash]
2549
+ # A request object representing the call parameters. Required. To specify no
2550
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2551
+ # @param options [::Gapic::CallOptions, ::Hash]
2552
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2553
+ #
2554
+ # @overload run_asset_discovery(parent: nil)
2555
+ # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at
2556
+ # least one keyword argument is required. To specify no parameters, or to keep all
2557
+ # the default parameter values, pass an empty Hash as a request object (see above).
2558
+ #
2559
+ # @param parent [::String]
2560
+ # Required. Name of the organization to run asset discovery for. Its format is
2561
+ # "organizations/[organization_id]".
2562
+ #
2563
+ # @yield [response, operation] Access the result along with the RPC operation
2564
+ # @yieldparam response [::Gapic::Operation]
2565
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2566
+ #
2567
+ # @return [::Gapic::Operation]
2568
+ #
2569
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2570
+ #
2571
+ # @example Basic example
2572
+ # require "google/cloud/security_center/v1"
2573
+ #
2574
+ # # Create a client object. The client can be reused for multiple calls.
2575
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2576
+ #
2577
+ # # Create a request. To set request fields, pass in keyword arguments.
2578
+ # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new
2579
+ #
2580
+ # # Call the run_asset_discovery method.
2581
+ # result = client.run_asset_discovery request
2582
+ #
2583
+ # # The returned object is of type Gapic::Operation. You can use this
2584
+ # # object to check the status of an operation, cancel it, or wait
2585
+ # # for results. Here is how to block until completion:
2586
+ # result.wait_until_done! timeout: 60
2587
+ # if result.response?
2588
+ # p result.response
2589
+ # else
2590
+ # puts "Error!"
2591
+ # end
2592
+ #
2593
+ def run_asset_discovery request, options = nil
2594
+ raise ::ArgumentError, "request must be provided" if request.nil?
2595
+
2596
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest
2597
+
2598
+ # Converts hash and nil to an options object
2599
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2600
+
2601
+ # Customize the options with defaults
2602
+ metadata = @config.rpcs.run_asset_discovery.metadata.to_h
2603
+
2604
+ # Set x-goog-api-client and x-goog-user-project headers
2605
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2606
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2607
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2608
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2609
+
2610
+ header_params = {}
2611
+ if request.parent
2612
+ header_params["parent"] = request.parent
2613
+ end
2614
+
2615
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2616
+ metadata[:"x-goog-request-params"] ||= request_params_header
2617
+
2618
+ options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout,
2619
+ metadata: metadata,
2620
+ retry_policy: @config.rpcs.run_asset_discovery.retry_policy
2621
+
2622
+ options.apply_defaults timeout: @config.timeout,
2623
+ metadata: @config.metadata,
2624
+ retry_policy: @config.retry_policy
2625
+
2626
+ @security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation|
2627
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2628
+ yield response, operation if block_given?
2629
+ return response
2630
+ end
2631
+ rescue ::GRPC::BadStatus => e
2632
+ raise ::Google::Cloud::Error.from_error(e)
2633
+ end
2634
+
2635
+ ##
2636
+ # Updates the state of a finding.
2637
+ #
2638
+ # @overload set_finding_state(request, options = nil)
2639
+ # Pass arguments to `set_finding_state` via a request object, either of type
2640
+ # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash.
2641
+ #
2642
+ # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash]
1777
2643
  # A request object representing the call parameters. Required. To specify no
1778
2644
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1779
2645
  # @param options [::Gapic::CallOptions, ::Hash]
1780
2646
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1781
2647
  #
1782
- # @overload run_asset_discovery(parent: nil)
1783
- # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at
2648
+ # @overload set_finding_state(name: nil, state: nil, start_time: nil)
2649
+ # Pass arguments to `set_finding_state` via keyword arguments. Note that at
1784
2650
  # least one keyword argument is required. To specify no parameters, or to keep all
1785
2651
  # the default parameter values, pass an empty Hash as a request object (see above).
1786
2652
  #
1787
- # @param parent [::String]
1788
- # Required. Name of the organization to run asset discovery for. Its format is
1789
- # "organizations/[organization_id]".
2653
+ # @param name [::String]
2654
+ # Required. The relative resource name of the finding. See:
2655
+ # https://cloud.google.com/apis/design/resource_names#relative_resource_name
2656
+ # Example:
2657
+ # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}".
2658
+ # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State]
2659
+ # Required. The desired State of the finding.
2660
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
2661
+ # Required. The time at which the updated state takes effect.
1790
2662
  #
1791
2663
  # @yield [response, operation] Access the result along with the RPC operation
1792
- # @yieldparam response [::Gapic::Operation]
2664
+ # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding]
1793
2665
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1794
2666
  #
1795
- # @return [::Gapic::Operation]
2667
+ # @return [::Google::Cloud::SecurityCenter::V1::Finding]
1796
2668
  #
1797
2669
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1798
2670
  #
1799
- def run_asset_discovery request, options = nil
2671
+ # @example Basic example
2672
+ # require "google/cloud/security_center/v1"
2673
+ #
2674
+ # # Create a client object. The client can be reused for multiple calls.
2675
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2676
+ #
2677
+ # # Create a request. To set request fields, pass in keyword arguments.
2678
+ # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new
2679
+ #
2680
+ # # Call the set_finding_state method.
2681
+ # result = client.set_finding_state request
2682
+ #
2683
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding.
2684
+ # p result
2685
+ #
2686
+ def set_finding_state request, options = nil
1800
2687
  raise ::ArgumentError, "request must be provided" if request.nil?
1801
2688
 
1802
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest
2689
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest
1803
2690
 
1804
2691
  # Converts hash and nil to an options object
1805
2692
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1806
2693
 
1807
2694
  # Customize the options with defaults
1808
- metadata = @config.rpcs.run_asset_discovery.metadata.to_h
2695
+ metadata = @config.rpcs.set_finding_state.metadata.to_h
1809
2696
 
1810
2697
  # Set x-goog-api-client and x-goog-user-project headers
1811
2698
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1813,22 +2700,23 @@ module Google
1813
2700
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1814
2701
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1815
2702
 
1816
- header_params = {
1817
- "parent" => request.parent
1818
- }
2703
+ header_params = {}
2704
+ if request.name
2705
+ header_params["name"] = request.name
2706
+ end
2707
+
1819
2708
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1820
2709
  metadata[:"x-goog-request-params"] ||= request_params_header
1821
2710
 
1822
- options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout,
2711
+ options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout,
1823
2712
  metadata: metadata,
1824
- retry_policy: @config.rpcs.run_asset_discovery.retry_policy
2713
+ retry_policy: @config.rpcs.set_finding_state.retry_policy
1825
2714
 
1826
2715
  options.apply_defaults timeout: @config.timeout,
1827
2716
  metadata: @config.metadata,
1828
2717
  retry_policy: @config.retry_policy
1829
2718
 
1830
- @security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation|
1831
- response = ::Gapic::Operation.new response, @operations_client, options: options
2719
+ @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation|
1832
2720
  yield response, operation if block_given?
1833
2721
  return response
1834
2722
  end
@@ -1837,20 +2725,20 @@ module Google
1837
2725
  end
1838
2726
 
1839
2727
  ##
1840
- # Updates the state of a finding.
2728
+ # Updates the mute state of a finding.
1841
2729
  #
1842
- # @overload set_finding_state(request, options = nil)
1843
- # Pass arguments to `set_finding_state` via a request object, either of type
1844
- # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash.
2730
+ # @overload set_mute(request, options = nil)
2731
+ # Pass arguments to `set_mute` via a request object, either of type
2732
+ # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash.
1845
2733
  #
1846
- # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash]
2734
+ # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash]
1847
2735
  # A request object representing the call parameters. Required. To specify no
1848
2736
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1849
2737
  # @param options [::Gapic::CallOptions, ::Hash]
1850
2738
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1851
2739
  #
1852
- # @overload set_finding_state(name: nil, state: nil, start_time: nil)
1853
- # Pass arguments to `set_finding_state` via keyword arguments. Note that at
2740
+ # @overload set_mute(name: nil, mute: nil)
2741
+ # Pass arguments to `set_mute` via keyword arguments. Note that at
1854
2742
  # least one keyword argument is required. To specify no parameters, or to keep all
1855
2743
  # the default parameter values, pass an empty Hash as a request object (see above).
1856
2744
  #
@@ -1858,11 +2746,11 @@ module Google
1858
2746
  # Required. The relative resource name of the finding. See:
1859
2747
  # https://cloud.google.com/apis/design/resource_names#relative_resource_name
1860
2748
  # Example:
1861
- # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}".
1862
- # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State]
1863
- # Required. The desired State of the finding.
1864
- # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
1865
- # Required. The time at which the updated state takes effect.
2749
+ # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}",
2750
+ # "folders/\\{folder_id}/sources/\\{source_id}/finding/\\{finding_id}",
2751
+ # "projects/\\{project_id}/sources/\\{source_id}/finding/\\{finding_id}".
2752
+ # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute]
2753
+ # Required. The desired state of the Mute.
1866
2754
  #
1867
2755
  # @yield [response, operation] Access the result along with the RPC operation
1868
2756
  # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding]
@@ -1872,16 +2760,31 @@ module Google
1872
2760
  #
1873
2761
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1874
2762
  #
1875
- def set_finding_state request, options = nil
2763
+ # @example Basic example
2764
+ # require "google/cloud/security_center/v1"
2765
+ #
2766
+ # # Create a client object. The client can be reused for multiple calls.
2767
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2768
+ #
2769
+ # # Create a request. To set request fields, pass in keyword arguments.
2770
+ # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new
2771
+ #
2772
+ # # Call the set_mute method.
2773
+ # result = client.set_mute request
2774
+ #
2775
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding.
2776
+ # p result
2777
+ #
2778
+ def set_mute request, options = nil
1876
2779
  raise ::ArgumentError, "request must be provided" if request.nil?
1877
2780
 
1878
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest
2781
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest
1879
2782
 
1880
2783
  # Converts hash and nil to an options object
1881
2784
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1882
2785
 
1883
2786
  # Customize the options with defaults
1884
- metadata = @config.rpcs.set_finding_state.metadata.to_h
2787
+ metadata = @config.rpcs.set_mute.metadata.to_h
1885
2788
 
1886
2789
  # Set x-goog-api-client and x-goog-user-project headers
1887
2790
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1889,21 +2792,23 @@ module Google
1889
2792
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1890
2793
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1891
2794
 
1892
- header_params = {
1893
- "name" => request.name
1894
- }
2795
+ header_params = {}
2796
+ if request.name
2797
+ header_params["name"] = request.name
2798
+ end
2799
+
1895
2800
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1896
2801
  metadata[:"x-goog-request-params"] ||= request_params_header
1897
2802
 
1898
- options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout,
2803
+ options.apply_defaults timeout: @config.rpcs.set_mute.timeout,
1899
2804
  metadata: metadata,
1900
- retry_policy: @config.rpcs.set_finding_state.retry_policy
2805
+ retry_policy: @config.rpcs.set_mute.retry_policy
1901
2806
 
1902
2807
  options.apply_defaults timeout: @config.timeout,
1903
2808
  metadata: @config.metadata,
1904
2809
  retry_policy: @config.retry_policy
1905
2810
 
1906
- @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation|
2811
+ @security_center_stub.call_rpc :set_mute, request, options: options do |response, operation|
1907
2812
  yield response, operation if block_given?
1908
2813
  return response
1909
2814
  end
@@ -1946,6 +2851,21 @@ module Google
1946
2851
  #
1947
2852
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1948
2853
  #
2854
+ # @example Basic example
2855
+ # require "google/cloud/security_center/v1"
2856
+ #
2857
+ # # Create a client object. The client can be reused for multiple calls.
2858
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2859
+ #
2860
+ # # Create a request. To set request fields, pass in keyword arguments.
2861
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
2862
+ #
2863
+ # # Call the set_iam_policy method.
2864
+ # result = client.set_iam_policy request
2865
+ #
2866
+ # # The returned object is of type Google::Iam::V1::Policy.
2867
+ # p result
2868
+ #
1949
2869
  def set_iam_policy request, options = nil
1950
2870
  raise ::ArgumentError, "request must be provided" if request.nil?
1951
2871
 
@@ -1963,9 +2883,11 @@ module Google
1963
2883
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
1964
2884
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1965
2885
 
1966
- header_params = {
1967
- "resource" => request.resource
1968
- }
2886
+ header_params = {}
2887
+ if request.resource
2888
+ header_params["resource"] = request.resource
2889
+ end
2890
+
1969
2891
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1970
2892
  metadata[:"x-goog-request-params"] ||= request_params_header
1971
2893
 
@@ -2020,6 +2942,21 @@ module Google
2020
2942
  #
2021
2943
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2022
2944
  #
2945
+ # @example Basic example
2946
+ # require "google/cloud/security_center/v1"
2947
+ #
2948
+ # # Create a client object. The client can be reused for multiple calls.
2949
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
2950
+ #
2951
+ # # Create a request. To set request fields, pass in keyword arguments.
2952
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
2953
+ #
2954
+ # # Call the test_iam_permissions method.
2955
+ # result = client.test_iam_permissions request
2956
+ #
2957
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
2958
+ # p result
2959
+ #
2023
2960
  def test_iam_permissions request, options = nil
2024
2961
  raise ::ArgumentError, "request must be provided" if request.nil?
2025
2962
 
@@ -2037,9 +2974,11 @@ module Google
2037
2974
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2038
2975
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2039
2976
 
2040
- header_params = {
2041
- "resource" => request.resource
2042
- }
2977
+ header_params = {}
2978
+ if request.resource
2979
+ header_params["resource"] = request.resource
2980
+ end
2981
+
2043
2982
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2044
2983
  metadata[:"x-goog-request-params"] ||= request_params_header
2045
2984
 
@@ -2059,6 +2998,95 @@ module Google
2059
2998
  raise ::Google::Cloud::Error.from_error(e)
2060
2999
  end
2061
3000
 
3001
+ ##
3002
+ # Updates external system. This is for a given finding.
3003
+ #
3004
+ # @overload update_external_system(request, options = nil)
3005
+ # Pass arguments to `update_external_system` via a request object, either of type
3006
+ # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash.
3007
+ #
3008
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash]
3009
+ # A request object representing the call parameters. Required. To specify no
3010
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3011
+ # @param options [::Gapic::CallOptions, ::Hash]
3012
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3013
+ #
3014
+ # @overload update_external_system(external_system: nil, update_mask: nil)
3015
+ # Pass arguments to `update_external_system` via keyword arguments. Note that at
3016
+ # least one keyword argument is required. To specify no parameters, or to keep all
3017
+ # the default parameter values, pass an empty Hash as a request object (see above).
3018
+ #
3019
+ # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash]
3020
+ # Required. The external system resource to update.
3021
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3022
+ # The FieldMask to use when updating the external system resource.
3023
+ #
3024
+ # If empty all mutable fields will be updated.
3025
+ #
3026
+ # @yield [response, operation] Access the result along with the RPC operation
3027
+ # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ExternalSystem]
3028
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3029
+ #
3030
+ # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem]
3031
+ #
3032
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3033
+ #
3034
+ # @example Basic example
3035
+ # require "google/cloud/security_center/v1"
3036
+ #
3037
+ # # Create a client object. The client can be reused for multiple calls.
3038
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3039
+ #
3040
+ # # Create a request. To set request fields, pass in keyword arguments.
3041
+ # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new
3042
+ #
3043
+ # # Call the update_external_system method.
3044
+ # result = client.update_external_system request
3045
+ #
3046
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem.
3047
+ # p result
3048
+ #
3049
+ def update_external_system request, options = nil
3050
+ raise ::ArgumentError, "request must be provided" if request.nil?
3051
+
3052
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest
3053
+
3054
+ # Converts hash and nil to an options object
3055
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3056
+
3057
+ # Customize the options with defaults
3058
+ metadata = @config.rpcs.update_external_system.metadata.to_h
3059
+
3060
+ # Set x-goog-api-client and x-goog-user-project headers
3061
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3062
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3063
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
3064
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3065
+
3066
+ header_params = {}
3067
+ if request.external_system&.name
3068
+ header_params["external_system.name"] = request.external_system.name
3069
+ end
3070
+
3071
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3072
+ metadata[:"x-goog-request-params"] ||= request_params_header
3073
+
3074
+ options.apply_defaults timeout: @config.rpcs.update_external_system.timeout,
3075
+ metadata: metadata,
3076
+ retry_policy: @config.rpcs.update_external_system.retry_policy
3077
+
3078
+ options.apply_defaults timeout: @config.timeout,
3079
+ metadata: @config.metadata,
3080
+ retry_policy: @config.retry_policy
3081
+
3082
+ @security_center_stub.call_rpc :update_external_system, request, options: options do |response, operation|
3083
+ yield response, operation if block_given?
3084
+ return response
3085
+ end
3086
+ rescue ::GRPC::BadStatus => e
3087
+ raise ::Google::Cloud::Error.from_error(e)
3088
+ end
3089
+
2062
3090
  ##
2063
3091
  # Creates or updates a finding. The corresponding source must exist for a
2064
3092
  # finding creation to succeed.
@@ -2102,6 +3130,21 @@ module Google
2102
3130
  #
2103
3131
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2104
3132
  #
3133
+ # @example Basic example
3134
+ # require "google/cloud/security_center/v1"
3135
+ #
3136
+ # # Create a client object. The client can be reused for multiple calls.
3137
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3138
+ #
3139
+ # # Create a request. To set request fields, pass in keyword arguments.
3140
+ # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new
3141
+ #
3142
+ # # Call the update_finding method.
3143
+ # result = client.update_finding request
3144
+ #
3145
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding.
3146
+ # p result
3147
+ #
2105
3148
  def update_finding request, options = nil
2106
3149
  raise ::ArgumentError, "request must be provided" if request.nil?
2107
3150
 
@@ -2119,9 +3162,11 @@ module Google
2119
3162
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2120
3163
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2121
3164
 
2122
- header_params = {
2123
- "finding.name" => request.finding.name
2124
- }
3165
+ header_params = {}
3166
+ if request.finding&.name
3167
+ header_params["finding.name"] = request.finding.name
3168
+ end
3169
+
2125
3170
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2126
3171
  metadata[:"x-goog-request-params"] ||= request_params_header
2127
3172
 
@@ -2141,6 +3186,94 @@ module Google
2141
3186
  raise ::Google::Cloud::Error.from_error(e)
2142
3187
  end
2143
3188
 
3189
+ ##
3190
+ # Updates a mute config.
3191
+ #
3192
+ # @overload update_mute_config(request, options = nil)
3193
+ # Pass arguments to `update_mute_config` via a request object, either of type
3194
+ # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash.
3195
+ #
3196
+ # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash]
3197
+ # A request object representing the call parameters. Required. To specify no
3198
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3199
+ # @param options [::Gapic::CallOptions, ::Hash]
3200
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3201
+ #
3202
+ # @overload update_mute_config(mute_config: nil, update_mask: nil)
3203
+ # Pass arguments to `update_mute_config` via keyword arguments. Note that at
3204
+ # least one keyword argument is required. To specify no parameters, or to keep all
3205
+ # the default parameter values, pass an empty Hash as a request object (see above).
3206
+ #
3207
+ # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash]
3208
+ # Required. The mute config being updated.
3209
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3210
+ # The list of fields to be updated.
3211
+ # If empty all mutable fields will be updated.
3212
+ #
3213
+ # @yield [response, operation] Access the result along with the RPC operation
3214
+ # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig]
3215
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3216
+ #
3217
+ # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig]
3218
+ #
3219
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3220
+ #
3221
+ # @example Basic example
3222
+ # require "google/cloud/security_center/v1"
3223
+ #
3224
+ # # Create a client object. The client can be reused for multiple calls.
3225
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3226
+ #
3227
+ # # Create a request. To set request fields, pass in keyword arguments.
3228
+ # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new
3229
+ #
3230
+ # # Call the update_mute_config method.
3231
+ # result = client.update_mute_config request
3232
+ #
3233
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig.
3234
+ # p result
3235
+ #
3236
+ def update_mute_config request, options = nil
3237
+ raise ::ArgumentError, "request must be provided" if request.nil?
3238
+
3239
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest
3240
+
3241
+ # Converts hash and nil to an options object
3242
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3243
+
3244
+ # Customize the options with defaults
3245
+ metadata = @config.rpcs.update_mute_config.metadata.to_h
3246
+
3247
+ # Set x-goog-api-client and x-goog-user-project headers
3248
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3249
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3250
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
3251
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3252
+
3253
+ header_params = {}
3254
+ if request.mute_config&.name
3255
+ header_params["mute_config.name"] = request.mute_config.name
3256
+ end
3257
+
3258
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3259
+ metadata[:"x-goog-request-params"] ||= request_params_header
3260
+
3261
+ options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout,
3262
+ metadata: metadata,
3263
+ retry_policy: @config.rpcs.update_mute_config.retry_policy
3264
+
3265
+ options.apply_defaults timeout: @config.timeout,
3266
+ metadata: @config.metadata,
3267
+ retry_policy: @config.retry_policy
3268
+
3269
+ @security_center_stub.call_rpc :update_mute_config, request, options: options do |response, operation|
3270
+ yield response, operation if block_given?
3271
+ return response
3272
+ end
3273
+ rescue ::GRPC::BadStatus => e
3274
+ raise ::Google::Cloud::Error.from_error(e)
3275
+ end
3276
+
2144
3277
  ##
2145
3278
  # Updates a notification config. The following update
2146
3279
  # fields are allowed: description, pubsub_topic, streaming_config.filter
@@ -2175,6 +3308,21 @@ module Google
2175
3308
  #
2176
3309
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2177
3310
  #
3311
+ # @example Basic example
3312
+ # require "google/cloud/security_center/v1"
3313
+ #
3314
+ # # Create a client object. The client can be reused for multiple calls.
3315
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3316
+ #
3317
+ # # Create a request. To set request fields, pass in keyword arguments.
3318
+ # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new
3319
+ #
3320
+ # # Call the update_notification_config method.
3321
+ # result = client.update_notification_config request
3322
+ #
3323
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig.
3324
+ # p result
3325
+ #
2178
3326
  def update_notification_config request, options = nil
2179
3327
  raise ::ArgumentError, "request must be provided" if request.nil?
2180
3328
 
@@ -2192,9 +3340,11 @@ module Google
2192
3340
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2193
3341
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2194
3342
 
2195
- header_params = {
2196
- "notification_config.name" => request.notification_config.name
2197
- }
3343
+ header_params = {}
3344
+ if request.notification_config&.name
3345
+ header_params["notification_config.name"] = request.notification_config.name
3346
+ end
3347
+
2198
3348
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2199
3349
  metadata[:"x-goog-request-params"] ||= request_params_header
2200
3350
 
@@ -2247,6 +3397,21 @@ module Google
2247
3397
  #
2248
3398
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2249
3399
  #
3400
+ # @example Basic example
3401
+ # require "google/cloud/security_center/v1"
3402
+ #
3403
+ # # Create a client object. The client can be reused for multiple calls.
3404
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3405
+ #
3406
+ # # Create a request. To set request fields, pass in keyword arguments.
3407
+ # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new
3408
+ #
3409
+ # # Call the update_organization_settings method.
3410
+ # result = client.update_organization_settings request
3411
+ #
3412
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings.
3413
+ # p result
3414
+ #
2250
3415
  def update_organization_settings request, options = nil
2251
3416
  raise ::ArgumentError, "request must be provided" if request.nil?
2252
3417
 
@@ -2264,9 +3429,11 @@ module Google
2264
3429
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2265
3430
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2266
3431
 
2267
- header_params = {
2268
- "organization_settings.name" => request.organization_settings.name
2269
- }
3432
+ header_params = {}
3433
+ if request.organization_settings&.name
3434
+ header_params["organization_settings.name"] = request.organization_settings.name
3435
+ end
3436
+
2270
3437
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2271
3438
  metadata[:"x-goog-request-params"] ||= request_params_header
2272
3439
 
@@ -2319,6 +3486,21 @@ module Google
2319
3486
  #
2320
3487
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2321
3488
  #
3489
+ # @example Basic example
3490
+ # require "google/cloud/security_center/v1"
3491
+ #
3492
+ # # Create a client object. The client can be reused for multiple calls.
3493
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3494
+ #
3495
+ # # Create a request. To set request fields, pass in keyword arguments.
3496
+ # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new
3497
+ #
3498
+ # # Call the update_source method.
3499
+ # result = client.update_source request
3500
+ #
3501
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source.
3502
+ # p result
3503
+ #
2322
3504
  def update_source request, options = nil
2323
3505
  raise ::ArgumentError, "request must be provided" if request.nil?
2324
3506
 
@@ -2336,9 +3518,11 @@ module Google
2336
3518
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2337
3519
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2338
3520
 
2339
- header_params = {
2340
- "source.name" => request.source.name
2341
- }
3521
+ header_params = {}
3522
+ if request.source&.name
3523
+ header_params["source.name"] = request.source.name
3524
+ end
3525
+
2342
3526
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2343
3527
  metadata[:"x-goog-request-params"] ||= request_params_header
2344
3528
 
@@ -2397,6 +3581,21 @@ module Google
2397
3581
  #
2398
3582
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2399
3583
  #
3584
+ # @example Basic example
3585
+ # require "google/cloud/security_center/v1"
3586
+ #
3587
+ # # Create a client object. The client can be reused for multiple calls.
3588
+ # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
3589
+ #
3590
+ # # Create a request. To set request fields, pass in keyword arguments.
3591
+ # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new
3592
+ #
3593
+ # # Call the update_security_marks method.
3594
+ # result = client.update_security_marks request
3595
+ #
3596
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks.
3597
+ # p result
3598
+ #
2400
3599
  def update_security_marks request, options = nil
2401
3600
  raise ::ArgumentError, "request must be provided" if request.nil?
2402
3601
 
@@ -2414,9 +3613,11 @@ module Google
2414
3613
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2415
3614
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2416
3615
 
2417
- header_params = {
2418
- "security_marks.name" => request.security_marks.name
2419
- }
3616
+ header_params = {}
3617
+ if request.security_marks&.name
3618
+ header_params["security_marks.name"] = request.security_marks.name
3619
+ end
3620
+
2420
3621
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2421
3622
  metadata[:"x-goog-request-params"] ||= request_params_header
2422
3623
 
@@ -2452,17 +3653,17 @@ module Google
2452
3653
  # @example
2453
3654
  #
2454
3655
  # # Modify the global config, setting the timeout for
2455
- # # create_source to 20 seconds,
3656
+ # # bulk_mute_findings to 20 seconds,
2456
3657
  # # and all remaining timeouts to 10 seconds.
2457
3658
  # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config|
2458
3659
  # config.timeout = 10.0
2459
- # config.rpcs.create_source.timeout = 20.0
3660
+ # config.rpcs.bulk_mute_findings.timeout = 20.0
2460
3661
  # end
2461
3662
  #
2462
3663
  # # Apply the above configuration only to a new client.
2463
3664
  # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config|
2464
3665
  # config.timeout = 10.0
2465
- # config.rpcs.create_source.timeout = 20.0
3666
+ # config.rpcs.bulk_mute_findings.timeout = 20.0
2466
3667
  # end
2467
3668
  #
2468
3669
  # @!attribute [rw] endpoint
@@ -2571,6 +3772,11 @@ module Google
2571
3772
  # trigger a retry.
2572
3773
  #
2573
3774
  class Rpcs
3775
+ ##
3776
+ # RPC-specific configuration for `bulk_mute_findings`
3777
+ # @return [::Gapic::Config::Method]
3778
+ #
3779
+ attr_reader :bulk_mute_findings
2574
3780
  ##
2575
3781
  # RPC-specific configuration for `create_source`
2576
3782
  # @return [::Gapic::Config::Method]
@@ -2582,11 +3788,21 @@ module Google
2582
3788
  #
2583
3789
  attr_reader :create_finding
2584
3790
  ##
3791
+ # RPC-specific configuration for `create_mute_config`
3792
+ # @return [::Gapic::Config::Method]
3793
+ #
3794
+ attr_reader :create_mute_config
3795
+ ##
2585
3796
  # RPC-specific configuration for `create_notification_config`
2586
3797
  # @return [::Gapic::Config::Method]
2587
3798
  #
2588
3799
  attr_reader :create_notification_config
2589
3800
  ##
3801
+ # RPC-specific configuration for `delete_mute_config`
3802
+ # @return [::Gapic::Config::Method]
3803
+ #
3804
+ attr_reader :delete_mute_config
3805
+ ##
2590
3806
  # RPC-specific configuration for `delete_notification_config`
2591
3807
  # @return [::Gapic::Config::Method]
2592
3808
  #
@@ -2597,6 +3813,11 @@ module Google
2597
3813
  #
2598
3814
  attr_reader :get_iam_policy
2599
3815
  ##
3816
+ # RPC-specific configuration for `get_mute_config`
3817
+ # @return [::Gapic::Config::Method]
3818
+ #
3819
+ attr_reader :get_mute_config
3820
+ ##
2600
3821
  # RPC-specific configuration for `get_notification_config`
2601
3822
  # @return [::Gapic::Config::Method]
2602
3823
  #
@@ -2632,6 +3853,11 @@ module Google
2632
3853
  #
2633
3854
  attr_reader :list_findings
2634
3855
  ##
3856
+ # RPC-specific configuration for `list_mute_configs`
3857
+ # @return [::Gapic::Config::Method]
3858
+ #
3859
+ attr_reader :list_mute_configs
3860
+ ##
2635
3861
  # RPC-specific configuration for `list_notification_configs`
2636
3862
  # @return [::Gapic::Config::Method]
2637
3863
  #
@@ -2652,6 +3878,11 @@ module Google
2652
3878
  #
2653
3879
  attr_reader :set_finding_state
2654
3880
  ##
3881
+ # RPC-specific configuration for `set_mute`
3882
+ # @return [::Gapic::Config::Method]
3883
+ #
3884
+ attr_reader :set_mute
3885
+ ##
2655
3886
  # RPC-specific configuration for `set_iam_policy`
2656
3887
  # @return [::Gapic::Config::Method]
2657
3888
  #
@@ -2662,11 +3893,21 @@ module Google
2662
3893
  #
2663
3894
  attr_reader :test_iam_permissions
2664
3895
  ##
3896
+ # RPC-specific configuration for `update_external_system`
3897
+ # @return [::Gapic::Config::Method]
3898
+ #
3899
+ attr_reader :update_external_system
3900
+ ##
2665
3901
  # RPC-specific configuration for `update_finding`
2666
3902
  # @return [::Gapic::Config::Method]
2667
3903
  #
2668
3904
  attr_reader :update_finding
2669
3905
  ##
3906
+ # RPC-specific configuration for `update_mute_config`
3907
+ # @return [::Gapic::Config::Method]
3908
+ #
3909
+ attr_reader :update_mute_config
3910
+ ##
2670
3911
  # RPC-specific configuration for `update_notification_config`
2671
3912
  # @return [::Gapic::Config::Method]
2672
3913
  #
@@ -2689,16 +3930,24 @@ module Google
2689
3930
 
2690
3931
  # @private
2691
3932
  def initialize parent_rpcs = nil
3933
+ bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings
3934
+ @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config
2692
3935
  create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source
2693
3936
  @create_source = ::Gapic::Config::Method.new create_source_config
2694
3937
  create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding
2695
3938
  @create_finding = ::Gapic::Config::Method.new create_finding_config
3939
+ create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config
3940
+ @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config
2696
3941
  create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config
2697
3942
  @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config
3943
+ delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config
3944
+ @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config
2698
3945
  delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
2699
3946
  @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
2700
3947
  get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
2701
3948
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
3949
+ get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config
3950
+ @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config
2702
3951
  get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config
2703
3952
  @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config
2704
3953
  get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings
@@ -2713,6 +3962,8 @@ module Google
2713
3962
  @list_assets = ::Gapic::Config::Method.new list_assets_config
2714
3963
  list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings
2715
3964
  @list_findings = ::Gapic::Config::Method.new list_findings_config
3965
+ list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs
3966
+ @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config
2716
3967
  list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs
2717
3968
  @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config
2718
3969
  list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources
@@ -2721,12 +3972,18 @@ module Google
2721
3972
  @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config
2722
3973
  set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state
2723
3974
  @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config
3975
+ set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute
3976
+ @set_mute = ::Gapic::Config::Method.new set_mute_config
2724
3977
  set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
2725
3978
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
2726
3979
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
2727
3980
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
3981
+ update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system
3982
+ @update_external_system = ::Gapic::Config::Method.new update_external_system_config
2728
3983
  update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding
2729
3984
  @update_finding = ::Gapic::Config::Method.new update_finding_config
3985
+ update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config
3986
+ @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config
2730
3987
  update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config
2731
3988
  @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config
2732
3989
  update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings