google-cloud-security_center-v1 0.9.1 → 0.12.0

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
  #
@@ -418,6 +540,100 @@ module Google
418
540
  raise ::Google::Cloud::Error.from_error(e)
419
541
  end
420
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
+
421
637
  ##
422
638
  # Creates a notification config.
423
639
  #
@@ -512,6 +728,94 @@ module Google
512
728
  raise ::Google::Cloud::Error.from_error(e)
513
729
  end
514
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
+
515
819
  ##
516
820
  # Deletes a notification config.
517
821
  #
@@ -687,6 +991,94 @@ module Google
687
991
  raise ::Google::Cloud::Error.from_error(e)
688
992
  end
689
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
+
690
1082
  ##
691
1083
  # Gets a notification config.
692
1084
  #
@@ -1697,6 +2089,7 @@ module Google
1697
2089
  # * resource.project_display_name: `=`, `:`
1698
2090
  # * resource.type: `=`, `:`
1699
2091
  # * resource.folders.resource_folder: `=`, `:`
2092
+ # * resource.display_name: `=`, `:`
1700
2093
  # @param order_by [::String]
1701
2094
  # Expression that defines what fields and order to use for sorting. The
1702
2095
  # string value should follow SQL syntax: comma separated list of fields. For
@@ -1749,25 +2142,130 @@ module Google
1749
2142
  # filter at the start of compare_duration, but did not match
1750
2143
  # the filter at read_time.
1751
2144
  #
1752
- # If compare_duration is not specified, then the only possible state_change
1753
- # is "UNUSED", which will be the state_change set for all findings present at
1754
- # read_time.
1755
- # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
1756
- # A field mask to specify the Finding fields to be listed in the response.
1757
- # An empty field mask will list all fields.
1758
- # @param page_token [::String]
1759
- # The value returned by the last `ListFindingsResponse`; indicates
1760
- # that this is a continuation of a prior `ListFindings` call, and
1761
- # that the system should return the next page of data.
2145
+ # If compare_duration is not specified, then the only possible state_change
2146
+ # is "UNUSED", which will be the state_change set for all findings present at
2147
+ # read_time.
2148
+ # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
2149
+ # A field mask to specify the Finding fields to be listed in the response.
2150
+ # An empty field mask will list all fields.
2151
+ # @param page_token [::String]
2152
+ # The value returned by the last `ListFindingsResponse`; indicates
2153
+ # that this is a continuation of a prior `ListFindings` call, and
2154
+ # that the system should return the next page of data.
2155
+ # @param page_size [::Integer]
2156
+ # The maximum number of results to return in a single response. Default is
2157
+ # 10, minimum is 1, maximum is 1000.
2158
+ #
2159
+ # @yield [response, operation] Access the result along with the RPC operation
2160
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>]
2161
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2162
+ #
2163
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>]
2164
+ #
2165
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
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
+ #
2188
+ def list_findings request, options = nil
2189
+ raise ::ArgumentError, "request must be provided" if request.nil?
2190
+
2191
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest
2192
+
2193
+ # Converts hash and nil to an options object
2194
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2195
+
2196
+ # Customize the options with defaults
2197
+ metadata = @config.rpcs.list_findings.metadata.to_h
2198
+
2199
+ # Set x-goog-api-client and x-goog-user-project headers
2200
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2201
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2202
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2203
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2204
+
2205
+ header_params = {}
2206
+ if request.parent
2207
+ header_params["parent"] = request.parent
2208
+ end
2209
+
2210
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2211
+ metadata[:"x-goog-request-params"] ||= request_params_header
2212
+
2213
+ options.apply_defaults timeout: @config.rpcs.list_findings.timeout,
2214
+ metadata: metadata,
2215
+ retry_policy: @config.rpcs.list_findings.retry_policy
2216
+
2217
+ options.apply_defaults timeout: @config.timeout,
2218
+ metadata: @config.metadata,
2219
+ retry_policy: @config.retry_policy
2220
+
2221
+ @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation|
2222
+ response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options
2223
+ yield response, operation if block_given?
2224
+ return response
2225
+ end
2226
+ rescue ::GRPC::BadStatus => e
2227
+ raise ::Google::Cloud::Error.from_error(e)
2228
+ end
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]".
1762
2252
  # @param page_size [::Integer]
1763
- # The maximum number of results to return in a single response. Default is
1764
- # 10, minimum is 1, maximum is 1000.
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.
1765
2263
  #
