google-cloud-security_center_management-v1 1.0.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -223,15 +223,27 @@ module Google
223
223
  endpoint: @config.endpoint,
224
224
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
225
225
  universe_domain: @config.universe_domain,
226
- credentials: credentials
226
+ credentials: credentials,
227
+ logger: @config.logger
227
228
  )
228
229
 
230
+ @security_center_management_stub.logger(stub: true)&.info do |entry|
231
+ entry.set_system_name
232
+ entry.set_service
233
+ entry.message = "Created client for #{entry.service}"
234
+ entry.set_credentials_fields credentials
235
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
236
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
237
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
238
+ end
239
+
229
240
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
230
241
  config.credentials = credentials
231
242
  config.quota_project = @quota_project_id
232
243
  config.endpoint = @security_center_management_stub.endpoint
233
244
  config.universe_domain = @security_center_management_stub.universe_domain
234
245
  config.bindings_override = @config.bindings_override
246
+ config.logger = @security_center_management_stub.logger if config.respond_to? :logger=
235
247
  end
236
248
  end
237
249
 
@@ -242,13 +254,23 @@ module Google
242
254
  #
243
255
  attr_reader :location_client
244
256
 
257
+ ##
258
+ # The logger used for request/response debug logging.
259
+ #
260
+ # @return [Logger]
261
+ #
262
+ def logger
263
+ @security_center_management_stub.logger
264
+ end
265
+
245
266
  # Service calls
246
267
 
247
268
  ##
248
- # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the
249
- # given parent. This includes resident modules defined at the scope of the
250
- # parent, and inherited modules, inherited from CRM ancestors (no
251
- # descendants).
269
+ # Returns a list of all
270
+ # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule}
271
+ # resources for the given parent. This includes resident modules defined at
272
+ # the scope of the parent, and inherited modules, inherited from ancestor
273
+ # organizations, folders, and projects (no descendants).
252
274
  #
253
275
  # @overload list_effective_security_health_analytics_custom_modules(request, options = nil)
254
276
  # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type
@@ -266,17 +288,21 @@ module Google
266
288
  # the default parameter values, pass an empty Hash as a request object (see above).
267
289
  #
268
290
  # @param parent [::String]
269
- # Required. Name of parent to list effective custom modules. specified in one
270
- # of the following formats:
291
+ # Required. Name of parent to list effective custom modules, in one of the
292
+ # following formats:
293
+ #
271
294
  # * `organizations/{organization}/locations/{location}`
272
295
  # * `folders/{folder}/locations/{location}`
273
- # or
274
- # `projects/{project}/locations/{location}`
296
+ # * `projects/{project}/locations/{location}`
275
297
  # @param page_size [::Integer]
276
298
  # Optional. The maximum number of results to return in a single response.
277
299
  # Default is 10, minimum is 1, maximum is 1000.
278
300
  # @param page_token [::String]
279
- # Optional. The value returned by the last call indicating a continuation.
301
+ # Optional. A pagination token returned from a previous request. Provide this
302
+ # token to retrieve the next page of results.
303
+ #
304
+ # When paginating, the rest of the request must match the request that
305
+ # generated the page token.
280
306
  # @yield [result, operation] Access the result along with the TransportOperation object
281
307
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>]
282
308
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -335,14 +361,15 @@ module Google
335
361
  @security_center_management_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation|
336
362
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options
337
363
  yield result, operation if block_given?
338
- return result
364
+ throw :response, result
339
365
  end
340
366
  rescue ::Gapic::Rest::Error => e
341
367
  raise ::Google::Cloud::Error.from_error(e)
342
368
  end
343
369
 
344
370
  ##
345
- # Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule.
371
+ # Gets details of a single
372
+ # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule}.
346
373
  #
347
374
  # @overload get_effective_security_health_analytics_custom_module(request, options = nil)
348
375
  # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type
@@ -363,9 +390,9 @@ module Google
363
390
  # Required. The full resource name of the custom module, specified in one of
364
391
  # the following formats:
365
392
  #
366
- # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}`
367
- # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}`
368
- # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}`
393
+ # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
394
+ # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
395
+ # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
369
396
  # @yield [result, operation] Access the result along with the TransportOperation object
370
397
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule]
371
398
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -419,16 +446,17 @@ module Google
419
446
 
420
447
  @security_center_management_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation|
421
448
  yield result, operation if block_given?
422
- return result
423
449
  end
424
450
  rescue ::Gapic::Rest::Error => e
425
451
  raise ::Google::Cloud::Error.from_error(e)
426
452
  end
427
453
 
428
454
  ##
429
- # Returns a list of all SecurityHealthAnalyticsCustomModules for the given
430
- # parent. This includes resident modules defined at the scope of the parent,
431
- # and inherited modules, inherited from CRM ancestors (no descendants).
455
+ # Returns a list of all
456
+ # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}
457
+ # resources for the given parent. This includes resident modules defined at
458
+ # the scope of the parent, and inherited modules, inherited from ancestor
459
+ # organizations, folders, and projects (no descendants).
432
460
  #
433
461
  # @overload list_security_health_analytics_custom_modules(request, options = nil)
434
462
  # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type
@@ -446,8 +474,8 @@ module Google
446
474
  # the default parameter values, pass an empty Hash as a request object (see above).
447
475
  #
448
476
  # @param parent [::String]
449
- # Required. Name of parent organization, folder, or project in which to list
450
- # custom modules, specified in one of the following formats:
477
+ # Required. Name of the parent organization, folder, or project in which to
478
+ # list custom modules, in one of the following formats:
451
479
  #
452
480
  # * `organizations/{organization}/locations/{location}`
453
481
  # * `folders/{folder}/locations/{location}`
@@ -456,7 +484,11 @@ module Google
456
484
  # Optional. The maximum number of results to return in a single response.
457
485
  # Default is 10, minimum is 1, maximum is 1000.
458
486
  # @param page_token [::String]
459
- # Optional. A token identifying a page of results the server should return.
487
+ # Optional. A pagination token returned from a previous request. Provide this
488
+ # token to retrieve the next page of results.
489
+ #
490
+ # When paginating, the rest of the request must match the request that
491
+ # generated the page token.
460
492
  # @yield [result, operation] Access the result along with the TransportOperation object
461
493
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>]
462
494
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -515,15 +547,17 @@ module Google
515
547
  @security_center_management_stub.list_security_health_analytics_custom_modules request, options do |result, operation|
516
548
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options
517
549
  yield result, operation if block_given?
518
- return result
550
+ throw :response, result
519
551
  end
520
552
  rescue ::Gapic::Rest::Error => e
521
553
  raise ::Google::Cloud::Error.from_error(e)
522
554
  end
523
555
 
524
556
  ##
525
- # Returns a list of all resident SecurityHealthAnalyticsCustomModules under
526
- # the given CRM parent and all of the parent's CRM descendants.
557
+ # Returns a list of all resident
558
+ # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}
559
+ # resources under the given organization, folder, or project and all of its
560
+ # descendants.
527
561
  #
528
562
  # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil)
529
563
  # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type
@@ -542,7 +576,7 @@ module Google
542
576
  #
543
577
  # @param parent [::String]
544
578
  # Required. Name of the parent organization, folder, or project in which to
545
- # list custom modules, specified in one of the following formats:
579
+ # list custom modules, in one of the following formats:
546
580
  #
547
581
  # * `organizations/{organization}/locations/{location}`
548
582
  # * `folders/{folder}/locations/{location}`
@@ -551,7 +585,11 @@ module Google
551
585
  # Optional. The maximum number of results to return in a single response.
552
586
  # Default is 10, minimum is 1, maximum is 1000.
553
587
  # @param page_token [::String]
554
- # Optional. A token identifying a page of results the server should return.
588
+ # Optional. A pagination token returned from a previous request. Provide this
589
+ # token to retrieve the next page of results.
590
+ #
591
+ # When paginating, the rest of the request must match the request that
592
+ # generated the page token.
555
593
  # @yield [result, operation] Access the result along with the TransportOperation object
556
594
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>]
557
595
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -610,14 +648,15 @@ module Google
610
648
  @security_center_management_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation|
611
649
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options
612
650
  yield result, operation if block_given?
613
- return result
651
+ throw :response, result
614
652
  end
615
653
  rescue ::Gapic::Rest::Error => e
616
654
  raise ::Google::Cloud::Error.from_error(e)
617
655
  end
618
656
 
619
657
  ##
620
- # Retrieves a SecurityHealthAnalyticsCustomModule.
658
+ # Retrieves a
659
+ # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}.
621
660
  #
622
661
  # @overload get_security_health_analytics_custom_module(request, options = nil)
623
662
  # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type
@@ -635,7 +674,8 @@ module Google
635
674
  # the default parameter values, pass an empty Hash as a request object (see above).
636
675
  #
637
676
  # @param name [::String]
638
- # Required. Name of the resource
677
+ # Required. Name of the resource, in the format
678
+ # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`.
639
679
  # @yield [result, operation] Access the result along with the TransportOperation object
640
680
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
641
681
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -689,17 +729,18 @@ module Google
689
729
 
690
730
  @security_center_management_stub.get_security_health_analytics_custom_module request, options do |result, operation|
691
731
  yield result, operation if block_given?
692
- return result
693
732
  end
694
733
  rescue ::Gapic::Rest::Error => e
695
734
  raise ::Google::Cloud::Error.from_error(e)
696
735
  end
697
736
 
698
737
  ##
699
- # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the
700
- # given CRM parent, and also creates inherited
701
- # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given
702
- # parent. These modules are enabled by default.
738
+ # Creates a resident
739
+ # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}
740
+ # at the scope of the given organization, folder, or project, and also
741
+ # creates inherited `SecurityHealthAnalyticsCustomModule` resources for all
742
+ # folders and projects that are descendants of the given parent. These
743
+ # modules are enabled by default.
703
744
  #
704
745
  # @overload create_security_health_analytics_custom_module(request, options = nil)
705
746
  # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type
@@ -718,22 +759,27 @@ module Google
718
759
  #
719
760
  # @param parent [::String]
720
761
  # Required. Name of the parent organization, folder, or project of the
721
- # module, specified in one of the following formats:
762
+ # module, in one of the following formats:
722
763
  #
723
764
  # * `organizations/{organization}/locations/{location}`
724
765
  # * `folders/{folder}/locations/{location}`
725
766
  # * `projects/{project}/locations/{location}`
726
767
  # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
727
- # Required. The resource being created
768
+ # Required. The resource being created.
728
769
  # @param validate_only [::Boolean]
729
- # Optional. When set to true, only validations (including IAM checks) will
730
- # done for the request (no module will be created). An OK response indicates
731
- # the request is valid while an error response indicates the request is
732
- # invalid. Note that a subsequent request to actually create the module could
733
- # still fail because:
734
- # 1. the state could have changed (e.g. IAM permission lost) or
735
- # 2. A failure occurred during creation of the module.
736
- # Defaults to false.
770
+ # Optional. When set to `true`, the request will be validated (including IAM
771
+ # checks), but no module will be created. An `OK` response indicates that the
772
+ # request is valid, while an error response indicates that the request is
773
+ # invalid.
774
+ #
775
+ # If the request is valid, a subsequent request to create the module could
776
+ # still fail for one of the following reasons:
777
+ #
778
+ # * The state of your cloud resources changed; for example, you lost a
779
+ # required IAM permission
780
+ # * An error occurred during creation of the module
781
+ #
782
+ # Defaults to `false`.
737
783
  # @yield [result, operation] Access the result along with the TransportOperation object