1766
2264
  # @yield [response, operation] Access the result along with the RPC operation
1767
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>]
2265
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>]
1768
2266
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1769
2267
  #
1770
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>]
2268
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>]
1771
2269
  #
1772
2270
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1773
2271
  #
@@ -1778,30 +2276,30 @@ module Google
1778
2276
  # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new
1779
2277
  #
1780
2278
  # # Create a request. To set request fields, pass in keyword arguments.
1781
- # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new
2279
+ # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new
1782
2280
  #
1783
- # # Call the list_findings method.
1784
- # result = client.list_findings request
2281
+ # # Call the list_mute_configs method.
2282
+ # result = client.list_mute_configs request
1785
2283
  #
1786
2284
  # # The returned object is of type Gapic::PagedEnumerable. You can
1787
2285
  # # iterate over all elements by calling #each, and the enumerable
1788
2286
  # # will lazily make API calls to fetch subsequent pages. Other
1789
2287
  # # methods are also available for managing paging directly.
1790
2288
  # result.each do |response|
1791
- # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult.
2289
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig.
1792
2290
  # p response
1793
2291
  # end
1794
2292
  #
1795
- def list_findings request, options = nil
2293
+ def list_mute_configs request, options = nil
1796
2294
  raise ::ArgumentError, "request must be provided" if request.nil?
1797
2295
 
1798
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest
2296
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest
1799
2297
 
1800
2298
  # Converts hash and nil to an options object
1801
2299
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1802
2300
 
1803
2301
  # Customize the options with defaults
1804
- metadata = @config.rpcs.list_findings.metadata.to_h
2302
+ metadata = @config.rpcs.list_mute_configs.metadata.to_h
1805
2303
 
1806
2304
  # Set x-goog-api-client and x-goog-user-project headers
1807
2305
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1817,16 +2315,16 @@ module Google
1817
2315
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1818
2316
  metadata[:"x-goog-request-params"] ||= request_params_header
1819
2317
 
1820
- options.apply_defaults timeout: @config.rpcs.list_findings.timeout,
2318
+ options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout,
1821
2319
  metadata: metadata,
1822
- retry_policy: @config.rpcs.list_findings.retry_policy
2320
+ retry_policy: @config.rpcs.list_mute_configs.retry_policy
1823
2321
 
1824
2322
  options.apply_defaults timeout: @config.timeout,
1825
2323
  metadata: @config.metadata,
1826
2324
  retry_policy: @config.retry_policy
1827
2325
 
1828
- @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation|
1829
- response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options
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
1830
2328
  yield response, operation if block_given?
1831
2329
  return response
1832
2330
  end
@@ -2226,6 +2724,98 @@ module Google
2226
2724
  raise ::Google::Cloud::Error.from_error(e)
2227
2725
  end
2228
2726
 
2727
+ ##
2728
+ # Updates the mute state of a finding.
2729
+ #
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.
2733
+ #
2734
+ # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash]
2735
+ # A request object representing the call parameters. Required. To specify no
2736
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2737
+ # @param options [::Gapic::CallOptions, ::Hash]
2738
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2739
+ #
2740
+ # @overload set_mute(name: nil, mute: nil)
2741
+ # Pass arguments to `set_mute` via keyword arguments. Note that at
2742
+ # least one keyword argument is required. To specify no parameters, or to keep all
2743
+ # the default parameter values, pass an empty Hash as a request object (see above).
2744
+ #
2745
+ # @param name [::String]
2746
+ # Required. The relative resource name of the finding. See:
2747
+ # https://cloud.google.com/apis/design/resource_names#relative_resource_name
2748
+ # Example:
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.
2754
+ #
2755
+ # @yield [response, operation] Access the result along with the RPC operation
2756
+ # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding]
2757
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2758
+ #
2759
+ # @return [::Google::Cloud::SecurityCenter::V1::Finding]
2760
+ #
2761
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2762
+ #
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
2779
+ raise ::ArgumentError, "request must be provided" if request.nil?
2780
+
2781
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest
2782
+
2783
+ # Converts hash and nil to an options object
2784
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2785
+
2786
+ # Customize the options with defaults
2787
+ metadata = @config.rpcs.set_mute.metadata.to_h
2788
+
2789
+ # Set x-goog-api-client and x-goog-user-project headers
2790
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2791
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2792
+ gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
2793
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2794
+
2795
+ header_params = {}
2796
+ if request.name
2797
+ header_params["name"] = request.name
2798
+ end
2799
+
2800
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2801
+ metadata[:"x-goog-request-params"] ||= request_params_header
2802
+
2803
+ options.apply_defaults timeout: @config.rpcs.set_mute.timeout,
2804
+ metadata: metadata,
2805
+ retry_policy: @config.rpcs.set_mute.retry_policy
2806
+
2807
+ options.apply_defaults timeout: @config.timeout,
2808
+ metadata: @config.metadata,
2809
+ retry_policy: @config.retry_policy
2810
+
2811
+ @security_center_stub.call_rpc :set_mute, request, options: options do |response, operation|
2812
+ yield response, operation if block_given?
2813
+ return response
2814
+ end
2815
+ rescue ::GRPC::BadStatus => e
2816
+ raise ::Google::Cloud::Error.from_error(e)
2817
+ end
2818
+
2229
2819
  ##