738
784
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
739
785
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -787,18 +833,19 @@ module Google
787
833
 
788
834
  @security_center_management_stub.create_security_health_analytics_custom_module request, options do |result, operation|
789
835
  yield result, operation if block_given?
790
- return result
791
836
  end
792
837
  rescue ::Gapic::Rest::Error => e
793
838
  raise ::Google::Cloud::Error.from_error(e)
794
839
  end
795
840
 
796
841
  ##
797
- # Updates the SecurityHealthAnalyticsCustomModule under the given name based
798
- # on the given update mask. Updating the enablement state is supported on
799
- # both resident and inherited modules (though resident modules cannot have an
800
- # enablement state of "inherited"). Updating the display name and custom
801
- # config of a module is supported on resident modules only.
842
+ # Updates the
843
+ # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}
844
+ # under the given name based on the given update mask. Updating the
845
+ # enablement state is supported on both resident and inherited modules
846
+ # (though resident modules cannot have an enablement state of "inherited").
847
+ # Updating the display name and custom configuration of a module is supported
848
+ # on resident modules only.
802
849
  #
803
850
  # @overload update_security_health_analytics_custom_module(request, options = nil)
804
851
  # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type
@@ -816,20 +863,29 @@ module Google
816
863
  # the default parameter values, pass an empty Hash as a request object (see above).
817
864
  #
818
865
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
819
- # Required. The list of fields to be updated. The only fields that can be
820
- # updated are `enablement_state` and `custom_config`. If empty or set to the
821
- # wildcard value `*`, both `enablement_state` and `custom_config` are
822
- # updated.
866
+ # Required. The fields to update. The following values are valid:
867
+ #
868
+ # * `custom_config`
869
+ # * `enablement_state`
870
+ #
871
+ # If you omit this field or set it to the wildcard value `*`, then all
872
+ # eligible fields are updated.
823
873
  # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash]
824
- # Required. The resource being updated
874
+ # Required. The resource being updated.
825
875
  # @param validate_only [::Boolean]
826
- # Optional. When set to true, only validations (including IAM checks) will
827
- # done for the request (module will not be updated). An OK response indicates
828
- # the request is valid while an error response indicates the request is
829
- # invalid. Note that a subsequent request to actually update the module could
830
- # still fail because 1. the state could have changed (e.g. IAM permission
831
- # lost) or
832
- # 2. A failure occurred while trying to update the module.
876
+ # Optional. When set to `true`, the request will be validated (including IAM
877
+ # checks), but no module will be updated. An `OK` response indicates that the
878
+ # request is valid, while an error response indicates that the request is
879
+ # invalid.
880
+ #
881
+ # If the request is valid, a subsequent request to update the module could
882
+ # still fail for one of the following reasons:
883
+ #
884
+ # * The state of your cloud resources changed; for example, you lost a
885
+ # required IAM permission
886
+ # * An error occurred during creation of the module
887
+ #
888
+ # Defaults to `false`.
833
889
  # @yield [result, operation] Access the result along with the TransportOperation object
834
890
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule]
835
891
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -883,16 +939,16 @@ module Google
883
939
 
884
940
  @security_center_management_stub.update_security_health_analytics_custom_module request, options do |result, operation|
885
941
  yield result, operation if block_given?
886
- return result
887
942
  end
888
943
  rescue ::Gapic::Rest::Error => e
889
944
  raise ::Google::Cloud::Error.from_error(e)
890
945
  end
891
946
 
892
947
  ##
893
- # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its
894
- # descendants in the CRM hierarchy. This method is only supported for
895
- # resident custom modules.
948
+ # Deletes the specified
949
+ # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}
950
+ # and all of its descendants in the resource hierarchy. This method is only
951
+ # supported for resident custom modules.
896
952
  #
897
953
  # @overload delete_security_health_analytics_custom_module(request, options = nil)
898
954
  # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type
@@ -910,21 +966,26 @@ module Google
910
966
  # the default parameter values, pass an empty Hash as a request object (see above).
911
967
  #
912
968
  # @param name [::String]
913
- # Required. The resource name of the SHA custom module.
914
- #
915
- # Its format is:
969
+ # Required. The resource name of the SHA custom module, in one of the
970
+ # following formats:
916
971
  #
917
- # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`.
918
- # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`.
919
- # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`.
972
+ # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`
973
+ # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`
974
+ # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`
920
975
  # @param validate_only [::Boolean]
921
- # Optional. When set to true, only validations (including IAM checks) will
922
- # done for the request (module will not be deleted). An OK response indicates
923
- # the request is valid while an error response indicates the request is
924
- # invalid. Note that a subsequent request to actually delete the module could
925
- # still fail because 1. the state could have changed (e.g. IAM permission
926
- # lost) or
927
- # 2. A failure occurred while trying to delete the module.
976
+ # Optional. When set to `true`, the request will be validated (including IAM
977
+ # checks), but no module will be deleted. An `OK` response indicates that the
978
+ # request is valid, while an error response indicates that the request is
979
+ # invalid.
980
+ #
981
+ # If the request is valid, a subsequent request to delete the module could
982
+ # still fail for one of the following reasons:
983
+ #
984
+ # * The state of your cloud resources changed; for example, you lost a
985
+ # required IAM permission
986
+ # * An error occurred during deletion of the module
987
+ #
988
+ # Defaults to `false`.
928
989
  # @yield [result, operation] Access the result along with the TransportOperation object