2230
2820
  # Sets the access control policy on the specified Source.
2231
2821
  #
@@ -2408,6 +2998,95 @@ module Google
2408
2998
  raise ::Google::Cloud::Error.from_error(e)
2409
2999
  end
2410
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
+
2411
3090
  ##
2412
3091
  # Creates or updates a finding. The corresponding source must exist for a
2413
3092
  # finding creation to succeed.
@@ -2507,6 +3186,94 @@ module Google
2507
3186
  raise ::Google::Cloud::Error.from_error(e)
2508
3187
  end
2509
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
+
2510
3277
  ##
2511
3278
  # Updates a notification config. The following update
2512
3279
  # fields are allowed: description, pubsub_topic, streaming_config.filter
@@ -2804,7 +3571,8 @@ module Google
2804
3571
  # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
2805
3572
  # The time at which the updated SecurityMarks take effect.
2806
3573
  # If not set uses current server time. Updates will be applied to the
2807
- # SecurityMarks that are active immediately preceding this time.
3574
+ # SecurityMarks that are active immediately preceding this time. Must be
3575
+ # smaller or equal to the server time.
2808
3576
  #
2809
3577
  # @yield [response, operation] Access the result along with the RPC operation
2810
3578
  # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityMarks]
@@ -2886,17 +3654,17 @@ module Google
2886
3654
  # @example
2887
3655
  #
2888
3656
  # # Modify the global config, setting the timeout for
2889
- # # create_source to 20 seconds,
3657
+ # # bulk_mute_findings to 20 seconds,
2890
3658
  # # and all remaining timeouts to 10 seconds.
2891
3659
  # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config|
2892
3660
  # config.timeout = 10.0
2893
- # config.rpcs.create_source.timeout = 20.0
3661
+ # config.rpcs.bulk_mute_findings.timeout = 20.0
2894
3662
  # end
2895
3663
  #
2896
3664
  # # Apply the above configuration only to a new client.
2897
3665
  # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config|
2898
3666
  # config.timeout = 10.0
2899
- # config.rpcs.create_source.timeout = 20.0
3667
+ # config.rpcs.bulk_mute_findings.timeout = 20.0
2900
3668
  # end
2901
3669
  #
2902
3670
  # @!attribute [rw] endpoint
@@ -3005,6 +3773,11 @@ module Google
3005
3773
  # trigger a retry.
3006
3774
  #
3007
3775
  class Rpcs
3776
+ ##
3777
+ # RPC-specific configuration for `bulk_mute_findings`
3778
+ # @return [::Gapic::Config::Method]
3779
+ #
3780
+ attr_reader :bulk_mute_findings
3008
3781
  ##
3009
3782
  # RPC-specific configuration for `create_source`
3010
3783
  # @return [::Gapic::Config::Method]
@@ -3016,11 +3789,21 @@ module Google
3016
3789
  #
3017
3790
  attr_reader :create_finding
3018
3791
  ##
3792
+ # RPC-specific configuration for `create_mute_config`
3793
+ # @return [::Gapic::Config::Method]
3794
+ #
3795
+ attr_reader :create_mute_config
3796
+ ##
3019
3797
  # RPC-specific configuration for `create_notification_config`
3020
3798
  # @return [::Gapic::Config::Method]
3021
3799
  #
3022
3800
  attr_reader :create_notification_config
3023
3801
  ##
3802
+ # RPC-specific configuration for `delete_mute_config`
3803
+ # @return [::Gapic::Config::Method]
3804
+ #
3805
+ attr_reader :delete_mute_config
3806
+ ##
3024
3807
  # RPC-specific configuration for `delete_notification_config`