929
990
  # @yieldparam result [::Google::Protobuf::Empty]
930
991
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -978,14 +1039,15 @@ module Google
978
1039
 
979
1040
  @security_center_management_stub.delete_security_health_analytics_custom_module request, options do |result, operation|
980
1041
  yield result, operation if block_given?
981
- return result
982
1042
  end
983
1043
  rescue ::Gapic::Rest::Error => e
984
1044
  raise ::Google::Cloud::Error.from_error(e)
985
1045
  end
986
1046
 
987
1047
  ##
988
- # Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
1048
+ # Simulates the result of using a
1049
+ # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}
1050
+ # to check a resource.
989
1051
  #
990
1052
  # @overload simulate_security_health_analytics_custom_module(request, options = nil)
991
1053
  # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type
@@ -1004,10 +1066,9 @@ module Google
1004
1066
  #
1005
1067
  # @param parent [::String]
1006
1068
  # Required. The relative resource name of the organization, project, or
1007
- # folder. For more information about relative resource names, see [Relative
1008
- # Resource
1009
- # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
1010
- # Example: `organizations/{organization_id}`.
1069
+ # folder. For more information about relative resource names, see [AIP-122:
1070
+ # Resource names](https://google.aip.dev/122). Example:
1071
+ # `organizations/{organization_id}`.
1011
1072
  # @param custom_config [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig, ::Hash]
1012
1073
  # Required. The custom configuration that you need to test.
1013
1074
  # @param resource [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash]
@@ -1065,7 +1126,6 @@ module Google
1065
1126
 
1066
1127
  @security_center_management_stub.simulate_security_health_analytics_custom_module request, options do |result, operation|
1067
1128
  yield result, operation if block_given?
1068
- return result
1069
1129
  end
1070
1130
  rescue ::Gapic::Rest::Error => e
1071
1131
  raise ::Google::Cloud::Error.from_error(e)
@@ -1092,16 +1152,21 @@ module Google
1092
1152
  # the default parameter values, pass an empty Hash as a request object (see above).
1093
1153
  #
1094
1154
  # @param parent [::String]
1095
- # Required. Name of parent to list effective custom modules. Its format is
1096
- # `organizations/{organization}/locations/{location}`,
1097
- # `folders/{folder}/locations/{location}`,
1098
- # or
1099
- # `projects/{project}/locations/{location}`
1155
+ # Required. Name of parent to list effective custom modules, in one of the
1156
+ # following formats:
1157
+ #
1158
+ # * `organizations/{organization}/locations/{location}`
1159
+ # * `folders/{folder}/locations/{location}`
1160
+ # * `projects/{project}/locations/{location}`
1100
1161
  # @param page_size [::Integer]
1101
1162
  # Optional. The maximum number of results to return in a single response.
1102
1163
  # Default is 10, minimum is 1, maximum is 1000.
1103
1164
  # @param page_token [::String]
1104
- # Optional. The value returned by the last call indicating a continuation
1165
+ # Optional. A pagination token returned from a previous request. Provide this
1166
+ # token to retrieve the next page of results.
1167
+ #
1168
+ # When paginating, the rest of the request must match the request that
1169
+ # generated the page token.
1105
1170
  # @yield [result, operation] Access the result along with the TransportOperation object
1106
1171
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>]
1107
1172
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1160,20 +1225,25 @@ module Google
1160
1225
  @security_center_management_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation|
1161
1226
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options
1162
1227
  yield result, operation if block_given?
1163
- return result
1228
+ throw :response, result
1164
1229
  end
1165
1230
  rescue ::Gapic::Rest::Error => e
1166
1231
  raise ::Google::Cloud::Error.from_error(e)
1167
1232
  end
1168
1233
 
1169
1234
  ##
1170
- # Gets an effective ETD custom module. Retrieves the effective module at the
1171
- # given level. The difference between an EffectiveCustomModule and a
1172
- # CustomModule is that the fields for an EffectiveCustomModule are computed
1173
- # from ancestors if needed. For example, the enablement_state for a
1174
- # CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the
1175
- # enablement_state for an EffectiveCustomModule is always computed to ENABLED
1176
- # or DISABLED (the effective enablement_state).
1235
+ # Gets the effective Event Threat Detection custom module at the given level.
1236
+ #
1237
+ # The difference between an
1238
+ # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule EffectiveEventThreatDetectionCustomModule}
1239
+ # and an
1240
+ # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule EventThreatDetectionCustomModule}
1241
+ # is that the fields for an `EffectiveEventThreatDetectionCustomModule` are
1242
+ # computed from ancestors if needed. For example, the enablement state for an
1243
+ # `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or
1244
+ # `INHERITED`. In contrast, the enablement state for an
1245
+ # `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED`
1246
+ # or `DISABLED`.
1177
1247
  #
1178
1248
  # @overload get_effective_event_threat_detection_custom_module(request, options = nil)
1179
1249
  # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type
@@ -1191,13 +1261,12 @@ module Google
1191
1261
  # the default parameter values, pass an empty Hash as a request object (see above).
1192
1262
  #
1193
1263
  # @param name [::String]
1194
- # Required. The resource name of the ETD custom module.
1195
- #
1196
- # Its format is:
1264
+ # Required. The resource name of the Event Threat Detection custom module, in
1265
+ # one of the following formats:
1197
1266
  #
1198
- # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`.
1199
- # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`.
1200
- # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`.
1267
+ # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
1268
+ # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
1269
+ # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
1201
1270
  # @yield [result, operation] Access the result along with the TransportOperation object
1202
1271
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule]
1203
1272
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1251,16 +1320,15 @@ module Google
1251
1320
 
1252
1321
  @security_center_management_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation|
1253
1322
  yield result, operation if block_given?
1254
- return result
1255
1323
  end
1256
1324
  rescue ::Gapic::Rest::Error => e
1257
1325
  raise ::Google::Cloud::Error.from_error(e)
1258
1326
  end
1259
1327
 
1260
1328
  ##
1261
- # Lists all Event Threat Detection custom modules for the given
1262
- # Resource Manager parent. This includes resident modules defined at the
1263
- # scope of the parent along with modules inherited from ancestors.
1329
+ # Lists all Event Threat Detection custom modules for the given organization,
1330
+ # folder, or project. This includes resident modules defined at the scope of
1331
+ # the parent along with modules inherited from ancestors.
1264
1332
  #
1265
1333
  # @overload list_event_threat_detection_custom_modules(request, options = nil)
1266
1334
  # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type
@@ -1278,23 +1346,22 @@ module Google
1278
1346
  # the default parameter values, pass an empty Hash as a request object (see above).
1279
1347
  #
1280
1348
  # @param parent [::String]
1281
- # Required. Name of parent to list custom modules. Its format is
1282
- # `organizations/{organization}/locations/{location}`,
1283
- # `folders/{folder}/locations/{location}`,
1284
- # or
1285
- # `projects/{project}/locations/{location}`
1349
+ # Required. Name of parent to list custom modules, in one of the following
1350
+ # formats:
1351
+ #
1352
+ # * `organizations/{organization}/locations/{location}`
1353
+ # * `folders/{folder}/locations/{location}`
1354
+ # * `projects/{project}/locations/{location}`
1286
1355
  # @param page_size [::Integer]
1287
1356
  # Optional. The maximum number of modules to return. The service may return
1288
- # fewer than this value. If unspecified, at most 10 configs will be returned.
1357
+ # fewer than this value. If unspecified, at most 10 modules will be returned.
1289
1358
  # The maximum value is 1000; values above 1000 will be coerced to 1000.
1290
1359
  # @param page_token [::String]
1291
- # Optional. A page token, received from a previous
1292
- # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the
1293
- # subsequent page.
1360
+ # Optional. A pagination token returned from a previous request. Provide this
1361
+ # token to retrieve the next page of results.
1294
1362
  #
1295
- # When paginating, all other parameters provided to
1296
- # `ListEventThreatDetectionCustomModules` must match the call that provided
1297
- # the page token.
1363
+ # When paginating, the rest of the request must match the request that
1364
+ # generated the page token.
1298
1365
  # @yield [result, operation] Access the result along with the TransportOperation object
1299
1366
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>]
1300
1367
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1353,15 +1420,15 @@ module Google
1353
1420
  @security_center_management_stub.list_event_threat_detection_custom_modules request, options do |result, operation|
1354
1421
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options
1355
1422
  yield result, operation if block_given?
1356
- return result
1423
+ throw :response, result
1357
1424
  end
1358
1425
  rescue ::Gapic::Rest::Error => e
1359
1426
  raise ::Google::Cloud::Error.from_error(e)
1360
1427
  end
1361
1428
 
1362
1429
  ##
1363
- # Lists all resident Event Threat Detection custom modules under the
1364
- # given Resource Manager parent and its descendants.
1430
+ # Lists all resident Event Threat Detection custom modules for the given
1431
+ # organization, folder, or project and its descendants.
1365
1432
  #
1366
1433
  # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil)
1367
1434
  # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type
@@ -1379,17 +1446,22 @@ module Google
1379
1446
  # the default parameter values, pass an empty Hash as a request object (see above).
1380
1447
  #
1381
1448
  # @param parent [::String]
1382
- # Required. Name of parent to list custom modules. Its format is
1383
- # `organizations/{organization}/locations/{location}`,
1384
- # `folders/{folder}/locations/{location}`,
1385
- # or
1386
- # `projects/{project}/locations/{location}`
1449
+ # Required. Name of parent to list custom modules, in one of the following
1450
+ # formats:
1451
+ #
1452
+ # * `organizations/{organization}/locations/{location}`
1453
+ # * `folders/{folder}/locations/{location}`
1454
+ # * `projects/{project}/locations/{location}`
1387
1455
  # @param page_size [::Integer]
1388
1456
  # Optional. The maximum number of modules to return. The service may return
1389
1457
  # fewer than this value. If unspecified, at most 10 configs will be returned.
1390
1458
  # The maximum value is 1000; values above 1000 will be coerced to 1000.
1391
1459
  # @param page_token [::String]
1392
- # Optional. A token identifying a page of results the server should return.
1460
+ # Optional. A pagination token returned from a previous request. Provide this
1461
+ # token to retrieve the next page of results.
1462
+ #
1463
+ # When paginating, the rest of the request must match the request that
1464
+ # generated the page token.
1393
1465
  # @yield [result, operation] Access the result along with the TransportOperation object
1394
1466
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>]
1395
1467
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1448,7 +1520,7 @@ module Google
1448
1520
  @security_center_management_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation|
1449
1521
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options
1450
1522
  yield result, operation if block_given?
1451
- return result
1523
+ throw :response, result
1452
1524
  end
1453
1525
  rescue ::Gapic::Rest::Error => e
1454
1526
  raise ::Google::Cloud::Error.from_error(e)
@@ -1473,13 +1545,12 @@ module Google
1473
1545
  # the default parameter values, pass an empty Hash as a request object (see above).
1474
1546
  #
1475
1547
  # @param name [::String]
1476
- # Required. The resource name of the ETD custom module.
1548
+ # Required. The resource name of the Event Threat Detection custom module, in
1549
+ # one of the following formats:
1477
1550
  #
1478
- # Its format is:
1479
- #
1480
- # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1481
- # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1482
- # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1551
+ # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
1552
+ # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
1553
+ # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
1483
1554
  # @yield [result, operation] Access the result along with the TransportOperation object
1484
1555
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1485
1556
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1533,7 +1604,6 @@ module Google
1533
1604
 
1534
1605
  @security_center_management_stub.get_event_threat_detection_custom_module request, options do |result, operation|
1535
1606
  yield result, operation if block_given?
1536
- return result
1537
1607
  end
1538
1608
  rescue ::Gapic::Rest::Error => e
1539
1609
  raise ::Google::Cloud::Error.from_error(e)
@@ -1541,9 +1611,9 @@ module Google
1541
1611
 
1542
1612
  ##
1543
1613
  # Creates a resident Event Threat Detection custom module at the scope of the
1544
- # given Resource Manager parent, and also creates inherited custom modules
1545
- # for all descendants of the given parent. These modules are enabled by
1546
- # default.
1614
+ # given organization, folder, or project, and creates inherited custom
1615
+ # modules for all descendants of the given parent. These modules are enabled
1616
+ # by default.
1547
1617
  #
1548
1618
  # @overload create_event_threat_detection_custom_module(request, options = nil)
1549
1619
  # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type
@@ -1561,23 +1631,29 @@ module Google
1561
1631
  # the default parameter values, pass an empty Hash as a request object (see above).
1562
1632
  #
1563
1633
  # @param parent [::String]
1564
- # Required. Name of parent for the module. Its format is
1565
- # `organizations/{organization}/locations/{location}`,
1566
- # `folders/{folder}/locations/{location}`,
1567
- # or
1568
- # `projects/{project}/locations/{location}`
1634
+ # Required. Name of parent for the module, in one of the following formats:
1635
+ #
1636
+ # * `organizations/{organization}/locations/{location}`
1637
+ # * `folders/{folder}/locations/{location}`
1638
+ # * `projects/{project}/locations/{location}`
1569
1639
  # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash]
1570
1640
  # Required. The module to create. The
1571
- # event_threat_detection_custom_module.name will be ignored and server
1572
- # generated.
1641
+ # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule#name EventThreatDetectionCustomModule.name}
1642
+ # field is ignored; Security Command Center generates the name.
1573
1643
  # @param validate_only [::Boolean]
1574
- # Optional. When set to true, only validations (including IAM checks) will
1575
- # done for the request (no module will be created). An OK response indicates
1576
- # the request is valid while an error response indicates the request is
1577
- # invalid. Note that a subsequent request to actually create the module could
1578
- # still fail because 1. the state could have changed (e.g. IAM permission
1579
- # lost) or
1580
- # 2. A failure occurred during creation of the module.
1644
+ # Optional. When set to `true`, the request will be validated (including IAM
1645
+ # checks), but no module will be created. An `OK` response indicates that the
1646
+ # request is valid, while an error response indicates that the request is
1647
+ # invalid.
1648
+ #
1649
+ # If the request is valid, a subsequent request to create the module could
1650
+ # still fail for one of the following reasons:
1651
+ #
1652
+ # * The state of your cloud resources changed; for example, you lost a
1653
+ # required IAM permission
1654
+ # * An error occurred during creation of the module
1655
+ #
1656
+ # Defaults to `false`.
1581
1657
  # @yield [result, operation] Access the result along with the TransportOperation object
1582
1658
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1583
1659
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1631,7 +1707,6 @@ module Google
1631
1707
 
1632
1708
  @security_center_management_stub.create_event_threat_detection_custom_module request, options do |result, operation|
1633
1709
  yield result, operation if block_given?
1634
- return result
1635
1710
  end
1636
1711
  rescue ::Gapic::Rest::Error => e
1637
1712
  raise ::Google::Cloud::Error.from_error(e)
@@ -1661,21 +1736,23 @@ module Google
1661
1736
  # the default parameter values, pass an empty Hash as a request object (see above).
1662
1737
  #
1663
1738
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1664
- # Required. Field mask is used to specify the fields to be overwritten in the
1665
- # EventThreatDetectionCustomModule resource by the update.
1666
- # The fields specified in the update_mask are relative to the resource, not
1667
- # the full request. A field will be overwritten if it is in the mask. If the
1668
- # user does not provide a mask then all fields will be overwritten.
1739
+ # Required. The fields to update. If omitted, then all fields are updated.
1669
1740
  # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash]
1670
- # Required. The module being updated
1741
+ # Required. The module being updated.
1671
1742
  # @param validate_only [::Boolean]
1672
- # Optional. When set to true, only validations (including IAM checks) will
1673
- # done for the request (module will not be updated). An OK response indicates
1674
- # the request is valid while an error response indicates the request is
1675
- # invalid. Note that a subsequent request to actually update the module could
1676
- # still fail because 1. the state could have changed (e.g. IAM permission
1677
- # lost) or
1678
- # 2. A failure occurred while trying to update the module.
1743
+ # Optional. When set to `true`, the request will be validated (including IAM
1744
+ # checks), but no module will be updated. An `OK` response indicates that the
1745
+ # request is valid, while an error response indicates that the request is
1746
+ # invalid.
1747
+ #
1748
+ # If the request is valid, a subsequent request to update the module could
1749
+ # still fail for one of the following reasons:
1750
+ #
1751
+ # * The state of your cloud resources changed; for example, you lost a
1752
+ # required IAM permission
1753
+ # * An error occurred during creation of the module
1754
+ #
1755
+ # Defaults to `false`.
1679
1756
  # @yield [result, operation] Access the result along with the TransportOperation object
1680
1757
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule]
1681
1758
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1729,7 +1806,6 @@ module Google
1729
1806
 
1730
1807
  @security_center_management_stub.update_event_threat_detection_custom_module request, options do |result, operation|
1731
1808
  yield result, operation if block_given?
1732
- return result
1733
1809
  end
1734
1810
  rescue ::Gapic::Rest::Error => e
1735
1811
  raise ::Google::Cloud::Error.from_error(e)
@@ -1737,8 +1813,8 @@ module Google
1737
1813
 
1738
1814
  ##
1739
1815
  # Deletes the specified Event Threat Detection custom module and all of its
1740
- # descendants in the Resource Manager hierarchy. This method is only
1741
- # supported for resident custom modules.
1816
+ # descendants in the resource hierarchy. This method is only supported for
1817
+ # resident custom modules.
1742
1818
  #
1743
1819
  # @overload delete_event_threat_detection_custom_module(request, options = nil)
1744
1820
  # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type
@@ -1756,21 +1832,26 @@ module Google
1756
1832
  # the default parameter values, pass an empty Hash as a request object (see above).
1757
1833
  #
1758
1834
  # @param name [::String]
1759
- # Required. The resource name of the ETD custom module.
1760
- #
1761
- # Its format is:
1835
+ # Required. The resource name of the Event Threat Detection custom module, in
1836
+ # one of the following formats:
1762
1837
  #
1763
- # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1764
- # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1765
- # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`.
1838
+ # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
1839
+ # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
1840
+ # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
1766
1841
  # @param validate_only [::Boolean]
1767
- # Optional. When set to true, only validations (including IAM checks) will
1768
- # done for the request (module will not be deleted). An OK response indicates
1769
- # the request is valid while an error response indicates the request is
1770
- # invalid. Note that a subsequent request to actually delete the module could
1771
- # still fail because 1. the state could have changed (e.g. IAM permission
1772
- # lost) or
1773
- # 2. A failure occurred while trying to delete the module.
1842
+ # Optional. When set to `true`, the request will be validated (including IAM
1843
+ # checks), but no module will be deleted. An `OK` response indicates that the
1844
+ # request is valid, while an error response indicates that the request is
1845
+ # invalid.
1846
+ #
1847
+ # If the request is valid, a subsequent request to delete the module could
1848
+ # still fail for one of the following reasons:
1849
+ #
1850
+ # * The state of your cloud resources changed; for example, you lost a
1851
+ # required IAM permission
1852
+ # * An error occurred during creation of the module
1853
+ #
1854
+ # Defaults to `false`.
1774
1855
  # @yield [result, operation] Access the result along with the TransportOperation object
1775
1856
  # @yieldparam result [::Google::Protobuf::Empty]
1776
1857
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1824,7 +1905,6 @@ module Google
1824
1905
 
1825
1906
  @security_center_management_stub.delete_event_threat_detection_custom_module request, options do |result, operation|
1826
1907
  yield result, operation if block_given?
1827
- return result
1828
1908
  end
1829
1909
  rescue ::Gapic::Rest::Error => e
1830
1910
  raise ::Google::Cloud::Error.from_error(e)
@@ -1849,16 +1929,15 @@ module Google
1849
1929
  # the default parameter values, pass an empty Hash as a request object (see above).
1850
1930
  #
1851
1931
  # @param parent [::String]
1852
- # Required. Resource name of the parent to validate the Custom Module under.
1853
- #
1854
- # Its format is:
1932
+ # Required. Resource name of the parent to validate the custom modules under,
1933
+ # in one of the following formats:
1855
1934
  #
1856
- # * `organizations/{organization}/locations/{location}`.
1935
+ # * `organizations/{organization}/locations/{location}`
1857
1936
  # @param raw_text [::String]
1858
1937
  # Required. The raw text of the module's contents. Used to generate error
1859
1938
  # messages.
1860
1939
  # @param type [::String]
1861
- # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP).
1940
+ # Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`.
1862
1941
  # @yield [result, operation] Access the result along with the TransportOperation object
1863
1942
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse]
1864
1943
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1912,7 +1991,6 @@ module Google
1912
1991
 
1913
1992
  @security_center_management_stub.validate_event_threat_detection_custom_module request, options do |result, operation|
1914
1993
  yield result, operation if block_given?
1915
- return result
1916
1994
  end
1917
1995
  rescue ::Gapic::Rest::Error => e
1918
1996
  raise ::Google::Cloud::Error.from_error(e)
@@ -1937,24 +2015,23 @@ module Google
1937
2015
  # the default parameter values, pass an empty Hash as a request object (see above).
1938
2016
  #
1939
2017
  # @param name [::String]
1940
- # Required. The Security Command Center service to retrieve.
1941
- #
1942
- # Formats:
2018
+ # Required. The Security Command Center service to retrieve, in one of the
2019
+ # following formats:
1943
2020
  #
1944
- # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service}
1945
- # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service}
1946
- # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service}
2021
+ # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service}
2022
+ # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service}
2023
+ # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service}
1947
2024
  #
1948
- # The possible values for id \\{service} are:
2025
+ # The following values are valid for `{service}`:
1949
2026
  #
1950
- # * container-threat-detection
1951
- # * event-threat-detection
1952
- # * security-health-analytics
1953
- # * vm-threat-detection
1954
- # * web-security-scanner
2027
+ # * `container-threat-detection`
2028
+ # * `event-threat-detection`
2029
+ # * `security-health-analytics`
2030
+ # * `vm-threat-detection`
2031
+ # * `web-security-scanner`
1955
2032
  # @param show_eligible_modules_only [::Boolean]
1956
- # Flag that, when set, will be used to filter the ModuleSettings that are
1957
- # in scope. The default setting is that all modules will be shown.
2033
+ # Set to `true` to show only modules that are in scope. By default, all
2034
+ # modules are shown.
1958
2035
  # @yield [result, operation] Access the result along with the TransportOperation object
1959
2036
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService]
1960
2037
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2008,7 +2085,6 @@ module Google
2008
2085
 
2009
2086
  @security_center_management_stub.get_security_center_service request, options do |result, operation|
2010
2087
  yield result, operation if block_given?
2011
- return result
2012
2088
  end
2013
2089
  rescue ::Gapic::Rest::Error => e
2014
2090
  raise ::Google::Cloud::Error.from_error(e)
@@ -2034,21 +2110,24 @@ module Google
2034
2110
  # the default parameter values, pass an empty Hash as a request object (see above).
2035
2111
  #
2036
2112
  # @param parent [::String]
2037
- # Required. The name of the parent to list Security Command Center services.
2113
+ # Required. The name of the parent to list Security Command Center services,
2114
+ # in one of the following formats:
2038
2115
  #
2039
- # Formats:
2040
- #
2041
- # * organizations/\\{organization}/locations/\\{location}
2042
- # * folders/\\{folder}/locations/\\{location}
2043
- # * projects/\\{project}/locations/\\{location}
2116
+ # * `organizations/{organization}/locations/{location}`
2117
+ # * `folders/{folder}/locations/{location}`
2118
+ # * `projects/{project}/locations/{location}`
2044
2119
  # @param page_size [::Integer]
2045
2120
  # Optional. The maximum number of results to return in a single response.
2046
2121
  # Default is 10, minimum is 1, maximum is 1000.
2047
2122
  # @param page_token [::String]
2048
- # Optional. The value returned by the last call indicating a continuation.
2123
+ # Optional. A pagination token returned from a previous request. Provide this
2124
+ # token to retrieve the next page of results.
2125
+ #
2126
+ # When paginating, the rest of the request must match the request that
2127
+ # generated the page token.
2049
2128
  # @param show_eligible_modules_only [::Boolean]
2050
- # Flag that, when set, will be used to filter the ModuleSettings that are
2051
- # in scope. The default setting is that all modules will be shown.
2129
+ # Flag that, when set, is used to filter the module settings that are shown.
2130
+ # The default setting is that all modules are shown.
2052
2131
  # @yield [result, operation] Access the result along with the TransportOperation object
2053
2132
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>]
2054
2133
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2107,7 +2186,7 @@ module Google
2107
2186
  @security_center_management_stub.list_security_center_services request, options do |result, operation|
2108
2187
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_security_center_services, "security_center_services", request, result, options
2109
2188
  yield result, operation if block_given?
2110
- return result
2189
+ throw :response, result
2111
2190
  end
2112
2191
  rescue ::Gapic::Rest::Error => e
2113
2192
  raise ::Google::Cloud::Error.from_error(e)
@@ -2134,18 +2213,26 @@ module Google
2134
2213
  # @param security_center_service [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService, ::Hash]
2135
2214
  # Required. The updated service.
2136
2215
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2137
- # Required. The list of fields to be updated. Possible values:
2216
+ # Required. The fields to update. Accepts the following values:
2138
2217
  #
2139
- # * "intended_enablement_state"
2140
- # * "modules"
2218
+ # * `intended_enablement_state`
2219
+ # * `modules`
2220
+ #
2221
+ # If omitted, then all eligible fields are updated.
2141
2222
  # @param validate_only [::Boolean]
2142
- # Optional. When set to true, only validations (including IAM checks) will be
2143
- # done for the request (service will not be updated). An OK response
2144
- # indicates that the request is valid, while an error response indicates that
2145
- # the request is invalid. Note that a subsequent request to actually update
2146
- # the service could still fail for one of the following reasons:
2147
- # - The state could have changed (e.g. IAM permission lost).
2148
- # - A failure occurred while trying to delete the module.
2223
+ # Optional. When set to `true`, the request will be validated (including IAM
2224
+ # checks), but no service will be updated. An `OK` response indicates that
2225
+ # the request is valid, while an error response indicates that the request is
2226
+ # invalid.
2227
+ #
2228
+ # If the request is valid, a subsequent request to update the service could
2229
+ # still fail for one of the following reasons:
2230
+ #
2231
+ # * The state of your cloud resources changed; for example, you lost a
2232
+ # required IAM permission
2233
+ # * An error occurred during update of the service
2234
+ #
2235
+ # Defaults to `false`.
2149
2236
  # @yield [result, operation] Access the result along with the TransportOperation object
2150
2237
  # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService]
2151
2238
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2199,7 +2286,6 @@ module Google
2199
2286
 
2200
2287
  @security_center_management_stub.update_security_center_service request, options do |result, operation|
2201
2288
  yield result, operation if block_given?
2202
- return result
2203
2289
  end
2204
2290
  rescue ::Gapic::Rest::Error => e
2205
2291
  raise ::Google::Cloud::Error.from_error(e)
@@ -2279,6 +2365,11 @@ module Google
2279
2365
  # default endpoint URL. The default value of nil uses the environment
2280
2366
  # universe (usually the default "googleapis.com" universe).
2281
2367
  # @return [::String,nil]
2368
+ # @!attribute [rw] logger
2369
+ # A custom logger to use for request/response debug logging, or the value
2370
+ # `:default` (the default) to construct a default logger, or `nil` to
2371
+ # explicitly disable logging.
2372
+ # @return [::Logger,:default,nil]
2282
2373
  #
2283
2374
  class Configuration
2284
2375
  extend ::Gapic::Config
@@ -2307,6 +2398,7 @@ module Google
2307
2398
  # by the host service.
2308
2399
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2309
2400
  config_attr :bindings_override, {}, ::Hash, nil
2401
+ config_attr :logger, :default, ::Logger, nil, :default
2310
2402
 
2311
2403
  # @private
2312
2404
  def initialize parent_config = nil