3025
3808
  # @return [::Gapic::Config::Method]
3026
3809
  #
@@ -3031,6 +3814,11 @@ module Google
3031
3814
  #
3032
3815
  attr_reader :get_iam_policy
3033
3816
  ##
3817
+ # RPC-specific configuration for `get_mute_config`
3818
+ # @return [::Gapic::Config::Method]
3819
+ #
3820
+ attr_reader :get_mute_config
3821
+ ##
3034
3822
  # RPC-specific configuration for `get_notification_config`
3035
3823
  # @return [::Gapic::Config::Method]
3036
3824
  #
@@ -3066,6 +3854,11 @@ module Google
3066
3854
  #
3067
3855
  attr_reader :list_findings
3068
3856
  ##
3857
+ # RPC-specific configuration for `list_mute_configs`
3858
+ # @return [::Gapic::Config::Method]
3859
+ #
3860
+ attr_reader :list_mute_configs
3861
+ ##
3069
3862
  # RPC-specific configuration for `list_notification_configs`
3070
3863
  # @return [::Gapic::Config::Method]
3071
3864
  #
@@ -3086,6 +3879,11 @@ module Google
3086
3879
  #
3087
3880
  attr_reader :set_finding_state
3088
3881
  ##
3882
+ # RPC-specific configuration for `set_mute`
3883
+ # @return [::Gapic::Config::Method]
3884
+ #
3885
+ attr_reader :set_mute
3886
+ ##
3089
3887
  # RPC-specific configuration for `set_iam_policy`
3090
3888
  # @return [::Gapic::Config::Method]
3091
3889
  #
@@ -3096,11 +3894,21 @@ module Google
3096
3894
  #
3097
3895
  attr_reader :test_iam_permissions
3098
3896
  ##
3897
+ # RPC-specific configuration for `update_external_system`
3898
+ # @return [::Gapic::Config::Method]
3899
+ #
3900
+ attr_reader :update_external_system
3901
+ ##
3099
3902
  # RPC-specific configuration for `update_finding`
3100
3903
  # @return [::Gapic::Config::Method]
3101
3904
  #
3102
3905
  attr_reader :update_finding
3103
3906
  ##
3907
+ # RPC-specific configuration for `update_mute_config`
3908
+ # @return [::Gapic::Config::Method]
3909
+ #
3910
+ attr_reader :update_mute_config
3911
+ ##
3104
3912
  # RPC-specific configuration for `update_notification_config`
3105
3913
  # @return [::Gapic::Config::Method]
3106
3914
  #
@@ -3123,16 +3931,24 @@ module Google
3123
3931
 
3124
3932
  # @private
3125
3933
  def initialize parent_rpcs = nil
3934
+ bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings
3935
+ @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config
3126
3936
  create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source
3127
3937
  @create_source = ::Gapic::Config::Method.new create_source_config
3128
3938
  create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding
3129
3939
  @create_finding = ::Gapic::Config::Method.new create_finding_config
3940
+ create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config
3941
+ @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config
3130
3942
  create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config
3131
3943
  @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config
3944
+ delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config
3945
+ @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config
3132
3946
  delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
3133
3947
  @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
3134
3948
  get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
3135
3949
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
3950
+ get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config
3951
+ @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config
3136
3952
  get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config
3137
3953
  @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config
3138
3954
  get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings
@@ -3147,6 +3963,8 @@ module Google
3147
3963
  @list_assets = ::Gapic::Config::Method.new list_assets_config
3148
3964
  list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings
3149
3965
  @list_findings = ::Gapic::Config::Method.new list_findings_config
3966
+ list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs
3967
+ @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config
3150
3968
  list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs
3151
3969
  @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config
3152
3970
  list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources
@@ -3155,12 +3973,18 @@ module Google
3155
3973
  @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config
3156
3974
  set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state
3157
3975
  @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config
3976
+ set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute
3977
+ @set_mute = ::Gapic::Config::Method.new set_mute_config
3158
3978
  set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
3159
3979
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
3160
3980
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
3161
3981
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
3982
+ update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system
3983
+ @update_external_system = ::Gapic::Config::Method.new update_external_system_config
3162
3984
  update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding
3163
3985
  @update_finding = ::Gapic::Config::Method.new update_finding_config
3986
+ update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config
3987
+ @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config
3164
3988
  update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config
3165
3989
  @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config
3166
3990
  update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings