From d674266bb4a7aa24e73e36e919ef0f789dfb8c16 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 13 Jul 2026 23:59:34 +0000 Subject: [PATCH 1/2] feat: add agent, agent_sessions, and agent_anomaly fields to Finding PiperOrigin-RevId: 947240706 Source-Link: https://github.com/googleapis/googleapis/commit/3614450147d75067801a8da2ae59abb55b82cc30 Source-Link: https://github.com/googleapis/googleapis-gen/commit/720b731101c3e8cac87bea7f01e01a7fb6375213 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlci12MS8uT3dsQm90LnlhbWwiLCJoIjoiNzIwYjczMTEwMWMzZThjYWM4N2JlYTdmMDFlMDFhN2ZiNjM3NTIxMyJ9 --- .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-security_center-v1/.toys.rb | 28 + .../google-cloud-security_center-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-security_center-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../google-cloud-security_center-v1/README.md | 153 + .../google-cloud-security_center-v1/Rakefile | 169 + .../gapic_metadata.json | 333 + .../google-cloud-security_center-v1.gemspec | 29 + .../lib/google-cloud-security_center-v1.rb | 21 + .../lib/google/cloud/security_center/v1.rb | 45 + .../google/cloud/security_center/v1/rest.rb | 37 + .../security_center/v1/security_center.rb | 56 + .../v1/security_center/client.rb | 7460 +++++++++++++++++ .../v1/security_center/credentials.rb | 51 + .../v1/security_center/operations.rb | 843 ++ .../v1/security_center/paths.rb | 1127 +++ .../v1/security_center/rest.rb | 53 + .../v1/security_center/rest/client.rb | 6970 +++++++++++++++ .../v1/security_center/rest/operations.rb | 926 ++ .../v1/security_center/rest/service_stub.rb | 4766 +++++++++++ .../cloud/security_center/v1/version.rb | 28 + .../cloud/securitycenter/v1/access_pb.rb | 23 + .../securitycenter/v1/agent_anomaly_pb.rb | 24 + .../cloud/securitycenter/v1/agent_pb.rb | 21 + .../securitycenter/v1/agent_session_pb.rb | 21 + .../cloud/securitycenter/v1/application_pb.rb | 21 + .../cloud/securitycenter/v1/asset_pb.rb | 29 + .../securitycenter/v1/attack_exposure_pb.rb | 24 + .../cloud/securitycenter/v1/attack_path_pb.rb | 28 + .../v1/backup_disaster_recovery_pb.rb | 23 + .../securitycenter/v1/bigquery_export_pb.rb | 25 + .../cloud/securitycenter/v1/chokepoint_pb.rb | 21 + .../cloud/securitycenter/v1/cloud_armor_pb.rb | 27 + .../v1/cloud_dlp_data_profile_pb.rb | 27 + .../v1/cloud_dlp_inspection_pb.rb | 23 + .../cloud/securitycenter/v1/compliance_pb.rb | 21 + .../cloud/securitycenter/v1/connection_pb.rb | 22 + .../securitycenter/v1/contact_details_pb.rb | 22 + .../cloud/securitycenter/v1/container_pb.rb | 24 + .../cloud/securitycenter/v1/database_pb.rb | 21 + ...event_threat_detection_custom_module_pb.rb | 26 + ...urity_health_analytics_custom_module_pb.rb | 26 + ...event_threat_detection_custom_module_pb.rb | 27 + ...tion_custom_module_validation_errors_pb.rb | 23 + .../securitycenter/v1/exfiltration_pb.rb | 22 + .../securitycenter/v1/external_exposure_pb.rb | 23 + .../securitycenter/v1/external_system_pb.rb | 25 + .../google/cloud/securitycenter/v1/file_pb.rb | 22 + .../cloud/securitycenter/v1/finding_pb.rb | 68 + .../cloud/securitycenter/v1/folder_pb.rb | 21 + .../securitycenter/v1/group_membership_pb.rb | 22 + .../cloud/securitycenter/v1/iam_binding_pb.rb | 22 + .../cloud/securitycenter/v1/indicator_pb.rb | 26 + .../securitycenter/v1/kernel_rootkit_pb.rb | 21 + .../cloud/securitycenter/v1/kubernetes_pb.rb | 34 + .../cloud/securitycenter/v1/label_pb.rb | 21 + .../securitycenter/v1/load_balancer_pb.rb | 21 + .../cloud/securitycenter/v1/log_entry_pb.rb | 24 + .../securitycenter/v1/mitre_attack_pb.rb | 23 + .../cloud/securitycenter/v1/mute_config_pb.rb | 26 + .../cloud/securitycenter/v1/notebook_pb.rb | 23 + .../v1/notification_config_pb.rb | 25 + .../v1/notification_message_pb.rb | 24 + .../cloud/securitycenter/v1/org_policy_pb.rb | 23 + .../v1/organization_settings_pb.rb | 25 + .../cloud/securitycenter/v1/process_pb.rb | 24 + .../cloud/securitycenter/v1/resource_pb.rb | 36 + .../v1/resource_value_config_pb.rb | 28 + .../v1/run_asset_discovery_response_pb.rb | 24 + ...urity_health_analytics_custom_config_pb.rb | 27 + ...urity_health_analytics_custom_module_pb.rb | 27 + .../securitycenter/v1/security_marks_pb.rb | 23 + .../securitycenter/v1/security_posture_pb.rb | 22 + .../v1/securitycenter_service_pb.rb | 147 + .../v1/securitycenter_service_services_pb.rb | 226 + .../cloud/securitycenter/v1/simulation_pb.rb | 27 + .../cloud/securitycenter/v1/source_pb.rb | 23 + .../securitycenter/v1/toxic_combination_pb.rb | 21 + .../securitycenter/v1/valued_resource_pb.rb | 25 + .../securitycenter/v1/vulnerability_pb.rb | 36 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/securitycenter/v1/access.rb | 120 + .../google/cloud/securitycenter/v1/agent.rb | 39 + .../cloud/securitycenter/v1/agent_anomaly.rb | 98 + .../cloud/securitycenter/v1/agent_session.rb | 35 + .../cloud/securitycenter/v1/application.rb | 40 + .../google/cloud/securitycenter/v1/asset.rb | 141 + .../securitycenter/v1/attack_exposure.rb | 73 + .../cloud/securitycenter/v1/attack_path.rb | 147 + .../v1/backup_disaster_recovery.rb | 90 + .../securitycenter/v1/bigquery_export.rb | 92 + .../cloud/securitycenter/v1/chokepoint.rb | 39 + .../cloud/securitycenter/v1/cloud_armor.rb | 128 + .../v1/cloud_dlp_data_profile.rb | 114 + .../securitycenter/v1/cloud_dlp_inspection.rb | 50 + .../cloud/securitycenter/v1/compliance.rb | 43 + .../cloud/securitycenter/v1/connection.rb | 70 + .../securitycenter/v1/contact_details.rb | 44 + .../cloud/securitycenter/v1/container.rb | 49 + .../cloud/securitycenter/v1/database.rb | 67 + ...ve_event_threat_detection_custom_module.rb | 77 + ...security_health_analytics_custom_module.rb | 73 + .../event_threat_detection_custom_module.rb | 88 + ...tection_custom_module_validation_errors.rb | 69 + .../cloud/securitycenter/v1/exfiltration.rb | 64 + .../securitycenter/v1/external_exposure.rb | 77 + .../securitycenter/v1/external_system.rb | 98 + .../google/cloud/securitycenter/v1/file.rb | 72 + .../google/cloud/securitycenter/v1/finding.rb | 486 ++ .../google/cloud/securitycenter/v1/folder.rb | 40 + .../securitycenter/v1/group_membership.rb | 51 + .../cloud/securitycenter/v1/iam_binding.rb | 56 + .../cloud/securitycenter/v1/indicator.rb | 116 + .../cloud/securitycenter/v1/kernel_rootkit.rb | 66 + .../cloud/securitycenter/v1/kubernetes.rb | 241 + .../google/cloud/securitycenter/v1/label.rb | 41 + .../cloud/securitycenter/v1/load_balancer.rb | 36 + .../cloud/securitycenter/v1/log_entry.rb | 58 + .../cloud/securitycenter/v1/mitre_attack.rb | 303 + .../cloud/securitycenter/v1/mute_config.rb | 116 + .../cloud/securitycenter/v1/notebook.rb | 46 + .../securitycenter/v1/notification_config.rb | 87 + .../securitycenter/v1/notification_message.rb | 42 + .../cloud/securitycenter/v1/org_policy.rb | 37 + .../v1/organization_settings.rb | 86 + .../google/cloud/securitycenter/v1/process.rb | 79 + .../cloud/securitycenter/v1/resource.rb | 286 + .../v1/resource_value_config.rb | 125 + .../v1/run_asset_discovery_response.rb | 54 + ...security_health_analytics_custom_config.rb | 112 + ...security_health_analytics_custom_module.rb | 90 + .../cloud/securitycenter/v1/security_marks.rb | 71 + .../securitycenter/v1/security_posture.rb | 83 + .../v1/securitycenter_service.rb | 2146 +++++ .../cloud/securitycenter/v1/simulation.rb | 46 + .../google/cloud/securitycenter/v1/source.rb | 65 + .../securitycenter/v1/toxic_combination.rb | 45 + .../securitycenter/v1/valued_resource.rb | 86 + .../cloud/securitycenter/v1/vulnerability.rb | 336 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../batch_create_resource_value_configs.rb | 47 + .../security_center/bulk_mute_findings.rb | 54 + .../create_big_query_export.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + .../security_center/create_finding.rb | 47 + .../security_center/create_mute_config.rb | 47 + .../create_notification_config.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../snippets/security_center/create_source.rb | 47 + .../delete_big_query_export.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + .../security_center/delete_mute_config.rb | 47 + .../delete_notification_config.rb | 47 + .../delete_resource_value_config.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../security_center/get_big_query_export.rb | 47 + ...ve_event_threat_detection_custom_module.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + ...et_event_threat_detection_custom_module.rb | 47 + .../security_center/get_iam_policy.rb | 47 + .../security_center/get_mute_config.rb | 47 + .../get_notification_config.rb | 47 + .../get_organization_settings.rb | 47 + .../get_resource_value_config.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../security_center/get_simulation.rb | 47 + .../snippets/security_center/get_source.rb | 47 + .../security_center/get_valued_resource.rb | 47 + .../snippets/security_center/group_assets.rb | 51 + .../security_center/group_findings.rb | 51 + .../snippets/security_center/list_assets.rb | 51 + .../security_center/list_attack_paths.rb | 51 + .../security_center/list_big_query_exports.rb | 51 + ...t_event_threat_detection_custom_modules.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + ...e_event_threat_detection_custom_modules.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + ...t_event_threat_detection_custom_modules.rb | 51 + .../snippets/security_center/list_findings.rb | 51 + .../security_center/list_mute_configs.rb | 51 + .../list_notification_configs.rb | 51 + .../list_resource_value_configs.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + .../snippets/security_center/list_sources.rb | 51 + .../security_center/list_valued_resources.rb | 51 + .../security_center/run_asset_discovery.rb | 54 + .../security_center/set_finding_state.rb | 47 + .../security_center/set_iam_policy.rb | 47 + .../snippets/security_center/set_mute.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../security_center/test_iam_permissions.rb | 47 + .../update_big_query_export.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + .../security_center/update_external_system.rb | 47 + .../security_center/update_finding.rb | 47 + .../security_center/update_mute_config.rb | 47 + .../update_notification_config.rb | 47 + .../update_organization_settings.rb | 47 + .../update_resource_value_config.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../security_center/update_security_marks.rb | 47 + .../snippets/security_center/update_source.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + ...tadata_google.cloud.securitycenter.v1.json | 2535 ++++++ .../v1/security_center_operations_test.rb | 400 + .../v1/security_center_paths_test.rb | 487 ++ .../v1/security_center_rest_test.rb | 3594 ++++++++ .../v1/security_center_test.rb | 4053 +++++++++ .../test/helper.rb | 26 + 231 files changed, 49810 insertions(+) create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_message_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/org_policy_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/process_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/resource_value_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/run_asset_discovery_response_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_module_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_marks_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_posture_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-security_center-v1/.gitignore b/owl-bot-staging/google-cloud-security_center-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json new file mode 100644 index 000000000000..1db7926905f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "securitycenter.googleapis.com", + "api_shortname": "securitycenter", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest", + "distribution_name": "google-cloud-security_center-v1", + "is_cloud": true, + "language": "ruby", + "name": "securitycenter", + "name_pretty": "Cloud Security Command Center V1 API", + "product_documentation": "https://cloud.google.com/security-command-center", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Security Command Center API provides access to temporal views of assets and findings within an organization. Note that google-cloud-security_center-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SECURITY_CENTER", + "ruby-cloud-product-url": "https://cloud.google.com/security-command-center", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml new file mode 100644 index 000000000000..cd91eea56b45 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security_center-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-security_center-v1.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v1/.toys.rb b/owl-bot-staging/google-cloud-security_center-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/.yardopts b/owl-bot-staging/google-cloud-security_center-v1/.yardopts new file mode 100644 index 000000000000..1a401945abab --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Security Command Center V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..ba9af184f351 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security_center-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-security_center-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/security_center/v1" + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/security_center/v1" + +::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-security_center-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/security_center/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security_center-v1/Gemfile b/owl-bot-staging/google-cloud-security_center-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-security_center-v1/README.md b/owl-bot-staging/google-cloud-security_center-v1/README.md new file mode 100644 index 000000000000..cfc90100104f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Security Command Center V1 API + +Security Command Center API provides access to temporal views of assets and findings within an organization. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Security Command Center V1 API. Most users should consider using +the main client gem, +[google-cloud-security_center](https://rubygems.org/gems/google-cloud-security_center). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-security_center-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/security_center/v1" + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new +request = ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new # (request fields as keyword arguments...) +response = client.bulk_mute_findings request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/security-command-center) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/security_center/v1" +require "logger" + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-security_center`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-security_center-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-security_center`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-security_center-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-security_center-v1/Rakefile b/owl-bot-staging/google-cloud-security_center-v1/Rakefile new file mode 100644 index 000000000000..11860dec5013 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-security_center-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SECURITY_CENTER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SECURITY_CENTER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SECURITY_CENTER_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or SECURITY_CENTER_TEST_PROJECT=test123 SECURITY_CENTER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/security_center/v1/security_center/credentials" + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SECURITY_CENTER_PROJECT"] = project + ENV["SECURITY_CENTER_TEST_PROJECT"] = project + ENV["SECURITY_CENTER_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-security_center-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security_center-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security_center-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-security_center-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security_center-v1" + header "google-cloud-security_center-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security_center-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security_center-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-security_center-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-security_center-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json new file mode 100644 index 000000000000..2a9d62ebb4ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json @@ -0,0 +1,333 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.securitycenter.v1", + "libraryPackage": "::Google::Cloud::SecurityCenter::V1", + "services": { + "SecurityCenter": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client", + "rpcs": { + "BulkMuteFindings": { + "methods": [ + "bulk_mute_findings" + ] + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "create_security_health_analytics_custom_module" + ] + }, + "CreateSource": { + "methods": [ + "create_source" + ] + }, + "CreateFinding": { + "methods": [ + "create_finding" + ] + }, + "CreateMuteConfig": { + "methods": [ + "create_mute_config" + ] + }, + "CreateNotificationConfig": { + "methods": [ + "create_notification_config" + ] + }, + "DeleteMuteConfig": { + "methods": [ + "delete_mute_config" + ] + }, + "DeleteNotificationConfig": { + "methods": [ + "delete_notification_config" + ] + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "methods": [ + "delete_security_health_analytics_custom_module" + ] + }, + "GetSimulation": { + "methods": [ + "get_simulation" + ] + }, + "GetValuedResource": { + "methods": [ + "get_valued_resource" + ] + }, + "GetBigQueryExport": { + "methods": [ + "get_big_query_export" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "GetMuteConfig": { + "methods": [ + "get_mute_config" + ] + }, + "GetNotificationConfig": { + "methods": [ + "get_notification_config" + ] + }, + "GetOrganizationSettings": { + "methods": [ + "get_organization_settings" + ] + }, + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "methods": [ + "get_effective_security_health_analytics_custom_module" + ] + }, + "GetSecurityHealthAnalyticsCustomModule": { + "methods": [ + "get_security_health_analytics_custom_module" + ] + }, + "GetSource": { + "methods": [ + "get_source" + ] + }, + "GroupAssets": { + "methods": [ + "group_assets" + ] + }, + "GroupFindings": { + "methods": [ + "group_findings" + ] + }, + "ListAssets": { + "methods": [ + "list_assets" + ] + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_descendant_security_health_analytics_custom_modules" + ] + }, + "ListFindings": { + "methods": [ + "list_findings" + ] + }, + "ListMuteConfigs": { + "methods": [ + "list_mute_configs" + ] + }, + "ListNotificationConfigs": { + "methods": [ + "list_notification_configs" + ] + }, + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_effective_security_health_analytics_custom_modules" + ] + }, + "ListSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_security_health_analytics_custom_modules" + ] + }, + "ListSources": { + "methods": [ + "list_sources" + ] + }, + "RunAssetDiscovery": { + "methods": [ + "run_asset_discovery" + ] + }, + "SetFindingState": { + "methods": [ + "set_finding_state" + ] + }, + "SetMute": { + "methods": [ + "set_mute" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "simulate_security_health_analytics_custom_module" + ] + }, + "UpdateExternalSystem": { + "methods": [ + "update_external_system" + ] + }, + "UpdateFinding": { + "methods": [ + "update_finding" + ] + }, + "UpdateMuteConfig": { + "methods": [ + "update_mute_config" + ] + }, + "UpdateNotificationConfig": { + "methods": [ + "update_notification_config" + ] + }, + "UpdateOrganizationSettings": { + "methods": [ + "update_organization_settings" + ] + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "update_security_health_analytics_custom_module" + ] + }, + "UpdateSource": { + "methods": [ + "update_source" + ] + }, + "UpdateSecurityMarks": { + "methods": [ + "update_security_marks" + ] + }, + "CreateBigQueryExport": { + "methods": [ + "create_big_query_export" + ] + }, + "DeleteBigQueryExport": { + "methods": [ + "delete_big_query_export" + ] + }, + "UpdateBigQueryExport": { + "methods": [ + "update_big_query_export" + ] + }, + "ListBigQueryExports": { + "methods": [ + "list_big_query_exports" + ] + }, + "CreateEventThreatDetectionCustomModule": { + "methods": [ + "create_event_threat_detection_custom_module" + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "methods": [ + "delete_event_threat_detection_custom_module" + ] + }, + "GetEventThreatDetectionCustomModule": { + "methods": [ + "get_event_threat_detection_custom_module" + ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "methods": [ + "list_descendant_event_threat_detection_custom_modules" + ] + }, + "ListEventThreatDetectionCustomModules": { + "methods": [ + "list_event_threat_detection_custom_modules" + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "methods": [ + "update_event_threat_detection_custom_module" + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "methods": [ + "validate_event_threat_detection_custom_module" + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "methods": [ + "get_effective_event_threat_detection_custom_module" + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "methods": [ + "list_effective_event_threat_detection_custom_modules" + ] + }, + "BatchCreateResourceValueConfigs": { + "methods": [ + "batch_create_resource_value_configs" + ] + }, + "DeleteResourceValueConfig": { + "methods": [ + "delete_resource_value_config" + ] + }, + "GetResourceValueConfig": { + "methods": [ + "get_resource_value_config" + ] + }, + "ListResourceValueConfigs": { + "methods": [ + "list_resource_value_configs" + ] + }, + "UpdateResourceValueConfig": { + "methods": [ + "update_resource_value_config" + ] + }, + "ListValuedResources": { + "methods": [ + "list_valued_resources" + ] + }, + "ListAttackPaths": { + "methods": [ + "list_attack_paths" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec b/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec new file mode 100644 index 000000000000..2ea96cde071b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security_center/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security_center-v1" + gem.version = Google::Cloud::SecurityCenter::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Security Command Center API provides access to temporal views of assets and findings within an organization. Note that google-cloud-security_center-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details." + gem.summary = "Security Command Center API provides access to temporal views of assets and findings within an organization." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb new file mode 100644 index 000000000000..b1f8c90a70d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/security_center/v1" diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb new file mode 100644 index 000000000000..64e25fbd3ded --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center/v1/security_center" +require "google/cloud/security_center/v1/version" + +module Google + module Cloud + module SecurityCenter + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/security_center/v1" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/security_center/v1" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/security_center/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb new file mode 100644 index 000000000000..c11148195761 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center/v1/security_center/rest" +require "google/cloud/security_center/v1/version" + +module Google + module Cloud + module SecurityCenter + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/security_center/v1/rest" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb new file mode 100644 index 000000000000..20883d6fbc43 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center/v1/version" + +require "google/cloud/security_center/v1/security_center/credentials" +require "google/cloud/security_center/v1/security_center/paths" +require "google/cloud/security_center/v1/security_center/operations" +require "google/cloud/security_center/v1/security_center/client" +require "google/cloud/security_center/v1/security_center/rest" + +module Google + module Cloud + module SecurityCenter + module V1 + ## + # V1 APIs for Security Center service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/security_center/v1/security_center" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/security_center/v1/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + module SecurityCenter + end + end + end + end +end + +helper_path = ::File.join __dir__, "security_center", "helpers.rb" +require "google/cloud/security_center/v1/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb new file mode 100644 index 000000000000..23fb68a1046e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb @@ -0,0 +1,7460 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycenter/v1/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + ## + # Client for the SecurityCenter service. + # + # V1 APIs for Security Center service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_stub + + ## + # Configure the SecurityCenter Client class. + # + # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenter", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.create_source.timeout = 60.0 + + default_config.rpcs.create_finding.timeout = 60.0 + + default_config.rpcs.create_notification_config.timeout = 60.0 + + default_config.rpcs.delete_notification_config.timeout = 60.0 + + default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_notification_config.timeout = 60.0 + default_config.rpcs.get_notification_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_organization_settings.timeout = 60.0 + default_config.rpcs.get_organization_settings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_source.timeout = 60.0 + default_config.rpcs.get_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_assets.timeout = 480.0 + default_config.rpcs.group_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_findings.timeout = 480.0 + default_config.rpcs.group_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_assets.timeout = 480.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 480.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_notification_configs.timeout = 60.0 + default_config.rpcs.list_notification_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_sources.timeout = 60.0 + default_config.rpcs.list_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_asset_discovery.timeout = 60.0 + + default_config.rpcs.set_finding_state.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_finding.timeout = 60.0 + + default_config.rpcs.update_notification_config.timeout = 60.0 + + default_config.rpcs.update_organization_settings.timeout = 60.0 + + default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.update_source.timeout = 60.0 + + default_config.rpcs.update_security_marks.timeout = 480.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_stub.universe_domain + end + + ## + # Create a new SecurityCenter client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenter client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/securitycenter/v1/securitycenter_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @security_center_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @security_center_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_stub.logger + end + + # Service calls + + ## + # Kicks off an LRO to bulk mute findings for a parent based on a filter. The + # parent can be either an organization, folder or project. The findings + # matched by the filter will be muted after the LRO is done. + # + # @overload bulk_mute_findings(request, options = nil) + # Pass arguments to `bulk_mute_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil) + # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, at which bulk action needs to be applied. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param filter [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @param mute_annotation [::String] + # This can be a mute configuration name or any identifier for mute/unmute + # of findings based on the filter. + # @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new + # + # # Call the bulk_mute_findings method. + # result = client.bulk_mute_findings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_mute_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.bulk_mute_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_mute_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :bulk_mute_findings, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the + # given CRM parent, and also creates inherited + # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given + # parent. These modules are enabled by default. + # + # @overload create_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil) + # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new custom module's parent. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. SecurityHealthAnalytics custom module to create. The provided + # name is ignored and reset with provided parent information and + # server-generated ID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the create_security_health_analytics_custom_module method. + # result = client.create_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def create_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_source(parent: nil, source: nil) + # Pass arguments to `create_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def create_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a finding. The corresponding source must exist for finding creation + # to succeed. + # + # @overload create_finding(request, options = nil) + # Pass arguments to `create_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_finding(parent: nil, finding_id: nil, finding: nil) + # Pass arguments to `create_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new finding's parent. Its format should be + # `organizations/[organization_id]/sources/[source_id]`. + # @param finding_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def create_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a mute config. + # + # @overload create_mute_config(request, options = nil) + # Pass arguments to `create_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) + # Pass arguments to `create_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] + # Required. The mute config being created. + # @param mute_config_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new + # + # # Call the create_mute_config method. + # result = client.create_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def create_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification config. + # + # @overload create_notification_config(request, options = nil) + # Pass arguments to `create_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) + # Pass arguments to `create_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param config_id [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def create_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing mute config. + # + # @overload delete_mute_config(request, options = nil) + # Pass arguments to `delete_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_mute_config(name: nil) + # Pass arguments to `delete_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to delete. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new + # + # # Call the delete_mute_config method. + # result = client.delete_mute_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification config. + # + # @overload delete_notification_config(request, options = nil) + # Pass arguments to `delete_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_notification_config(name: nil) + # Pass arguments to `delete_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to delete. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new + # + # # Call the delete_notification_config method. + # result = client.delete_notification_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its + # descendants in the CRM hierarchy. This method is only supported for + # resident custom modules. + # + # @overload delete_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_security_health_analytics_custom_module(name: nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to delete. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the delete_security_health_analytics_custom_module method. + # result = client.delete_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the simulation by name or the latest simulation for the given + # organization. + # + # @overload get_simulation(request, options = nil) + # Pass arguments to `get_simulation` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_simulation(name: nil) + # Pass arguments to `get_simulation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Simulation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Simulation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new + # + # # Call the get_simulation method. + # result = client.get_simulation request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. + # p result + # + def get_simulation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_simulation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_simulation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_simulation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the valued resource by name + # + # @overload get_valued_resource(request, options = nil) + # Pass arguments to `get_valued_resource` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_valued_resource(name: nil) + # Pass arguments to `get_valued_resource` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new + # + # # Call the get_valued_resource method. + # result = client.get_valued_resource request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. + # p result + # + def get_valued_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_valued_resource.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_valued_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_valued_resource, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a BigQuery export. + # + # @overload get_big_query_export(request, options = nil) + # Pass arguments to `get_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_big_query_export(name: nil) + # Pass arguments to `get_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the BigQuery export to retrieve. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new + # + # # Call the get_big_query_export method. + # result = client.get_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def get_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy on the specified Source. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a mute config. + # + # @overload get_mute_config(request, options = nil) + # Pass arguments to `get_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_mute_config(name: nil) + # Pass arguments to `get_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to retrieve. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new + # + # # Call the get_mute_config method. + # result = client.get_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def get_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a notification config. + # + # @overload get_notification_config(request, options = nil) + # Pass arguments to `get_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_notification_config(name: nil) + # Pass arguments to `get_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to get. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def get_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the settings for an organization. + # + # @overload get_organization_settings(request, options = nil) + # Pass arguments to `get_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_organization_settings(name: nil) + # Pass arguments to `get_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the organization to get organization settings for. Its + # format is `organizations/[organization_id]/organizationSettings`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new + # + # # Call the get_organization_settings method. + # result = client.get_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + # p result + # + def get_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_organization_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + # + # @overload get_effective_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_effective_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the effective custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_effective_security_health_analytics_custom_module method. + # result = client.get_effective_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p result + # + def get_effective_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_effective_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a SecurityHealthAnalyticsCustomModule. + # + # @overload get_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_security_health_analytics_custom_module method. + # result = client.get_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def get_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_source(name: nil) + # Pass arguments to `get_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def get_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization's assets and groups them by their specified + # properties. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload group_assets(request, options = nil) + # Pass arguments to `group_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent to group the assets by. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param page_token [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new + # + # # Call the group_assets method. + # result = client.group_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + # p item + # end + # + def group_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.group_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.group_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.group_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :group_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings, + # /v1/folders/\\{folder_id}/sources/-/findings, + # /v1/projects/\\{project_id}/sources/-/findings + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source to groupBy. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + # or `projects/{project_id}/sources/-` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping + # (including `state_change`). The string value should follow SQL syntax: + # comma separated list of fields. For example: "parent,resource_name". + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param page_token [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new + # + # # Call the group_findings method. + # result = client.group_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + # p item + # end + # + def group_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.group_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.group_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.group_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :group_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization's assets. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource that contains the assets. The + # value that you can specify on parent depends on the method in which you + # specify parent. You can specify one of the following values: + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all resident SecurityHealthAnalyticsCustomModules under + # the given CRM parent and all of the parent’s CRM descendants. + # + # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list descendant custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_descendant_security_health_analytics_custom_modules method. + # result = client.list_descendant_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_descendant_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_descendant_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source the findings belong to. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To list across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-`, + # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists mute configs. + # + # @overload list_mute_configs(request, options = nil) + # Pass arguments to `list_mute_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mute_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new + # + # # Call the list_mute_configs method. + # result = client.list_mute_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. + # p item + # end + # + def list_mute_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_mute_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_mute_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_mute_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_mute_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists notification configs. + # + # @overload list_notification_configs(request, options = nil) + # Pass arguments to `list_notification_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_notification_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is "organizations/[organization_id]", + # "folders/[folder_id]", or "projects/[project_id]". + # @param page_token [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new + # + # # Call the list_notification_configs method. + # result = client.list_notification_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p item + # end + # + def list_notification_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_notification_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notification_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_notification_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + # given parent. This includes resident modules defined at the scope of the + # parent, and inherited modules, inherited from CRM ancestors. + # + # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list effective custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_effective_security_health_analytics_custom_modules method. + # result = client.list_effective_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_effective_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_effective_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all SecurityHealthAnalyticsCustomModules for the given + # parent. This includes resident modules defined at the scope of the parent, + # and inherited modules, inherited from CRM ancestors. + # + # @overload list_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_security_health_analytics_custom_modules method. + # result = client.list_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sources belonging to an organization. + # + # @overload list_sources(request, options = nil) + # Pass arguments to `list_sources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param page_token [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new + # + # # Call the list_sources method. + # result = client.list_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. + # p item + # end + # + def list_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload run_asset_discovery(request, options = nil) + # Pass arguments to `run_asset_discovery` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_asset_discovery(parent: nil) + # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to run asset discovery for. Its format + # is `organizations/[organization_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new + # + # # Call the run_asset_discovery method. + # result = client.run_asset_discovery request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_asset_discovery request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_asset_discovery.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_asset_discovery.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the state of a finding. + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_finding_state(name: nil, state: nil, start_time: nil) + # Pass arguments to `set_finding_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State] + # Required. The desired State of the finding. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The time at which the updated state takes effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def set_finding_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_finding_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_finding_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the mute state of a finding. + # + # @overload set_mute(request, options = nil) + # Pass arguments to `set_mute` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_mute(name: nil, mute: nil) + # Pass arguments to `set_mute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # Required. The desired state of the Mute. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new + # + # # Call the set_mute method. + # result = client.set_mute request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def set_mute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_mute.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_mute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_mute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_mute, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified Source. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has on the specified source. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + # + # @overload simulate_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [Relative + # Resource + # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # Example: `organizations/{organization_id}` + # @param custom_config [::Google::Cloud::SecurityCenter::V1::CustomConfig, ::Hash] + # Required. The custom configuration that you need to test. + # @param resource [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] + # Required. Resource data to simulate custom module against. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the simulate_security_health_analytics_custom_module method. + # result = client.simulate_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + # p result + # + def simulate_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :simulate_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates external system. This is for a given finding. + # + # @overload update_external_system(request, options = nil) + # Pass arguments to `update_external_system` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_external_system(external_system: nil, update_mask: nil) + # Pass arguments to `update_external_system` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash] + # Required. The external system resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new + # + # # Call the update_external_system method. + # result = client.update_external_system request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. + # p result + # + def update_external_system request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_external_system.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.external_system&.name + header_params["external_system.name"] = request.external_system.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_external_system.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_external_system, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + # + # @overload update_finding(request, options = nil) + # Pass arguments to `update_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_finding(finding: nil, update_mask: nil) + # Pass arguments to `update_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def update_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.finding&.name + header_params["finding.name"] = request.finding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a mute config. + # + # @overload update_mute_config(request, options = nil) + # Pass arguments to `update_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_mute_config(mute_config: nil, update_mask: nil) + # Pass arguments to `update_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] + # Required. The mute config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new + # + # # Call the update_mute_config method. + # result = client.update_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def update_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.mute_config&.name + header_params["mute_config.name"] = request.mute_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + # + # @overload update_notification_config(request, options = nil) + # Pass arguments to `update_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_notification_config(notification_config: nil, update_mask: nil) + # Pass arguments to `update_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] + # Required. The notification config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def update_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.notification_config&.name + header_params["notification_config.name"] = request.notification_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an organization's settings. + # + # @overload update_organization_settings(request, options = nil) + # Pass arguments to `update_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_organization_settings(organization_settings: nil, update_mask: nil) + # Pass arguments to `update_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash] + # Required. The organization settings resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new + # + # # Call the update_organization_settings method. + # result = client.update_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + # p result + # + def update_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.organization_settings&.name + header_params["organization_settings.name"] = request.organization_settings.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_organization_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the SecurityHealthAnalyticsCustomModule under the given name based + # on the given update mask. Updating the enablement state is supported on + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name and custom + # config of a module is supported on resident modules only. + # + # @overload update_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil) + # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. The SecurityHealthAnalytics custom module to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. The only fields that can be updated are + # `enablement_state` and `custom_config`. If empty or set to the wildcard + # value `*`, both `enablement_state` and `custom_config` are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the update_security_health_analytics_custom_module method. + # result = client.update_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def update_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.security_health_analytics_custom_module&.name + header_params["security_health_analytics_custom_module.name"] = request.security_health_analytics_custom_module.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_source(source: nil, update_mask: nil) + # Pass arguments to `update_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] + # Required. The source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def update_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.source&.name + header_params["source.name"] = request.source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates security marks. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) + # Pass arguments to `update_security_marks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash] + # Required. The security marks resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. Must be + # earlier or equal to the server time. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. + # p result + # + def update_security_marks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_security_marks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.security_marks&.name + header_params["security_marks.name"] = request.security_marks.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_marks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a BigQuery export. + # + # @overload create_big_query_export(request, options = nil) + # Pass arguments to `create_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) + # Pass arguments to `create_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] + # Required. The BigQuery export being created. + # @param big_query_export_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new + # + # # Call the create_big_query_export method. + # result = client.create_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def create_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing BigQuery export. + # + # @overload delete_big_query_export(request, options = nil) + # Pass arguments to `delete_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_big_query_export(name: nil) + # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the BigQuery export to delete. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new + # + # # Call the delete_big_query_export method. + # result = client.delete_big_query_export request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a BigQuery export. + # + # @overload update_big_query_export(request, options = nil) + # Pass arguments to `update_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_big_query_export(big_query_export: nil, update_mask: nil) + # Pass arguments to `update_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] + # Required. The BigQuery export being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new + # + # # Call the update_big_query_export method. + # result = client.update_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def update_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.big_query_export&.name + header_params["big_query_export.name"] = request.big_query_export.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + # + # @overload list_big_query_exports(request, options = nil) + # Pass arguments to `list_big_query_exports` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new + # + # # Call the list_big_query_exports method. + # result = client.list_big_query_exports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p item + # end + # + def list_big_query_exports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_big_query_exports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_big_query_exports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident Event Threat Detection custom module at the scope of the + # given Resource Manager parent, and also creates inherited custom modules + # for all descendants of the given parent. These modules are enabled by + # default. + # + # @overload create_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil) + # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The new custom module's parent. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module to create. The + # event_threat_detection_custom_module.name will be ignored and server + # generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new + # + # # Call the create_event_threat_detection_custom_module method. + # result = client.create_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def create_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified Event Threat Detection custom module and all of its + # descendants in the Resource Manager hierarchy. This method is only + # supported for resident custom modules. + # + # @overload delete_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_event_threat_detection_custom_module(name: nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to delete. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new + # + # # Call the delete_event_threat_detection_custom_module method. + # result = client.delete_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Event Threat Detection custom module. + # + # @overload get_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to get. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_event_threat_detection_custom_module method. + # result = client.get_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def get_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all resident Event Threat Detection custom modules under the + # given Resource Manager parent and its descendants. + # + # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDescendantEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_descendant_event_threat_detection_custom_modules method. + # result = client.list_descendant_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_descendant_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_descendant_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Event Threat Detection custom modules for the given + # Resource Manager parent. This includes resident modules defined at the + # scope of the parent along with modules inherited from ancestors. + # + # @overload list_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListEventThreatDetectionCustomModules` must match the call that provided + # the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_event_threat_detection_custom_modules method. + # result = client.list_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Event Threat Detection custom module with the given name based + # on the given update mask. Updating the enablement state is supported for + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name or + # configuration of a module is supported for resident modules only. The type + # of a module cannot be changed. + # + # @overload update_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil) + # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new + # + # # Call the update_event_threat_detection_custom_module method. + # result = client.update_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def update_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.event_threat_detection_custom_module&.name + header_params["event_threat_detection_custom_module.name"] = request.event_threat_detection_custom_module.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Validates the given Event Threat Detection custom module. + # + # @overload validate_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent to validate the Custom Module under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param raw_text [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @param type [::String] + # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new + # + # # Call the validate_event_threat_detection_custom_module method. + # result = client.validate_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. + # p result + # + def validate_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :validate_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an effective Event Threat Detection custom module at the given level. + # + # @overload get_effective_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_effective_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the effective Event Threat Detection custom + # module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_effective_event_threat_detection_custom_module method. + # result = client.get_effective_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + # p result + # + def get_effective_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_effective_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all effective Event Threat Detection custom modules for the + # given parent. This includes resident modules defined at the scope of the + # parent along with modules inherited from its ancestors. + # + # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules for. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListEffectiveEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_effective_event_threat_detection_custom_modules method. + # result = client.list_effective_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + # p item + # end + # + def list_effective_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_effective_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + # + # @overload batch_create_resource_value_configs(request, options = nil) + # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_create_resource_value_configs(parent: nil, requests: nil) + # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>] + # Required. The resource value configs to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new + # + # # Call the batch_create_resource_value_configs method. + # result = client.batch_create_resource_value_configs request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. + # p result + # + def batch_create_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :batch_create_resource_value_configs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a ResourceValueConfig. + # + # @overload delete_resource_value_config(request, options = nil) + # Pass arguments to `delete_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_resource_value_config(name: nil) + # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the ResourceValueConfig to delete + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new + # + # # Call the delete_resource_value_config method. + # result = client.delete_resource_value_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ResourceValueConfig. + # + # @overload get_resource_value_config(request, options = nil) + # Pass arguments to `get_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_resource_value_config(name: nil) + # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource value config to retrieve. Its format is + # `organizations/{organization}/resourceValueConfigs/{config_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new + # + # # Call the get_resource_value_config method. + # result = client.get_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p result + # + def get_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all ResourceValueConfigs. + # + # @overload list_resource_value_configs(request, options = nil) + # Pass arguments to `list_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @param page_size [::Integer] + # The number of results to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new + # + # # Call the list_resource_value_configs method. + # result = client.list_resource_value_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p item + # end + # + def list_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_resource_value_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing ResourceValueConfigs with new rules. + # + # @overload update_resource_value_config(request, options = nil) + # Pass arguments to `update_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) + # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash] + # Required. The resource value config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new + # + # # Call the update_resource_value_config method. + # result = client.update_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p result + # + def update_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_value_config&.name + header_params["resource_value_config.name"] = request.resource_value_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the valued resources for a set of simulation results and filter. + # + # @overload list_valued_resources(request, options = nil) + # Pass arguments to `list_valued_resources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) + # Pass arguments to `list_valued_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list valued resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @param filter [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @param page_token [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param order_by [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # * `resource` + # + # * `display_name` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + # example: `exposed_score DESC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new + # + # # Call the list_valued_resources method. + # result = client.list_valued_resources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. + # p item + # end + # + def list_valued_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_valued_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_valued_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_valued_resources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_valued_resources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + # + # @overload list_attack_paths(request, options = nil) + # Pass arguments to `list_attack_paths` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_attack_paths` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @param filter [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @param page_token [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new + # + # # Call the list_attack_paths method. + # result = client.list_attack_paths request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. + # p item + # end + # + def list_attack_paths request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_attack_paths.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_attack_paths.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_attack_paths, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_attack_paths, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenter API. + # + # This class represents the configuration for SecurityCenter, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # bulk_mute_findings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.bulk_mute_findings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.bulk_mute_findings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SecurityCenter API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `bulk_mute_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_mute_findings + ## + # RPC-specific configuration for `create_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_security_health_analytics_custom_module + ## + # RPC-specific configuration for `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `create_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_finding + ## + # RPC-specific configuration for `create_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_mute_config + ## + # RPC-specific configuration for `create_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_config + ## + # RPC-specific configuration for `delete_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_mute_config + ## + # RPC-specific configuration for `delete_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_config + ## + # RPC-specific configuration for `delete_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_simulation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_simulation + ## + # RPC-specific configuration for `get_valued_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :get_valued_resource + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mute_config + ## + # RPC-specific configuration for `get_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_config + ## + # RPC-specific configuration for `get_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_settings + ## + # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :group_assets + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_mute_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mute_configs + ## + # RPC-specific configuration for `list_notification_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_configs + ## + # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `run_asset_discovery` + # @return [::Gapic::Config::Method] + # + attr_reader :run_asset_discovery + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_mute` + # @return [::Gapic::Config::Method] + # + attr_reader :set_mute + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `simulate_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :simulate_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_external_system` + # @return [::Gapic::Config::Method] + # + attr_reader :update_external_system + ## + # RPC-specific configuration for `update_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_finding + ## + # RPC-specific configuration for `update_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_mute_config + ## + # RPC-specific configuration for `update_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_config + ## + # RPC-specific configuration for `update_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_organization_settings + ## + # RPC-specific configuration for `update_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + ## + # RPC-specific configuration for `create_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :create_big_query_export + ## + # RPC-specific configuration for `delete_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_big_query_export + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # RPC-specific configuration for `list_big_query_exports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_big_query_exports + ## + # RPC-specific configuration for `create_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_event_threat_detection_custom_module + ## + # RPC-specific configuration for `delete_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `list_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `update_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_event_threat_detection_custom_module + ## + # RPC-specific configuration for `validate_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :validate_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `batch_create_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_resource_value_configs + ## + # RPC-specific configuration for `delete_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_value_config + ## + # RPC-specific configuration for `get_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_value_config + ## + # RPC-specific configuration for `list_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_value_configs + ## + # RPC-specific configuration for `update_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_value_config + ## + # RPC-specific configuration for `list_valued_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_valued_resources + ## + # RPC-specific configuration for `list_attack_paths` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attack_paths + + # @private + def initialize parent_rpcs = nil + bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings + @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config + create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module + @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_config + create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding + @create_finding = ::Gapic::Config::Method.new create_finding_config + create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config + @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config + create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config + @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config + delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config + @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config + delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config + @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config + delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module + @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config + get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation + @get_simulation = ::Gapic::Config::Method.new get_simulation_config + get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource + @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config + get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export + @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config + @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config + get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config + @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config + get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings + @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config + get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module + @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config + get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module + @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_config + group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets + @group_assets = ::Gapic::Config::Method.new group_assets_config + group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings + @group_findings = ::Gapic::Config::Method.new group_findings_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules + @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs + @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config + list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs + @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config + list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules + @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config + list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules + @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_config + run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery + @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config + set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state + @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config + set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute + @set_mute = ::Gapic::Config::Method.new set_mute_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module + @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config + update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system + @update_external_system = ::Gapic::Config::Method.new update_external_system_config + update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding + @update_finding = ::Gapic::Config::Method.new update_finding_config + update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config + @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config + update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config + @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config + update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings + @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config + update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module + @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_config + update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks + @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config + create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export + @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config + delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export + @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config + update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export + @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config + list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports + @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config + create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module + @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config + delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module + @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config + get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module + @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config + list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules + @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config + list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules + @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config + update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module + @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config + validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module + @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config + get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module + @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config + list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules + @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config + batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs + @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config + delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config + @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config + get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config + @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config + list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs + @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config + update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config + @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config + list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources + @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config + list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths + @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb new file mode 100644 index 000000000000..4bb0187caca1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + # Credentials for the SecurityCenter API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SECURITY_CENTER_CREDENTIALS", + "SECURITY_CENTER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SECURITY_CENTER_CREDENTIALS_JSON", + "SECURITY_CENTER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb new file mode 100644 index 000000000000..178841746c30 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecurityCenter Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb new file mode 100644 index 000000000000..74f6066a7b65 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb @@ -0,0 +1,1127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + # Path helper methods for the SecurityCenter API. + module Paths + ## + # Create a fully-qualified BigQueryExport resource string. + # + # @overload big_query_export_path(organization:, export:) + # The resource will be in the following format: + # + # `organizations/{organization}/bigQueryExports/{export}` + # + # @param organization [String] + # @param export [String] + # + # @overload big_query_export_path(folder:, export:) + # The resource will be in the following format: + # + # `folders/{folder}/bigQueryExports/{export}` + # + # @param folder [String] + # @param export [String] + # + # @overload big_query_export_path(project:, export:) + # The resource will be in the following format: + # + # `projects/{project}/bigQueryExports/{export}` + # + # @param project [String] + # @param export [String] + # + # @return [::String] + def big_query_export_path **args + resources = { + "export:organization" => (proc do |organization:, export:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/bigQueryExports/#{export}" + end), + "export:folder" => (proc do |folder:, export:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/bigQueryExports/#{export}" + end), + "export:project" => (proc do |project:, export:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/bigQueryExports/#{export}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified DlpJob resource string. + # + # @overload dlp_job_path(project:, dlp_job:) + # The resource will be in the following format: + # + # `projects/{project}/dlpJobs/{dlp_job}` + # + # @param project [String] + # @param dlp_job [String] + # + # @overload dlp_job_path(project:, location:, dlp_job:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dlpJobs/{dlp_job}` + # + # @param project [String] + # @param location [String] + # @param dlp_job [String] + # + # @return [::String] + def dlp_job_path **args + resources = { + "dlp_job:project" => (proc do |project:, dlp_job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/dlpJobs/#{dlp_job}" + end), + "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EffectiveEventThreatDetectionCustomModule resource string. + # + # @overload effective_event_threat_detection_custom_module_path(organization:, module:) + # The resource will be in the following format: + # + # `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}` + # + # @param organization [String] + # @param module [String] + # + # @overload effective_event_threat_detection_custom_module_path(folder:, module:) + # The resource will be in the following format: + # + # `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}` + # + # @param folder [String] + # @param module [String] + # + # @overload effective_event_threat_detection_custom_module_path(project:, module:) + # The resource will be in the following format: + # + # `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}` + # + # @param project [String] + # @param module [String] + # + # @return [::String] + def effective_event_threat_detection_custom_module_path **args + resources = { + "module:organization" => (proc do |organization:, module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" + end), + "folder:module" => (proc do |folder:, module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" + end), + "module:project" => (proc do |project:, module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EffectiveSecurityHealthAnalyticsCustomModule resource string. + # + # @overload effective_security_health_analytics_custom_module_path(organization:, effective_custom_module:) + # The resource will be in the following format: + # + # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` + # + # @param organization [String] + # @param effective_custom_module [String] + # + # @overload effective_security_health_analytics_custom_module_path(folder:, effective_custom_module:) + # The resource will be in the following format: + # + # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` + # + # @param folder [String] + # @param effective_custom_module [String] + # + # @overload effective_security_health_analytics_custom_module_path(project:, effective_custom_module:) + # The resource will be in the following format: + # + # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` + # + # @param project [String] + # @param effective_custom_module [String] + # + # @return [::String] + def effective_security_health_analytics_custom_module_path **args + resources = { + "effective_custom_module:organization" => (proc do |organization:, effective_custom_module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" + end), + "effective_custom_module:folder" => (proc do |folder:, effective_custom_module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" + end), + "effective_custom_module:project" => (proc do |project:, effective_custom_module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EventThreatDetectionCustomModule resource string. + # + # @overload event_threat_detection_custom_module_path(organization:, module:) + # The resource will be in the following format: + # + # `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}` + # + # @param organization [String] + # @param module [String] + # + # @overload event_threat_detection_custom_module_path(folder:, module:) + # The resource will be in the following format: + # + # `folders/{folder}/eventThreatDetectionSettings/customModules/{module}` + # + # @param folder [String] + # @param module [String] + # + # @overload event_threat_detection_custom_module_path(project:, module:) + # The resource will be in the following format: + # + # `projects/{project}/eventThreatDetectionSettings/customModules/{module}` + # + # @param project [String] + # @param module [String] + # + # @return [::String] + def event_threat_detection_custom_module_path **args + resources = { + "module:organization" => (proc do |organization:, module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" + end), + "folder:module" => (proc do |folder:, module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" + end), + "module:project" => (proc do |project:, module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EventThreatDetectionSettings resource string. + # + # @overload event_threat_detection_settings_path(organization:) + # The resource will be in the following format: + # + # `organizations/{organization}/eventThreatDetectionSettings` + # + # @param organization [String] + # + # @overload event_threat_detection_settings_path(folder:) + # The resource will be in the following format: + # + # `folders/{folder}/eventThreatDetectionSettings` + # + # @param folder [String] + # + # @overload event_threat_detection_settings_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/eventThreatDetectionSettings` + # + # @param project [String] + # + # @return [::String] + def event_threat_detection_settings_path **args + resources = { + "organization" => (proc do |organization:| + "organizations/#{organization}/eventThreatDetectionSettings" + end), + "folder" => (proc do |folder:| + "folders/#{folder}/eventThreatDetectionSettings" + end), + "project" => (proc do |project:| + "projects/#{project}/eventThreatDetectionSettings" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified ExternalSystem resource string. + # + # @overload external_system_path(organization:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(folder:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(project:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @return [::String] + def external_system_path **args + resources = { + "externalsystem:finding:organization:source" => (proc do |organization:, source:, finding:, externalsystem:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:folder:source" => (proc do |folder:, source:, finding:, externalsystem:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:project:source" => (proc do |project:, source:, finding:, externalsystem:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Finding resource string. + # + # @overload finding_path(organization:, source:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(folder:, source:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(project:, source:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # + # @return [::String] + def finding_path **args + resources = { + "finding:organization:source" => (proc do |organization:, source:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}" + end), + "finding:folder:source" => (proc do |folder:, source:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}" + end), + "finding:project:source" => (proc do |project:, source:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Folder resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}` + # + # @param folder [String] + # + # @return [::String] + def folder_path folder: + "folders/#{folder}" + end + + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified MuteConfig resource string. + # + # @overload mute_config_path(organization:, mute_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/muteConfigs/{mute_config}` + # + # @param organization [String] + # @param mute_config [String] + # + # @overload mute_config_path(folder:, mute_config:) + # The resource will be in the following format: + # + # `folders/{folder}/muteConfigs/{mute_config}` + # + # @param folder [String] + # @param mute_config [String] + # + # @overload mute_config_path(project:, mute_config:) + # The resource will be in the following format: + # + # `projects/{project}/muteConfigs/{mute_config}` + # + # @param project [String] + # @param mute_config [String] + # + # @overload mute_config_path(organization:, location:, mute_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/muteConfigs/{mute_config}` + # + # @param organization [String] + # @param location [String] + # @param mute_config [String] + # + # @overload mute_config_path(folder:, location:, mute_config:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + # + # @param folder [String] + # @param location [String] + # @param mute_config [String] + # + # @overload mute_config_path(project:, location:, mute_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/muteConfigs/{mute_config}` + # + # @param project [String] + # @param location [String] + # @param mute_config [String] + # + # @return [::String] + def mute_config_path **args + resources = { + "mute_config:organization" => (proc do |organization:, mute_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/muteConfigs/#{mute_config}" + end), + "folder:mute_config" => (proc do |folder:, mute_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/muteConfigs/#{mute_config}" + end), + "mute_config:project" => (proc do |project:, mute_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/muteConfigs/#{mute_config}" + end), + "location:mute_config:organization" => (proc do |organization:, location:, mute_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/muteConfigs/#{mute_config}" + end), + "folder:location:mute_config" => (proc do |folder:, location:, mute_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/muteConfigs/#{mute_config}" + end), + "location:mute_config:project" => (proc do |project:, location:, mute_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/muteConfigs/#{mute_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified NotificationConfig resource string. + # + # @overload notification_config_path(organization:, notification_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/notificationConfigs/{notification_config}` + # + # @param organization [String] + # @param notification_config [String] + # + # @overload notification_config_path(folder:, notification_config:) + # The resource will be in the following format: + # + # `folders/{folder}/notificationConfigs/{notification_config}` + # + # @param folder [String] + # @param notification_config [String] + # + # @overload notification_config_path(project:, notification_config:) + # The resource will be in the following format: + # + # `projects/{project}/notificationConfigs/{notification_config}` + # + # @param project [String] + # @param notification_config [String] + # + # @return [::String] + def notification_config_path **args + resources = { + "notification_config:organization" => (proc do |organization:, notification_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/notificationConfigs/#{notification_config}" + end), + "folder:notification_config" => (proc do |folder:, notification_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/notificationConfigs/#{notification_config}" + end), + "notification_config:project" => (proc do |project:, notification_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/notificationConfigs/#{notification_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Organization resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}` + # + # @param organization [String] + # + # @return [::String] + def organization_path organization: + "organizations/#{organization}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationSettings resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/organizationSettings` + # + # @param organization [String] + # + # @return [::String] + def organization_settings_path organization: + "organizations/#{organization}/organizationSettings" + end + + ## + # Create a fully-qualified OrganizationSimulation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}` + # + # @param organization [String] + # @param simulation [String] + # + # @return [::String] + def organization_simulation_path organization:, simulation: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}" + end + + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(organization:, constraint_name:) + # The resource will be in the following format: + # + # `organizations/{organization}/policies/{constraint_name}` + # + # @param organization [String] + # @param constraint_name [String] + # + # @overload policy_path(folder:, constraint_name:) + # The resource will be in the following format: + # + # `folders/{folder}/policies/{constraint_name}` + # + # @param folder [String] + # @param constraint_name [String] + # + # @overload policy_path(project:, constraint_name:) + # The resource will be in the following format: + # + # `projects/{project}/policies/{constraint_name}` + # + # @param project [String] + # @param constraint_name [String] + # + # @return [::String] + def policy_path **args + resources = { + "constraint_name:organization" => (proc do |organization:, constraint_name:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/policies/#{constraint_name}" + end), + "constraint_name:folder" => (proc do |folder:, constraint_name:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/policies/#{constraint_name}" + end), + "constraint_name:project" => (proc do |project:, constraint_name:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/policies/#{constraint_name}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified ResourceValueConfig resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/resourceValueConfigs/{resource_value_config}` + # + # @param organization [String] + # @param resource_value_config [String] + # + # @return [::String] + def resource_value_config_path organization:, resource_value_config: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" + end + + ## + # Create a fully-qualified SecurityHealthAnalyticsCustomModule resource string. + # + # @overload security_health_analytics_custom_module_path(organization:, custom_module:) + # The resource will be in the following format: + # + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{custom_module}` + # + # @param organization [String] + # @param custom_module [String] + # + # @overload security_health_analytics_custom_module_path(folder:, custom_module:) + # The resource will be in the following format: + # + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{custom_module}` + # + # @param folder [String] + # @param custom_module [String] + # + # @overload security_health_analytics_custom_module_path(project:, custom_module:) + # The resource will be in the following format: + # + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{custom_module}` + # + # @param project [String] + # @param custom_module [String] + # + # @return [::String] + def security_health_analytics_custom_module_path **args + resources = { + "custom_module:organization" => (proc do |organization:, custom_module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/securityHealthAnalyticsSettings/customModules/#{custom_module}" + end), + "custom_module:folder" => (proc do |folder:, custom_module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/securityHealthAnalyticsSettings/customModules/#{custom_module}" + end), + "custom_module:project" => (proc do |project:, custom_module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/securityHealthAnalyticsSettings/customModules/#{custom_module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SecurityHealthAnalyticsSettings resource string. + # + # @overload security_health_analytics_settings_path(organization:) + # The resource will be in the following format: + # + # `organizations/{organization}/securityHealthAnalyticsSettings` + # + # @param organization [String] + # + # @overload security_health_analytics_settings_path(folder:) + # The resource will be in the following format: + # + # `folders/{folder}/securityHealthAnalyticsSettings` + # + # @param folder [String] + # + # @overload security_health_analytics_settings_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/securityHealthAnalyticsSettings` + # + # @param project [String] + # + # @return [::String] + def security_health_analytics_settings_path **args + resources = { + "organization" => (proc do |organization:| + "organizations/#{organization}/securityHealthAnalyticsSettings" + end), + "folder" => (proc do |folder:| + "folders/#{folder}/securityHealthAnalyticsSettings" + end), + "project" => (proc do |project:| + "projects/#{project}/securityHealthAnalyticsSettings" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SecurityMarks resource string. + # + # @overload security_marks_path(organization:, asset:) + # The resource will be in the following format: + # + # `organizations/{organization}/assets/{asset}/securityMarks` + # + # @param organization [String] + # @param asset [String] + # + # @overload security_marks_path(organization:, source:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(folder:, asset:) + # The resource will be in the following format: + # + # `folders/{folder}/assets/{asset}/securityMarks` + # + # @param folder [String] + # @param asset [String] + # + # @overload security_marks_path(project:, asset:) + # The resource will be in the following format: + # + # `projects/{project}/assets/{asset}/securityMarks` + # + # @param project [String] + # @param asset [String] + # + # @overload security_marks_path(folder:, source:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}/securityMarks` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(project:, source:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}/securityMarks` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # + # @return [::String] + def security_marks_path **args + resources = { + "asset:organization" => (proc do |organization:, asset:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/assets/#{asset}/securityMarks" + end), + "finding:organization:source" => (proc do |organization:, source:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "asset:folder" => (proc do |folder:, asset:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/assets/#{asset}/securityMarks" + end), + "asset:project" => (proc do |project:, asset:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/assets/#{asset}/securityMarks" + end), + "finding:folder:source" => (proc do |folder:, source:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "finding:project:source" => (proc do |project:, source:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Simulation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}` + # + # @param organization [String] + # @param simulation [String] + # + # @return [::String] + def simulation_path organization:, simulation: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}" + end + + ## + # Create a fully-qualified Source resource string. + # + # @overload source_path(organization:, source:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}` + # + # @param organization [String] + # @param source [String] + # + # @overload source_path(folder:, source:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}` + # + # @param folder [String] + # @param source [String] + # + # @overload source_path(project:, source:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}` + # + # @param project [String] + # @param source [String] + # + # @return [::String] + def source_path **args + resources = { + "organization:source" => (proc do |organization:, source:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}" + end), + "folder:source" => (proc do |folder:, source:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/sources/#{source}" + end), + "project:source" => (proc do |project:, source:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/sources/#{source}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified TableDataProfile resource string. + # + # @overload table_data_profile_path(project:, table_profile:) + # The resource will be in the following format: + # + # `projects/{project}/tableProfiles/{table_profile}` + # + # @param project [String] + # @param table_profile [String] + # + # @overload table_data_profile_path(project:, location:, table_profile:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/tableProfiles/{table_profile}` + # + # @param project [String] + # @param location [String] + # @param table_profile [String] + # + # @return [::String] + def table_data_profile_path **args + resources = { + "project:table_profile" => (proc do |project:, table_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/tableProfiles/#{table_profile}" + end), + "location:project:table_profile" => (proc do |project:, location:, table_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/tableProfiles/#{table_profile}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + ## + # Create a fully-qualified ValuedResource resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # + # @param organization [String] + # @param simulation [String] + # @param valued_resource [String] + # + # @return [::String] + def valued_resource_path organization:, simulation:, valued_resource: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}/valuedResources/#{valued_resource}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb new file mode 100644 index 000000000000..9148bffe706d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center/v1/version" + +require "google/cloud/security_center/v1/security_center/credentials" +require "google/cloud/security_center/v1/security_center/paths" +require "google/cloud/security_center/v1/security_center/rest/operations" +require "google/cloud/security_center/v1/security_center/rest/client" + +module Google + module Cloud + module SecurityCenter + module V1 + ## + # V1 APIs for Security Center service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/security_center/v1/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + module SecurityCenter + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/security_center/v1/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb new file mode 100644 index 000000000000..f6a0a8b930bb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb @@ -0,0 +1,6970 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycenter/v1/securitycenter_service_pb" +require "google/cloud/security_center/v1/security_center/rest/service_stub" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + module Rest + ## + # REST client for the SecurityCenter service. + # + # V1 APIs for Security Center service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_stub + + ## + # Configure the SecurityCenter Client class. + # + # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenter", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.create_source.timeout = 60.0 + + default_config.rpcs.create_finding.timeout = 60.0 + + default_config.rpcs.create_notification_config.timeout = 60.0 + + default_config.rpcs.delete_notification_config.timeout = 60.0 + + default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_notification_config.timeout = 60.0 + default_config.rpcs.get_notification_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_organization_settings.timeout = 60.0 + default_config.rpcs.get_organization_settings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_source.timeout = 60.0 + default_config.rpcs.get_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_assets.timeout = 480.0 + default_config.rpcs.group_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_findings.timeout = 480.0 + default_config.rpcs.group_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_assets.timeout = 480.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 480.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_notification_configs.timeout = 60.0 + default_config.rpcs.list_notification_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_sources.timeout = 60.0 + default_config.rpcs.list_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_asset_discovery.timeout = 60.0 + + default_config.rpcs.set_finding_state.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_finding.timeout = 60.0 + + default_config.rpcs.update_notification_config.timeout = 60.0 + + default_config.rpcs.update_organization_settings.timeout = 60.0 + + default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.update_source.timeout = 60.0 + + default_config.rpcs.update_security_marks.timeout = 480.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_stub.universe_domain + end + + ## + # Create a new SecurityCenter REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenter client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @security_center_stub = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @security_center_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_stub.logger + end + + # Service calls + + ## + # Kicks off an LRO to bulk mute findings for a parent based on a filter. The + # parent can be either an organization, folder or project. The findings + # matched by the filter will be muted after the LRO is done. + # + # @overload bulk_mute_findings(request, options = nil) + # Pass arguments to `bulk_mute_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil) + # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, at which bulk action needs to be applied. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param filter [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @param mute_annotation [::String] + # This can be a mute configuration name or any identifier for mute/unmute + # of findings based on the filter. + # @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new + # + # # Call the bulk_mute_findings method. + # result = client.bulk_mute_findings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_mute_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.bulk_mute_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_mute_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.bulk_mute_findings request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the + # given CRM parent, and also creates inherited + # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given + # parent. These modules are enabled by default. + # + # @overload create_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil) + # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new custom module's parent. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. SecurityHealthAnalytics custom module to create. The provided + # name is ignored and reset with provided parent information and + # server-generated ID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the create_security_health_analytics_custom_module method. + # result = client.create_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def create_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_source(parent: nil, source: nil) + # Pass arguments to `create_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def create_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a finding. The corresponding source must exist for finding creation + # to succeed. + # + # @overload create_finding(request, options = nil) + # Pass arguments to `create_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_finding(parent: nil, finding_id: nil, finding: nil) + # Pass arguments to `create_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new finding's parent. Its format should be + # `organizations/[organization_id]/sources/[source_id]`. + # @param finding_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def create_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a mute config. + # + # @overload create_mute_config(request, options = nil) + # Pass arguments to `create_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) + # Pass arguments to `create_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] + # Required. The mute config being created. + # @param mute_config_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new + # + # # Call the create_mute_config method. + # result = client.create_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def create_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification config. + # + # @overload create_notification_config(request, options = nil) + # Pass arguments to `create_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) + # Pass arguments to `create_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param config_id [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def create_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing mute config. + # + # @overload delete_mute_config(request, options = nil) + # Pass arguments to `delete_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_mute_config(name: nil) + # Pass arguments to `delete_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to delete. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new + # + # # Call the delete_mute_config method. + # result = client.delete_mute_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification config. + # + # @overload delete_notification_config(request, options = nil) + # Pass arguments to `delete_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_notification_config(name: nil) + # Pass arguments to `delete_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to delete. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new + # + # # Call the delete_notification_config method. + # result = client.delete_notification_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its + # descendants in the CRM hierarchy. This method is only supported for + # resident custom modules. + # + # @overload delete_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_security_health_analytics_custom_module(name: nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to delete. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the delete_security_health_analytics_custom_module method. + # result = client.delete_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the simulation by name or the latest simulation for the given + # organization. + # + # @overload get_simulation(request, options = nil) + # Pass arguments to `get_simulation` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_simulation(name: nil) + # Pass arguments to `get_simulation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Simulation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new + # + # # Call the get_simulation method. + # result = client.get_simulation request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. + # p result + # + def get_simulation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_simulation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_simulation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_simulation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the valued resource by name + # + # @overload get_valued_resource(request, options = nil) + # Pass arguments to `get_valued_resource` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_valued_resource(name: nil) + # Pass arguments to `get_valued_resource` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new + # + # # Call the get_valued_resource method. + # result = client.get_valued_resource request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. + # p result + # + def get_valued_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_valued_resource.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_valued_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_valued_resource request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a BigQuery export. + # + # @overload get_big_query_export(request, options = nil) + # Pass arguments to `get_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_big_query_export(name: nil) + # Pass arguments to `get_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the BigQuery export to retrieve. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new + # + # # Call the get_big_query_export method. + # result = client.get_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def get_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy on the specified Source. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a mute config. + # + # @overload get_mute_config(request, options = nil) + # Pass arguments to `get_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_mute_config(name: nil) + # Pass arguments to `get_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to retrieve. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new + # + # # Call the get_mute_config method. + # result = client.get_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def get_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a notification config. + # + # @overload get_notification_config(request, options = nil) + # Pass arguments to `get_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_notification_config(name: nil) + # Pass arguments to `get_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to get. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def get_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the settings for an organization. + # + # @overload get_organization_settings(request, options = nil) + # Pass arguments to `get_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_organization_settings(name: nil) + # Pass arguments to `get_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the organization to get organization settings for. Its + # format is `organizations/[organization_id]/organizationSettings`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new + # + # # Call the get_organization_settings method. + # result = client.get_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + # p result + # + def get_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_organization_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + # + # @overload get_effective_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_effective_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the effective custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_effective_security_health_analytics_custom_module method. + # result = client.get_effective_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p result + # + def get_effective_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a SecurityHealthAnalyticsCustomModule. + # + # @overload get_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_security_health_analytics_custom_module method. + # result = client.get_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def get_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_source(name: nil) + # Pass arguments to `get_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def get_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization's assets and groups them by their specified + # properties. + # + # @overload group_assets(request, options = nil) + # Pass arguments to `group_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent to group the assets by. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param page_token [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new + # + # # Call the group_assets method. + # result = client.group_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + # p item + # end + # + def group_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.group_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.group_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.group_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.group_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_assets, "group_by_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings, + # /v1/folders/\\{folder_id}/sources/-/findings, + # /v1/projects/\\{project_id}/sources/-/findings + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source to groupBy. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + # or `projects/{project_id}/sources/-` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping + # (including `state_change`). The string value should follow SQL syntax: + # comma separated list of fields. For example: "parent,resource_name". + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param page_token [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new + # + # # Call the group_findings method. + # result = client.group_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + # p item + # end + # + def group_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.group_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.group_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.group_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.group_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization's assets. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource that contains the assets. The + # value that you can specify on parent depends on the method in which you + # specify parent. You can specify one of the following values: + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_assets, "list_assets_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all resident SecurityHealthAnalyticsCustomModules under + # the given CRM parent and all of the parent’s CRM descendants. + # + # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list descendant custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_descendant_security_health_analytics_custom_modules method. + # result = client.list_descendant_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_descendant_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source the findings belong to. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To list across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-`, + # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists mute configs. + # + # @overload list_mute_configs(request, options = nil) + # Pass arguments to `list_mute_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mute_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new + # + # # Call the list_mute_configs method. + # result = client.list_mute_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. + # p item + # end + # + def list_mute_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_mute_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_mute_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_mute_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists notification configs. + # + # @overload list_notification_configs(request, options = nil) + # Pass arguments to `list_notification_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_notification_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is "organizations/[organization_id]", + # "folders/[folder_id]", or "projects/[project_id]". + # @param page_token [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new + # + # # Call the list_notification_configs method. + # result = client.list_notification_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p item + # end + # + def list_notification_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_notification_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_notification_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_notification_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + # given parent. This includes resident modules defined at the scope of the + # parent, and inherited modules, inherited from CRM ancestors. + # + # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list effective custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_effective_security_health_analytics_custom_modules method. + # result = client.list_effective_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_effective_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all SecurityHealthAnalyticsCustomModules for the given + # parent. This includes resident modules defined at the scope of the parent, + # and inherited modules, inherited from CRM ancestors. + # + # @overload list_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_security_health_analytics_custom_modules method. + # result = client.list_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sources belonging to an organization. + # + # @overload list_sources(request, options = nil) + # Pass arguments to `list_sources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param page_token [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new + # + # # Call the list_sources method. + # result = client.list_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. + # p item + # end + # + def list_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + # + # @overload run_asset_discovery(request, options = nil) + # Pass arguments to `run_asset_discovery` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_asset_discovery(parent: nil) + # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to run asset discovery for. Its format + # is `organizations/[organization_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new + # + # # Call the run_asset_discovery method. + # result = client.run_asset_discovery request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_asset_discovery request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_asset_discovery.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_asset_discovery.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.run_asset_discovery request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the state of a finding. + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_finding_state(name: nil, state: nil, start_time: nil) + # Pass arguments to `set_finding_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State] + # Required. The desired State of the finding. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The time at which the updated state takes effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def set_finding_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_finding_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_finding_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_finding_state request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the mute state of a finding. + # + # @overload set_mute(request, options = nil) + # Pass arguments to `set_mute` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_mute(name: nil, mute: nil) + # Pass arguments to `set_mute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # Required. The desired state of the Mute. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new + # + # # Call the set_mute method. + # result = client.set_mute request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def set_mute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_mute.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_mute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_mute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_mute request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified Source. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has on the specified source. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + # + # @overload simulate_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [Relative + # Resource + # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # Example: `organizations/{organization_id}` + # @param custom_config [::Google::Cloud::SecurityCenter::V1::CustomConfig, ::Hash] + # Required. The custom configuration that you need to test. + # @param resource [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] + # Required. Resource data to simulate custom module against. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the simulate_security_health_analytics_custom_module method. + # result = client.simulate_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + # p result + # + def simulate_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.simulate_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates external system. This is for a given finding. + # + # @overload update_external_system(request, options = nil) + # Pass arguments to `update_external_system` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_external_system(external_system: nil, update_mask: nil) + # Pass arguments to `update_external_system` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash] + # Required. The external system resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new + # + # # Call the update_external_system method. + # result = client.update_external_system request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. + # p result + # + def update_external_system request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_external_system.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_external_system.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_external_system request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + # + # @overload update_finding(request, options = nil) + # Pass arguments to `update_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_finding(finding: nil, update_mask: nil) + # Pass arguments to `update_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def update_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a mute config. + # + # @overload update_mute_config(request, options = nil) + # Pass arguments to `update_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_mute_config(mute_config: nil, update_mask: nil) + # Pass arguments to `update_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] + # Required. The mute config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new + # + # # Call the update_mute_config method. + # result = client.update_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def update_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + # + # @overload update_notification_config(request, options = nil) + # Pass arguments to `update_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_notification_config(notification_config: nil, update_mask: nil) + # Pass arguments to `update_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] + # Required. The notification config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def update_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an organization's settings. + # + # @overload update_organization_settings(request, options = nil) + # Pass arguments to `update_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_organization_settings(organization_settings: nil, update_mask: nil) + # Pass arguments to `update_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash] + # Required. The organization settings resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new + # + # # Call the update_organization_settings method. + # result = client.update_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + # p result + # + def update_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_organization_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the SecurityHealthAnalyticsCustomModule under the given name based + # on the given update mask. Updating the enablement state is supported on + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name and custom + # config of a module is supported on resident modules only. + # + # @overload update_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil) + # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. The SecurityHealthAnalytics custom module to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. The only fields that can be updated are + # `enablement_state` and `custom_config`. If empty or set to the wildcard + # value `*`, both `enablement_state` and `custom_config` are updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the update_security_health_analytics_custom_module method. + # result = client.update_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def update_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_source(source: nil, update_mask: nil) + # Pass arguments to `update_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] + # Required. The source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def update_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates security marks. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) + # Pass arguments to `update_security_marks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash] + # Required. The security marks resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. Must be + # earlier or equal to the server time. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. + # p result + # + def update_security_marks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_security_marks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_marks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_security_marks request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a BigQuery export. + # + # @overload create_big_query_export(request, options = nil) + # Pass arguments to `create_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) + # Pass arguments to `create_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] + # Required. The BigQuery export being created. + # @param big_query_export_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new + # + # # Call the create_big_query_export method. + # result = client.create_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def create_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing BigQuery export. + # + # @overload delete_big_query_export(request, options = nil) + # Pass arguments to `delete_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_big_query_export(name: nil) + # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the BigQuery export to delete. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new + # + # # Call the delete_big_query_export method. + # result = client.delete_big_query_export request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a BigQuery export. + # + # @overload update_big_query_export(request, options = nil) + # Pass arguments to `update_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_big_query_export(big_query_export: nil, update_mask: nil) + # Pass arguments to `update_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] + # Required. The BigQuery export being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new + # + # # Call the update_big_query_export method. + # result = client.update_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def update_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + # + # @overload list_big_query_exports(request, options = nil) + # Pass arguments to `list_big_query_exports` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new + # + # # Call the list_big_query_exports method. + # result = client.list_big_query_exports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p item + # end + # + def list_big_query_exports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_big_query_exports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_big_query_exports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_big_query_exports request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident Event Threat Detection custom module at the scope of the + # given Resource Manager parent, and also creates inherited custom modules + # for all descendants of the given parent. These modules are enabled by + # default. + # + # @overload create_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil) + # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The new custom module's parent. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module to create. The + # event_threat_detection_custom_module.name will be ignored and server + # generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new + # + # # Call the create_event_threat_detection_custom_module method. + # result = client.create_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def create_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified Event Threat Detection custom module and all of its + # descendants in the Resource Manager hierarchy. This method is only + # supported for resident custom modules. + # + # @overload delete_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_event_threat_detection_custom_module(name: nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to delete. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new + # + # # Call the delete_event_threat_detection_custom_module method. + # result = client.delete_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Event Threat Detection custom module. + # + # @overload get_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to get. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_event_threat_detection_custom_module method. + # result = client.get_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def get_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all resident Event Threat Detection custom modules under the + # given Resource Manager parent and its descendants. + # + # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDescendantEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_descendant_event_threat_detection_custom_modules method. + # result = client.list_descendant_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_descendant_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Event Threat Detection custom modules for the given + # Resource Manager parent. This includes resident modules defined at the + # scope of the parent along with modules inherited from ancestors. + # + # @overload list_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListEventThreatDetectionCustomModules` must match the call that provided + # the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_event_threat_detection_custom_modules method. + # result = client.list_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Event Threat Detection custom module with the given name based + # on the given update mask. Updating the enablement state is supported for + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name or + # configuration of a module is supported for resident modules only. The type + # of a module cannot be changed. + # + # @overload update_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil) + # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new + # + # # Call the update_event_threat_detection_custom_module method. + # result = client.update_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def update_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Validates the given Event Threat Detection custom module. + # + # @overload validate_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent to validate the Custom Module under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param raw_text [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @param type [::String] + # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new + # + # # Call the validate_event_threat_detection_custom_module method. + # result = client.validate_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. + # p result + # + def validate_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.validate_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an effective Event Threat Detection custom module at the given level. + # + # @overload get_effective_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_effective_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the effective Event Threat Detection custom + # module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_effective_event_threat_detection_custom_module method. + # result = client.get_effective_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + # p result + # + def get_effective_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all effective Event Threat Detection custom modules for the + # given parent. This includes resident modules defined at the scope of the + # parent along with modules inherited from its ancestors. + # + # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules for. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListEffectiveEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_effective_event_threat_detection_custom_modules method. + # result = client.list_effective_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + # p item + # end + # + def list_effective_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + # + # @overload batch_create_resource_value_configs(request, options = nil) + # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_create_resource_value_configs(parent: nil, requests: nil) + # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>] + # Required. The resource value configs to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new + # + # # Call the batch_create_resource_value_configs method. + # result = client.batch_create_resource_value_configs request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. + # p result + # + def batch_create_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.batch_create_resource_value_configs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a ResourceValueConfig. + # + # @overload delete_resource_value_config(request, options = nil) + # Pass arguments to `delete_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_resource_value_config(name: nil) + # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the ResourceValueConfig to delete + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new + # + # # Call the delete_resource_value_config method. + # result = client.delete_resource_value_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ResourceValueConfig. + # + # @overload get_resource_value_config(request, options = nil) + # Pass arguments to `get_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_resource_value_config(name: nil) + # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource value config to retrieve. Its format is + # `organizations/{organization}/resourceValueConfigs/{config_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new + # + # # Call the get_resource_value_config method. + # result = client.get_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p result + # + def get_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all ResourceValueConfigs. + # + # @overload list_resource_value_configs(request, options = nil) + # Pass arguments to `list_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @param page_size [::Integer] + # The number of results to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new + # + # # Call the list_resource_value_configs method. + # result = client.list_resource_value_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p item + # end + # + def list_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_resource_value_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing ResourceValueConfigs with new rules. + # + # @overload update_resource_value_config(request, options = nil) + # Pass arguments to `update_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) + # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash] + # Required. The resource value config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new + # + # # Call the update_resource_value_config method. + # result = client.update_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p result + # + def update_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the valued resources for a set of simulation results and filter. + # + # @overload list_valued_resources(request, options = nil) + # Pass arguments to `list_valued_resources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) + # Pass arguments to `list_valued_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list valued resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @param filter [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @param page_token [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param order_by [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # * `resource` + # + # * `display_name` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + # example: `exposed_score DESC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new + # + # # Call the list_valued_resources method. + # result = client.list_valued_resources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. + # p item + # end + # + def list_valued_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_valued_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_valued_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_valued_resources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + # + # @overload list_attack_paths(request, options = nil) + # Pass arguments to `list_attack_paths` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_attack_paths` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @param filter [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @param page_token [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new + # + # # Call the list_attack_paths method. + # result = client.list_attack_paths request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. + # p item + # end + # + def list_attack_paths request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_attack_paths.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_attack_paths.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_attack_paths request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenter REST API. + # + # This class represents the configuration for SecurityCenter REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # bulk_mute_findings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.bulk_mute_findings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.bulk_mute_findings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SecurityCenter API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `bulk_mute_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_mute_findings + ## + # RPC-specific configuration for `create_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_security_health_analytics_custom_module + ## + # RPC-specific configuration for `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `create_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_finding + ## + # RPC-specific configuration for `create_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_mute_config + ## + # RPC-specific configuration for `create_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_config + ## + # RPC-specific configuration for `delete_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_mute_config + ## + # RPC-specific configuration for `delete_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_config + ## + # RPC-specific configuration for `delete_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_simulation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_simulation + ## + # RPC-specific configuration for `get_valued_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :get_valued_resource + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mute_config + ## + # RPC-specific configuration for `get_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_config + ## + # RPC-specific configuration for `get_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_settings + ## + # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :group_assets + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_mute_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mute_configs + ## + # RPC-specific configuration for `list_notification_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_configs + ## + # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `run_asset_discovery` + # @return [::Gapic::Config::Method] + # + attr_reader :run_asset_discovery + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_mute` + # @return [::Gapic::Config::Method] + # + attr_reader :set_mute + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `simulate_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :simulate_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_external_system` + # @return [::Gapic::Config::Method] + # + attr_reader :update_external_system + ## + # RPC-specific configuration for `update_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_finding + ## + # RPC-specific configuration for `update_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_mute_config + ## + # RPC-specific configuration for `update_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_config + ## + # RPC-specific configuration for `update_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_organization_settings + ## + # RPC-specific configuration for `update_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + ## + # RPC-specific configuration for `create_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :create_big_query_export + ## + # RPC-specific configuration for `delete_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_big_query_export + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # RPC-specific configuration for `list_big_query_exports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_big_query_exports + ## + # RPC-specific configuration for `create_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_event_threat_detection_custom_module + ## + # RPC-specific configuration for `delete_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `list_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `update_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_event_threat_detection_custom_module + ## + # RPC-specific configuration for `validate_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :validate_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `batch_create_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_resource_value_configs + ## + # RPC-specific configuration for `delete_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_value_config + ## + # RPC-specific configuration for `get_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_value_config + ## + # RPC-specific configuration for `list_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_value_configs + ## + # RPC-specific configuration for `update_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_value_config + ## + # RPC-specific configuration for `list_valued_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_valued_resources + ## + # RPC-specific configuration for `list_attack_paths` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attack_paths + + # @private + def initialize parent_rpcs = nil + bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings + @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config + create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module + @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_config + create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding + @create_finding = ::Gapic::Config::Method.new create_finding_config + create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config + @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config + create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config + @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config + delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config + @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config + delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config + @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config + delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module + @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config + get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation + @get_simulation = ::Gapic::Config::Method.new get_simulation_config + get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource + @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config + get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export + @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config + @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config + get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config + @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config + get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings + @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config + get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module + @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config + get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module + @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_config + group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets + @group_assets = ::Gapic::Config::Method.new group_assets_config + group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings + @group_findings = ::Gapic::Config::Method.new group_findings_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules + @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs + @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config + list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs + @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config + list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules + @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config + list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules + @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_config + run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery + @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config + set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state + @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config + set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute + @set_mute = ::Gapic::Config::Method.new set_mute_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module + @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config + update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system + @update_external_system = ::Gapic::Config::Method.new update_external_system_config + update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding + @update_finding = ::Gapic::Config::Method.new update_finding_config + update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config + @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config + update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config + @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config + update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings + @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config + update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module + @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_config + update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks + @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config + create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export + @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config + delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export + @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config + update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export + @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config + list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports + @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config + create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module + @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config + delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module + @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config + get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module + @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config + list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules + @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config + list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules + @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config + update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module + @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config + validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module + @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config + get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module + @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config + list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules + @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config + batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs + @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config + delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config + @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config + get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config + @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config + list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs + @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config + update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config + @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config + list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources + @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config + list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths + @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb new file mode 100644 index 000000000000..dd74065d2724 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb @@ -0,0 +1,926 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecurityCenter Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb new file mode 100644 index 000000000000..6b84754bb951 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb @@ -0,0 +1,4766 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/securitycenter/v1/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + module Rest + ## + # REST service stub for the SecurityCenter service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the bulk_mute_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def bulk_mute_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_mute_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "bulk_mute_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def create_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # A result object deserialized from the server's reply + def create_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # A result object deserialized from the server's reply + def create_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # A result object deserialized from the server's reply + def create_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # A result object deserialized from the server's reply + def create_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_simulation REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Simulation] + # A result object deserialized from the server's reply + def get_simulation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_simulation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_simulation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Simulation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_valued_resource REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # A result object deserialized from the server's reply + def get_valued_resource request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_valued_resource_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_valued_resource", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ValuedResource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # A result object deserialized from the server's reply + def get_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # A result object deserialized from the server's reply + def get_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # A result object deserialized from the server's reply + def get_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # A result object deserialized from the server's reply + def get_organization_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_organization_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_effective_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def get_effective_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_effective_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def get_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # A result object deserialized from the server's reply + def get_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the group_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse] + # A result object deserialized from the server's reply + def group_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_group_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "group_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse] + # A result object deserialized from the server's reply + def group_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "group_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse] + # A result object deserialized from the server's reply + def list_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_descendant_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_descendant_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_descendant_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse] + # A result object deserialized from the server's reply + def list_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_mute_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse] + # A result object deserialized from the server's reply + def list_mute_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_mute_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_mute_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse] + # A result object deserialized from the server's reply + def list_notification_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_notification_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_effective_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_effective_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_effective_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListSourcesResponse] + # A result object deserialized from the server's reply + def list_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the run_asset_discovery REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def run_asset_discovery request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_asset_discovery_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_asset_discovery", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # A result object deserialized from the server's reply + def set_finding_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_finding_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_mute REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetMuteRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # A result object deserialized from the server's reply + def set_mute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_mute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_mute", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the simulate_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # A result object deserialized from the server's reply + def simulate_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_simulate_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "simulate_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_external_system REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # A result object deserialized from the server's reply + def update_external_system request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_external_system_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_external_system", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # A result object deserialized from the server's reply + def update_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # A result object deserialized from the server's reply + def update_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # A result object deserialized from the server's reply + def update_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # A result object deserialized from the server's reply + def update_organization_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_organization_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_organization_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def update_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # A result object deserialized from the server's reply + def update_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # A result object deserialized from the server's reply + def update_security_marks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_security_marks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # A result object deserialized from the server's reply + def create_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # A result object deserialized from the server's reply + def update_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_big_query_exports REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse] + # A result object deserialized from the server's reply + def list_big_query_exports request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_big_query_exports_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_big_query_exports", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def create_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def get_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_descendant_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_descendant_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_descendant_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def update_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the validate_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # A result object deserialized from the server's reply + def validate_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_validate_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "validate_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_effective_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def get_effective_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_effective_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_effective_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_effective_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_effective_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_create_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # A result object deserialized from the server's reply + def batch_create_resource_value_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_resource_value_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_create_resource_value_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # A result object deserialized from the server's reply + def get_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse] + # A result object deserialized from the server's reply + def list_resource_value_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_value_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_resource_value_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # A result object deserialized from the server's reply + def update_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_valued_resources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse] + # A result object deserialized from the server's reply + def list_valued_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_valued_resources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_valued_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_attack_paths REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse] + # A result object deserialized from the server's reply + def list_attack_paths request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_attack_paths_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_attack_paths", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_mute_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_mute_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/sources", + body: "source", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings", + body: "finding", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_simulation REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_simulation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_valued_resource REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_valued_resource_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_organization_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/organizationSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_effective_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_effective_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the group_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_group_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_group_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_descendant_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findings", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findings", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_mute_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_mute_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/muteConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/muteConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/muteConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_notification_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_effective_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_effective_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sources", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sources", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sources", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_asset_discovery REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_asset_discovery_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets:runDiscovery", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_finding_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_mute REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetMuteRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_mute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the simulate_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_simulate_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules:simulate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules:simulate", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules:simulate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_external_system REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_external_system_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_organization_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{organization_settings.name}", + body: "organization_settings", + matches: [ + ["organization_settings.name", %r{^organizations/[^/]+/organizationSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{source.name}", + body: "source", + matches: [ + ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_security_marks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_big_query_exports REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_big_query_exports_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_descendant_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the validate_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_validate_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:validateCustomModule", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:validateCustomModule", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:validateCustomModule", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_effective_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_effective_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_effective_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_effective_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_create_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_create_resource_value_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/resourceValueConfigs:batchCreate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_resource_value_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceValueConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{resource_value_config.name}", + body: "resource_value_config", + matches: [ + ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_valued_resources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_valued_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attack_paths REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_attack_paths_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb new file mode 100644 index 000000000000..1c19ab7f4c05 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb new file mode 100644 index 000000000000..65cfc17f9bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/access.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/securitycenter/v1/access.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x89\x03\n\x06\x41\x63\x63\x65ss\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x11\n\tcaller_ip\x18\x02 \x01(\t\x12\x42\n\rcaller_ip_geo\x18\x03 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Geolocation\x12\x19\n\x11user_agent_family\x18\x04 \x01(\t\x12\x12\n\nuser_agent\x18\x0c \x01(\t\x12\x14\n\x0cservice_name\x18\x05 \x01(\t\x12\x13\n\x0bmethod_name\x18\x06 \x01(\t\x12\x19\n\x11principal_subject\x18\x07 \x01(\t\x12 \n\x18service_account_key_name\x18\x08 \x01(\t\x12\x65\n\x1fservice_account_delegation_info\x18\t \x03(\x0b\x32<.google.cloud.securitycenter.v1.ServiceAccountDelegationInfo\x12\x11\n\tuser_name\x18\x0b \x01(\t\"R\n\x1cServiceAccountDelegationInfo\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x19\n\x11principal_subject\x18\x02 \x01(\t\"\"\n\x0bGeolocation\x12\x13\n\x0bregion_code\x18\x01 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v1B\x0b\x41\x63\x63\x65ssProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Access").msgclass + ServiceAccountDelegationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ServiceAccountDelegationInfo").msgclass + Geolocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Geolocation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb new file mode 100644 index 000000000000..4798bdd4a508 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/agent_anomaly.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v1/agent_anomaly.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xcc\x01\n\x0c\x41gentAnomaly\x12\x18\n\x10\x63onfidence_score\x18\x01 \x01(\x01\x12N\n\x13\x64\x65tector_references\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v1.DetectorReference\x12R\n\x15invocation_references\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v1.InvocationReference\"\x8c\x02\n\x11\x44\x65tectorReference\x12L\n\x08severity\x18\x01 \x01(\x0e\x32:.google.cloud.securitycenter.v1.DetectorReference.Severity\x12\x13\n\x0b\x64\x65tector_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\t\x12\x16\n\x0erecommendation\x18\x05 \x01(\t\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\",\n\x13InvocationReference\x12\x15\n\rinvocation_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x41gentAnomalyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + AgentAnomaly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AgentAnomaly").msgclass + DetectorReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DetectorReference").msgclass + DetectorReference::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DetectorReference.Severity").enummodule + InvocationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.InvocationReference").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb new file mode 100644 index 000000000000..8663de889b80 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/agent.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/securitycenter/v1/agent.proto\x12\x1egoogle.cloud.securitycenter.v1\")\n\x05\x41gent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v1B\nAgentProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Agent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb new file mode 100644 index 000000000000..a342edc533b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/agent_session.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v1/agent_session.proto\x12\x1egoogle.cloud.securitycenter.v1\"\"\n\x0c\x41gentSession\x12\x12\n\nsession_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x41gentSessionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + AgentSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AgentSession").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb new file mode 100644 index 000000000000..716a87e5400a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/application.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/application.proto\x12\x1egoogle.cloud.securitycenter.v1\"1\n\x0b\x41pplication\x12\x10\n\x08\x62\x61se_uri\x18\x01 \x01(\t\x12\x10\n\x08\x66ull_uri\x18\x02 \x01(\tB\xea\x01\n\"com.google.cloud.securitycenter.v1B\x10\x41pplicationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Application").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb new file mode 100644 index 000000000000..7bbe0a82baf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/asset.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1/folder_pb' +require 'google/cloud/securitycenter/v1/security_marks_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/cloud/securitycenter/v1/asset.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/folder.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb8\x08\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x62\n\x1asecurity_center_properties\x18\x02 \x01(\x0b\x32>.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties\x12Z\n\x13resource_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Asset.ResourcePropertiesEntry\x12\x45\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarks\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\niam_policy\x18\x0b \x01(\x0b\x32/.google.cloud.securitycenter.v1.Asset.IamPolicy\x12\x16\n\x0e\x63\x61nonical_name\x18\r \x01(\t\x1a\xb9\x02\n\x18SecurityCenterProperties\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x17\n\x0fresource_parent\x18\x03 \x01(\t\x12\x18\n\x10resource_project\x18\x04 \x01(\t\x12\x17\n\x0fresource_owners\x18\x05 \x03(\t\x12\x1d\n\x15resource_display_name\x18\x06 \x01(\t\x12$\n\x1cresource_parent_display_name\x18\x07 \x01(\t\x12%\n\x1dresource_project_display_name\x18\x08 \x01(\t\x12\x37\n\x07\x66olders\x18\n \x03(\x0b\x32&.google.cloud.securitycenter.v1.Folder\x1a \n\tIamPolicy\x12\x13\n\x0bpolicy_blob\x18\x01 \x01(\t\x1aQ\n\x17ResourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01:\xa9\x01\xea\x41\xa5\x01\n#securitycenter.googleapis.com/Asset\x12+organizations/{organization}/assets/{asset}\x12\x1f\x66olders/{folder}/assets/{asset}\x12!projects/{project}/assets/{asset}*\x06\x61ssets2\x05\x61ssetB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset").msgclass + Asset::SecurityCenterProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.SecurityCenterProperties").msgclass + Asset::IamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.IamPolicy").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb new file mode 100644 index 000000000000..874c9ce74d43 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/attack_exposure.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/attack_exposure.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8a\x03\n\x0e\x41ttackExposure\x12\r\n\x05score\x18\x01 \x01(\x01\x12;\n\x17latest_calculation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16\x61ttack_exposure_result\x18\x03 \x01(\t\x12\x43\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.AttackExposure.State\x12*\n\"exposed_high_value_resources_count\x18\x05 \x01(\x05\x12,\n$exposed_medium_value_resources_count\x18\x06 \x01(\x05\x12)\n!exposed_low_value_resources_count\x18\x07 \x01(\x05\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCALCULATED\x10\x01\x12\x12\n\x0eNOT_CALCULATED\x10\x02\x42\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x41ttackExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + AttackExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackExposure").msgclass + AttackExposure::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackExposure.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb new file mode 100644 index 000000000000..9a0cc9065451 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/attack_path.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/attack_path.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xe7\t\n\nAttackPath\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\npath_nodes\x18\x02 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1.AttackPath.AttackPathNode\x12H\n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge\x1a\xbd\x06\n\x0e\x41ttackPathNode\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12p\n\x13\x61ssociated_findings\x18\x04 \x03(\x0b\x32S.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding\x12\x0c\n\x04uuid\x18\x05 \x01(\t\x12^\n\x0c\x61ttack_steps\x18\x06 \x03(\x0b\x32H.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode\x1a^\n\x19PathNodeAssociatedFinding\x12\x19\n\x11\x63\x61nonical_finding\x18\x01 \x01(\t\x12\x18\n\x10\x66inding_category\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x1a\xb0\x02\n\x0e\x41ttackStepNode\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12P\n\x04type\x18\x02 \x01(\x0e\x32\x42.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x64\n\x06labels\x18\x04 \x03(\x0b\x32T.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rNODE_TYPE_AND\x10\x01\x12\x10\n\x0cNODE_TYPE_OR\x10\x02\x12\x15\n\x11NODE_TYPE_DEFENSE\x10\x03\x12\x16\n\x12NODE_TYPE_ATTACKER\x10\x04\x1a\x35\n\x0e\x41ttackPathEdge\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t:\xba\x01\xea\x41\xb6\x01\n(securitycenter.googleapis.com/AttackPath\x12qorganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}*\x0b\x61ttackPaths2\nattackPathB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x41ttackPathProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + AttackPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath").msgclass + AttackPath::AttackPathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode").msgclass + AttackPath::AttackPathNode::PathNodeAssociatedFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding").msgclass + AttackPath::AttackPathNode::AttackStepNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode").msgclass + AttackPath::AttackPathNode::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType").enummodule + AttackPath::AttackPathEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathEdge").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb new file mode 100644 index 000000000000..0e004d7fc559 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/backup_disaster_recovery.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x86\x02\n\x16\x42\x61\x63kupDisasterRecovery\x12\x17\n\x0f\x62\x61\x63kup_template\x18\x01 \x01(\t\x12\x10\n\x08policies\x18\x02 \x03(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x14\n\x0c\x61pplications\x18\x04 \x03(\t\x12\x14\n\x0cstorage_pool\x18\x05 \x01(\t\x12\x16\n\x0epolicy_options\x18\x06 \x03(\t\x12\x0f\n\x07profile\x18\x07 \x01(\t\x12\x11\n\tappliance\x18\x08 \x01(\t\x12\x13\n\x0b\x62\x61\x63kup_type\x18\t \x01(\t\x12\x36\n\x12\x62\x61\x63kup_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xf5\x01\n\"com.google.cloud.securitycenter.v1B\x1b\x42\x61\x63kupDisasterRecoveryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + BackupDisasterRecovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BackupDisasterRecovery").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb new file mode 100644 index 000000000000..dd2586de3962 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/bigquery_export.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/bigquery_export.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xde\x03\n\x0e\x42igQueryExport\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x04 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tprincipal\x18\x08 \x01(\tB\x03\xe0\x41\x03:\xe2\x01\xea\x41\xde\x01\n,securitycenter.googleapis.com/BigQueryExport\x12\x35organizations/{organization}/bigQueryExports/{export}\x12)folders/{folder}/bigQueryExports/{export}\x12+projects/{project}/bigQueryExports/{export}*\x0f\x62igQueryExports2\x0e\x62igQueryExportB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x42igQueryExportProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BigQueryExport").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb new file mode 100644 index 000000000000..bcdd9d0754f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/chokepoint.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v1\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Chokepoint").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb new file mode 100644 index 000000000000..5d2aca35a2a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/cloud_armor.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/cloud_armor.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1egoogle/protobuf/duration.proto\"\xde\x02\n\nCloudArmor\x12G\n\x0fsecurity_policy\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.SecurityPolicy\x12:\n\x08requests\x18\x02 \x01(\x0b\x32(.google.cloud.securitycenter.v1.Requests\x12O\n\x13\x61\x64\x61ptive_protection\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.AdaptiveProtection\x12\x36\n\x06\x61ttack\x18\x04 \x01(\x0b\x32&.google.cloud.securitycenter.v1.Attack\x12\x15\n\rthreat_vector\x18\x05 \x01(\t\x12+\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"=\n\x0eSecurityPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07preview\x18\x03 \x01(\x08\"j\n\x08Requests\x12\r\n\x05ratio\x18\x01 \x01(\x01\x12\x1a\n\x12short_term_allowed\x18\x02 \x01(\x05\x12\x19\n\x11long_term_allowed\x18\x03 \x01(\x05\x12\x18\n\x10long_term_denied\x18\x04 \x01(\x05\"(\n\x12\x41\x64\x61ptiveProtection\x12\x12\n\nconfidence\x18\x01 \x01(\x01\"H\n\x06\x41ttack\x12\x12\n\nvolume_pps\x18\x01 \x01(\x05\x12\x12\n\nvolume_bps\x18\x02 \x01(\x05\x12\x16\n\x0e\x63lassification\x18\x03 \x01(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43loudArmorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + CloudArmor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudArmor").msgclass + SecurityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SecurityPolicy").msgclass + Requests = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Requests").msgclass + AdaptiveProtection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AdaptiveProtection").msgclass + Attack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Attack").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb new file mode 100644 index 000000000000..96dd00769215 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xb2\x02\n\x13\x43loudDlpDataProfile\x12>\n\x0c\x64\x61ta_profile\x18\x01 \x01(\tB(\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\x12S\n\x0bparent_type\x18\x02 \x01(\x0e\x32>.google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType\x12<\n\ninfo_types\x18\x03 \x03(\x0b\x32(.google.cloud.securitycenter.v1.InfoType\"H\n\nParentType\x12\x1b\n\x17PARENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\"v\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12K\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.SensitivityScore\"\x8a\x02\n\x10SensitivityScore\x12U\n\x05score\x18\x01 \x01(\x0e\x32\x46.google.cloud.securitycenter.v1.SensitivityScore.SensitivityScoreLevel\"\x9e\x01\n\x15SensitivityScoreLevel\x12\'\n#SENSITIVITY_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x13\n\x0fSENSITIVITY_LOW\x10\n\x12\x17\n\x13SENSITIVITY_UNKNOWN\x10\x0c\x12\x18\n\x14SENSITIVITY_MODERATE\x10\x14\x12\x14\n\x10SENSITIVITY_HIGH\x10\x1e\x42\x94\x03\n\"com.google.cloud.securitycenter.v1B\x18\x43loudDlpDataProfileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41\x9e\x01\n#dlp.googleapis.com/TableDataProfile\x12\x30projects/{project}/tableProfiles/{table_profile}\x12\x45projects/{project}/locations/{location}/tableProfiles/{table_profile}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + CloudDlpDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpDataProfile").msgclass + CloudDlpDataProfile::ParentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType").enummodule + InfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.InfoType").msgclass + SensitivityScore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SensitivityScore").msgclass + SensitivityScore::SensitivityScoreLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SensitivityScore.SensitivityScoreLevel").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb new file mode 100644 index 000000000000..6908abf33a2c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/cloud_dlp_inspection.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\x88\x01\n\x12\x43loudDlpInspection\x12\x33\n\x0binspect_job\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x11\n\tinfo_type\x18\x02 \x01(\t\x12\x17\n\x0finfo_type_count\x18\x03 \x01(\x03\x12\x11\n\tfull_scan\x18\x04 \x01(\x08\x42\xf0\x02\n\"com.google.cloud.securitycenter.v1B\x17\x43loudDlpInspectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + CloudDlpInspection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpInspection").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb new file mode 100644 index 000000000000..db60def7251c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/compliance.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/compliance.proto\x12\x1egoogle.cloud.securitycenter.v1\"<\n\nCompliance\x12\x10\n\x08standard\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0b\n\x03ids\x18\x03 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43omplianceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Compliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Compliance").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb new file mode 100644 index 000000000000..eb0b9ee52115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/connection.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/connection.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x81\x02\n\nConnection\x12\x16\n\x0e\x64\x65stination_ip\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_port\x18\x02 \x01(\x05\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x45\n\x08protocol\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v1.Connection.Protocol\"R\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x08\n\x04ICMP\x10\x01\x12\x07\n\x03TCP\x10\x06\x12\x07\n\x03UDP\x10\x11\x12\x07\n\x03GRE\x10/\x12\x07\n\x03\x45SP\x10\x32\x42\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43onnectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Connection").msgclass + Connection::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Connection.Protocol").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb new file mode 100644 index 000000000000..82b5fea649e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/contact_details.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/contact_details.proto\x12\x1egoogle.cloud.securitycenter.v1\"K\n\x0e\x43ontactDetails\x12\x39\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Contact\"\x18\n\x07\x43ontact\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x43ontactDetailsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ContactDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ContactDetails").msgclass + Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Contact").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb new file mode 100644 index 000000000000..114721a06e25 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/container.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v1/label_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/securitycenter/v1/container.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a*google/cloud/securitycenter/v1/label.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x01\n\tContainer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08image_id\x18\x03 \x01(\t\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.securitycenter.v1.Label\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe8\x01\n\"com.google.cloud.securitycenter.v1B\x0e\x43ontainerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Container").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb new file mode 100644 index 000000000000..14a2d4b30426 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/database.proto + +require 'google/protobuf' + + +descriptor_data = "\n-google/cloud/securitycenter/v1/database.proto\x12\x1egoogle.cloud.securitycenter.v1\"s\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x11\n\tuser_name\x18\x03 \x01(\t\x12\r\n\x05query\x18\x04 \x01(\t\x12\x10\n\x08grantees\x18\x05 \x03(\t\x12\x0f\n\x07version\x18\x06 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rDatabaseProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Database").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb new file mode 100644 index 000000000000..b7cff88c9276 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\nSgoogle/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xc9\x05\n)EffectiveEventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12,\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12x\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32Y.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\xc8\x02\xea\x41\xc4\x02\nGsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12Yorganizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\x12Mfolders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\x12Oprojects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}B\x88\x02\n\"com.google.cloud.securitycenter.v1B.EffectiveEventThreatDetectionCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + EffectiveEventThreatDetectionCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule").msgclass + EffectiveEventThreatDetectionCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb new file mode 100644 index 000000000000..398d13b78b09 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb' + + +descriptor_data = "\nVgoogle/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aLgoogle/cloud/securitycenter/v1/security_health_analytics_custom_config.proto\"\xfd\x05\n,EffectiveSecurityHealthAnalyticsCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12H\n\rcustom_config\x18\x02 \x01(\x0b\x32,.google.cloud.securitycenter.v1.CustomConfigB\x03\xe0\x41\x03\x12{\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32\\.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\x87\x03\xea\x41\x83\x03\nJsecuritycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\x12morganizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}\x12\x61\x66olders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}\x12\x63projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}B\x8b\x02\n\"com.google.cloud.securitycenter.v1B1EffectiveSecurityHealthAnalyticsCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + EffectiveSecurityHealthAnalyticsCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule").msgclass + EffectiveSecurityHealthAnalyticsCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb new file mode 100644 index 000000000000..2b24bf1f56c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nIgoogle/cloud/securitycenter/v1/event_threat_detection_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x06\n EventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\'\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12_\n\x0f\x61ncestor_module\x18\x03 \x01(\tBF\xe0\x41\x03\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12j\n\x10\x65nablement_state\x18\x04 \x01(\x0e\x32P.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState\x12\x0c\n\x04type\x18\x05 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\t \x01(\tB\x03\xe0\x41\x03\"]\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tINHERITED\x10\x03:\xa4\x02\xea\x41\xa0\x02\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12Porganizations/{organization}/eventThreatDetectionSettings/customModules/{module}\x12\x44\x66olders/{folder}/eventThreatDetectionSettings/customModules/{module}\x12\x46projects/{project}/eventThreatDetectionSettings/customModules/{module}B\xff\x01\n\"com.google.cloud.securitycenter.v1B%EventThreatDetectionCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + EventThreatDetectionCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EventThreatDetectionCustomModule").msgclass + EventThreatDetectionCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb new file mode 100644 index 000000000000..d900e952525b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto + +require 'google/protobuf' + + +descriptor_data = "\n[google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto\x12\x1egoogle.cloud.securitycenter.v1\"k\n\x1c\x43ustomModuleValidationErrors\x12K\n\x06\x65rrors\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v1.CustomModuleValidationError\"\xd2\x01\n\x1b\x43ustomModuleValidationError\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12<\n\x05start\x18\x03 \x01(\x0b\x32(.google.cloud.securitycenter.v1.PositionH\x00\x88\x01\x01\x12:\n\x03\x65nd\x18\x04 \x01(\x0b\x32(.google.cloud.securitycenter.v1.PositionH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"6\n\x08Position\x12\x13\n\x0bline_number\x18\x01 \x01(\x05\x12\x15\n\rcolumn_number\x18\x02 \x01(\x05\x42\x8f\x02\n\"com.google.cloud.securitycenter.v1B5EventThreatDetectionCustomModuleValidationErrorsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + CustomModuleValidationErrors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CustomModuleValidationErrors").msgclass + CustomModuleValidationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CustomModuleValidationError").msgclass + Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Position").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb new file mode 100644 index 000000000000..f444b911b8fd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/exfiltration.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/cloud/securitycenter/v1/exfiltration.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xaf\x01\n\x0c\x45xfiltration\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v1.ExfilResource\x12>\n\x07targets\x18\x02 \x03(\x0b\x32-.google.cloud.securitycenter.v1.ExfilResource\x12\x1f\n\x17total_exfiltrated_bytes\x18\x03 \x01(\x03\"1\n\rExfilResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ncomponents\x18\x02 \x03(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x45xfiltrationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Exfiltration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Exfiltration").msgclass + ExfilResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExfilResource").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb new file mode 100644 index 000000000000..637251a7df01 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/external_exposure.proto + +require 'google/protobuf' + +require 'google/api/field_info_pb' + + +descriptor_data = "\n6google/cloud/securitycenter/v1/external_exposure.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1bgoogle/api/field_info.proto\"\xed\x02\n\x10\x45xternalExposure\x12$\n\x12private_ip_address\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x14\n\x0cprivate_port\x18\x02 \x01(\t\x12\x17\n\x0f\x65xposed_service\x18\x03 \x01(\t\x12#\n\x11public_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x13\n\x0bpublic_port\x18\x05 \x01(\t\x12\x18\n\x10\x65xposed_endpoint\x18\x06 \x01(\t\x12%\n\x1dload_balancer_firewall_policy\x18\x07 \x01(\t\x12\x1f\n\x17service_firewall_policy\x18\x08 \x01(\t\x12\x17\n\x0f\x66orwarding_rule\x18\t \x01(\t\x12\x17\n\x0f\x62\x61\x63kend_service\x18\n \x01(\t\x12\x16\n\x0einstance_group\x18\x0b \x01(\t\x12\x1e\n\x16network_endpoint_group\x18\x0c \x01(\tB\xef\x01\n\"com.google.cloud.securitycenter.v1B\x15\x45xternalExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ExternalExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalExposure").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb new file mode 100644 index 000000000000..6b43636594f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/external_system.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/external_system.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x07\n\x0e\x45xternalSystem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tassignees\x18\x02 \x03(\t\x12\x14\n\x0c\x65xternal_uid\x18\x03 \x01(\t\x12\x0e\n\x06status\x18\x04 \x01(\t\x12?\n\x1b\x65xternal_system_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x63\x61se_uri\x18\x06 \x01(\t\x12\x15\n\rcase_priority\x18\x07 \x01(\t\x12,\n\x08\x63\x61se_sla\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10\x63\x61se_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63\x61se_close_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x0bticket_info\x18\x08 \x01(\x0b\x32\x39.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo\x1a\x8d\x01\n\nTicketInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0b\n\x03uri\x18\x04 \x01(\t\x12\x0e\n\x06status\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xe6\x02\xea\x41\xe2\x02\n,securitycenter.googleapis.com/ExternalSystem\x12\x61organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}*\x0f\x65xternalSystems2\x0e\x65xternalSystemB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x45xternalSystemProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ExternalSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalSystem").msgclass + ExternalSystem::TicketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalSystem.TicketInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb new file mode 100644 index 000000000000..1b28cd79a63b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/file.proto + +require 'google/protobuf' + + +descriptor_data = "\n)google/cloud/securitycenter/v1/file.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xf0\x01\n\x04\x46ile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12\x0e\n\x06sha256\x18\x03 \x01(\t\x12\x13\n\x0bhashed_size\x18\x04 \x01(\x03\x12\x18\n\x10partially_hashed\x18\x05 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x06 \x01(\t\x12@\n\tdisk_path\x18\x07 \x01(\x0b\x32-.google.cloud.securitycenter.v1.File.DiskPath\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v1B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.File").msgclass + File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.File.DiskPath").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb new file mode 100644 index 000000000000..d83c4821a3ab --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/finding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1/access_pb' +require 'google/cloud/securitycenter/v1/agent_pb' +require 'google/cloud/securitycenter/v1/agent_anomaly_pb' +require 'google/cloud/securitycenter/v1/agent_session_pb' +require 'google/cloud/securitycenter/v1/application_pb' +require 'google/cloud/securitycenter/v1/attack_exposure_pb' +require 'google/cloud/securitycenter/v1/backup_disaster_recovery_pb' +require 'google/cloud/securitycenter/v1/chokepoint_pb' +require 'google/cloud/securitycenter/v1/cloud_armor_pb' +require 'google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb' +require 'google/cloud/securitycenter/v1/cloud_dlp_inspection_pb' +require 'google/cloud/securitycenter/v1/compliance_pb' +require 'google/cloud/securitycenter/v1/connection_pb' +require 'google/cloud/securitycenter/v1/contact_details_pb' +require 'google/cloud/securitycenter/v1/container_pb' +require 'google/cloud/securitycenter/v1/database_pb' +require 'google/cloud/securitycenter/v1/exfiltration_pb' +require 'google/cloud/securitycenter/v1/external_exposure_pb' +require 'google/cloud/securitycenter/v1/external_system_pb' +require 'google/cloud/securitycenter/v1/file_pb' +require 'google/cloud/securitycenter/v1/group_membership_pb' +require 'google/cloud/securitycenter/v1/iam_binding_pb' +require 'google/cloud/securitycenter/v1/indicator_pb' +require 'google/cloud/securitycenter/v1/kernel_rootkit_pb' +require 'google/cloud/securitycenter/v1/kubernetes_pb' +require 'google/cloud/securitycenter/v1/load_balancer_pb' +require 'google/cloud/securitycenter/v1/log_entry_pb' +require 'google/cloud/securitycenter/v1/mitre_attack_pb' +require 'google/cloud/securitycenter/v1/notebook_pb' +require 'google/cloud/securitycenter/v1/org_policy_pb' +require 'google/cloud/securitycenter/v1/process_pb' +require 'google/cloud/securitycenter/v1/security_marks_pb' +require 'google/cloud/securitycenter/v1/security_posture_pb' +require 'google/cloud/securitycenter/v1/toxic_combination_pb' +require 'google/cloud/securitycenter/v1/vulnerability_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/securitycenter/v1/finding.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/access.proto\x1a*google/cloud/securitycenter/v1/agent.proto\x1a\x32google/cloud/securitycenter/v1/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v1/agent_session.proto\x1a\x30google/cloud/securitycenter/v1/application.proto\x1a\x34google/cloud/securitycenter/v1/attack_exposure.proto\x1a=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v1/chokepoint.proto\x1a\x30google/cloud/securitycenter/v1/cloud_armor.proto\x1a;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v1/compliance.proto\x1a/google/cloud/securitycenter/v1/connection.proto\x1a\x34google/cloud/securitycenter/v1/contact_details.proto\x1a.google/cloud/securitycenter/v1/container.proto\x1a-google/cloud/securitycenter/v1/database.proto\x1a\x31google/cloud/securitycenter/v1/exfiltration.proto\x1a\x36google/cloud/securitycenter/v1/external_exposure.proto\x1a\x34google/cloud/securitycenter/v1/external_system.proto\x1a)google/cloud/securitycenter/v1/file.proto\x1a\x35google/cloud/securitycenter/v1/group_membership.proto\x1a\x30google/cloud/securitycenter/v1/iam_binding.proto\x1a.google/cloud/securitycenter/v1/indicator.proto\x1a\x33google/cloud/securitycenter/v1/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v1/kubernetes.proto\x1a\x32google/cloud/securitycenter/v1/load_balancer.proto\x1a.google/cloud/securitycenter/v1/log_entry.proto\x1a\x31google/cloud/securitycenter/v1/mitre_attack.proto\x1a-google/cloud/securitycenter/v1/notebook.proto\x1a/google/cloud/securitycenter/v1/org_policy.proto\x1a,google/cloud/securitycenter/v1/process.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x35google/cloud/securitycenter/v1/security_posture.proto\x1a\x36google/cloud/securitycenter/v1/toxic_combination.proto\x1a\x32google/cloud/securitycenter/v1/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99$\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.State\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x14\n\x0c\x65xternal_uri\x18\x06 \x01(\t\x12X\n\x11source_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x08severity\x18\x0c \x01(\x0e\x32\x30.google.cloud.securitycenter.v1.Finding.Severity\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12K\n\rfinding_class\x18\x11 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Finding.FindingClass\x12<\n\tindicator\x18\x12 \x01(\x0b\x32).google.cloud.securitycenter.v1.Indicator\x12\x44\n\rvulnerability\x18\x14 \x01(\x0b\x32-.google.cloud.securitycenter.v1.Vulnerability\x12\x39\n\x10mute_update_time\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x16 \x03(\x0b\x32<.google.cloud.securitycenter.v1.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x19 \x01(\x0b\x32+.google.cloud.securitycenter.v1.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x1a \x01(\x0b\x32&.google.cloud.securitycenter.v1.Access\x12?\n\x0b\x63onnections\x18\x1f \x03(\x0b\x32*.google.cloud.securitycenter.v1.Connection\x12\x16\n\x0emute_initiator\x18\x1c \x01(\t\x12H\n\tmute_info\x18= \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.Finding.MuteInfoB\x03\xe0\x41\x03\x12:\n\tprocesses\x18\x1e \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Process\x12L\n\x08\x63ontacts\x18! \x03(\x0b\x32\x35.google.cloud.securitycenter.v1.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\" \x03(\x0b\x32*.google.cloud.securitycenter.v1.Compliance\x12 \n\x13parent_display_name\x18$ \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18% \x01(\t\x12\x42\n\x0c\x65xfiltration\x18& \x01(\x0b\x32,.google.cloud.securitycenter.v1.Exfiltration\x12@\n\x0ciam_bindings\x18\' \x03(\x0b\x32*.google.cloud.securitycenter.v1.IamBinding\x12\x12\n\nnext_steps\x18( \x01(\t\x12\x13\n\x0bmodule_name\x18) \x01(\t\x12=\n\ncontainers\x18* \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x12>\n\nkubernetes\x18+ \x01(\x0b\x32*.google.cloud.securitycenter.v1.Kubernetes\x12:\n\x08\x64\x61tabase\x18, \x01(\x0b\x32(.google.cloud.securitycenter.v1.Database\x12G\n\x0f\x61ttack_exposure\x18- \x01(\x0b\x32..google.cloud.securitycenter.v1.AttackExposure\x12\x33\n\x05\x66iles\x18. \x03(\x0b\x32$.google.cloud.securitycenter.v1.File\x12P\n\x14\x63loud_dlp_inspection\x18\x30 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18\x31 \x01(\x0b\x32\x33.google.cloud.securitycenter.v1.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18\x32 \x01(\x0b\x32-.google.cloud.securitycenter.v1.KernelRootkit\x12?\n\x0corg_policies\x18\x33 \x03(\x0b\x32).google.cloud.securitycenter.v1.OrgPolicy\x12@\n\x0b\x61pplication\x18\x35 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Application\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18\x37 \x01(\x0b\x32\x36.google.cloud.securitycenter.v1.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x38 \x01(\x0b\x32/.google.cloud.securitycenter.v1.SecurityPosture\x12=\n\x0blog_entries\x18\x39 \x03(\x0b\x32(.google.cloud.securitycenter.v1.LogEntry\x12\x44\n\x0eload_balancers\x18: \x03(\x0b\x32,.google.cloud.securitycenter.v1.LoadBalancer\x12?\n\x0b\x63loud_armor\x18; \x01(\x0b\x32*.google.cloud.securitycenter.v1.CloudArmor\x12:\n\x08notebook\x18? \x01(\x0b\x32(.google.cloud.securitycenter.v1.Notebook\x12K\n\x11toxic_combination\x18@ \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ToxicCombination\x12J\n\x11group_memberships\x18\x41 \x03(\x0b\x32/.google.cloud.securitycenter.v1.GroupMembership\x12>\n\nchokepoint\x18M \x01(\x0b\x32*.google.cloud.securitycenter.v1.Chokepoint\x12K\n\x11\x65xternal_exposure\x18T \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ExternalExposure\x12\x34\n\x05\x61gent\x18X \x01(\x0b\x32%.google.cloud.securitycenter.v1.Agent\x12\x44\n\x0e\x61gent_sessions\x18Y \x03(\x0b\x32,.google.cloud.securitycenter.v1.AgentSession\x12\x43\n\ragent_anomaly\x18Z \x01(\x0b\x32,.google.cloud.securitycenter.v1.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x04\"\xf0\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t\x12\x15\n\x11\x45XTERNAL_EXPOSURE\x10\n:\xee\x01\xea\x41\xea\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding").msgclass + Finding::MuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo").msgclass + Finding::MuteInfo::StaticMute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute").msgclass + Finding::MuteInfo::DynamicMuteRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord").msgclass + Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.State").enummodule + Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.Severity").enummodule + Finding::Mute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.Mute").enummodule + Finding::FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.FindingClass").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb new file mode 100644 index 000000000000..e25a1821948f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/folder.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/securitycenter/v1/folder.proto\x12\x1egoogle.cloud.securitycenter.v1\"G\n\x06\x46older\x12\x17\n\x0fresource_folder\x18\x01 \x01(\t\x12$\n\x1cresource_folder_display_name\x18\x02 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v1B\x0b\x46olderProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Folder").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb new file mode 100644 index 000000000000..1f47d17f32d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/group_membership.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/cloud/securitycenter/v1/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.GroupMembership.GroupType\x12\x10\n\x08group_id\x18\x02 \x01(\t\"d\n\tGroupType\x12\x1a\n\x16GROUP_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cGROUP_TYPE_TOXIC_COMBINATION\x10\x01\x12\x19\n\x15GROUP_TYPE_CHOKEPOINT\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v1B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + GroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupMembership").msgclass + GroupMembership::GroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupMembership.GroupType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb new file mode 100644 index 000000000000..7a11d5d9ab1f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/iam_binding.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/iam_binding.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xa4\x01\n\nIamBinding\x12\x41\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v1.IamBinding.Action\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x0e\n\x06member\x18\x03 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x42\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fIamBindingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + IamBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.IamBinding").msgclass + IamBinding::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.IamBinding.Action").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb new file mode 100644 index 000000000000..6fd4289eea6b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/indicator.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/securitycenter/v1/indicator.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd9\x06\n\tIndicator\x12\x14\n\x0cip_addresses\x18\x01 \x03(\t\x12\x0f\n\x07\x64omains\x18\x02 \x03(\t\x12N\n\nsignatures\x18\x03 \x03(\x0b\x32:.google.cloud.securitycenter.v1.Indicator.ProcessSignature\x12\x0c\n\x04uris\x18\x04 \x03(\t\x1a\xc6\x05\n\x10ProcessSignature\x12o\n\x15memory_hash_signature\x18\x06 \x01(\x0b\x32N.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureH\x00\x12k\n\x13yara_rule_signature\x18\x07 \x01(\x0b\x32L.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureH\x00\x12`\n\x0esignature_type\x18\x08 \x01(\x0e\x32H.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType\x1a\xd6\x01\n\x13MemoryHashSignature\x12\x15\n\rbinary_family\x18\x01 \x01(\t\x12l\n\ndetections\x18\x04 \x03(\x0b\x32X.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection\x1a:\n\tDetection\x12\x0e\n\x06\x62inary\x18\x02 \x01(\t\x12\x1d\n\x15percent_pages_matched\x18\x03 \x01(\x01\x1a&\n\x11YaraRuleSignature\x12\x11\n\tyara_rule\x18\x05 \x01(\t\"d\n\rSignatureType\x12\x1e\n\x1aSIGNATURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SIGNATURE_TYPE_PROCESS\x10\x01\x12\x17\n\x13SIGNATURE_TYPE_FILE\x10\x02\x42\x0b\n\tsignatureB\xe8\x01\n\"com.google.cloud.securitycenter.v1B\x0eIndicatorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Indicator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator").msgclass + Indicator::ProcessSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature").msgclass + Indicator::ProcessSignature::MemoryHashSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature").msgclass + Indicator::ProcessSignature::MemoryHashSignature::Detection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection").msgclass + Indicator::ProcessSignature::YaraRuleSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature").msgclass + Indicator::ProcessSignature::SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb new file mode 100644 index 000000000000..20e8cb2e66b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/kernel_rootkit.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/cloud/securitycenter/v1/kernel_rootkit.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd7\x02\n\rKernelRootkit\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x1cunexpected_code_modification\x18\x02 \x01(\x08\x12.\n&unexpected_read_only_data_modification\x18\x03 \x01(\x08\x12!\n\x19unexpected_ftrace_handler\x18\x04 \x01(\x08\x12!\n\x19unexpected_kprobe_handler\x18\x05 \x01(\x08\x12$\n\x1cunexpected_kernel_code_pages\x18\x06 \x01(\x08\x12&\n\x1eunexpected_system_call_handler\x18\x07 \x01(\x08\x12$\n\x1cunexpected_interrupt_handler\x18\x08 \x01(\x08\x12(\n unexpected_processes_in_runqueue\x18\t \x01(\x08\x42\xec\x01\n\"com.google.cloud.securitycenter.v1B\x12KernelRootkitProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + KernelRootkit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.KernelRootkit").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb new file mode 100644 index 000000000000..469575235393 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/kubernetes.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v1/container_pb' +require 'google/cloud/securitycenter/v1/label_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/kubernetes.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a.google/cloud/securitycenter/v1/container.proto\x1a*google/cloud/securitycenter/v1/label.proto\"\x82\x0c\n\nKubernetes\x12<\n\x04pods\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.Kubernetes.Pod\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Node\x12G\n\nnode_pools\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v1.Kubernetes.NodePool\x12>\n\x05roles\x18\x04 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Role\x12\x44\n\x08\x62indings\x18\x05 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.Kubernetes.Binding\x12O\n\x0e\x61\x63\x63\x65ss_reviews\x18\x06 \x03(\x0b\x32\x37.google.cloud.securitycenter.v1.Kubernetes.AccessReview\x12\x42\n\x07objects\x18\x07 \x03(\x0b\x32\x31.google.cloud.securitycenter.v1.Kubernetes.Object\x1a\x95\x01\n\x03Pod\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x35\n\x06labels\x18\x03 \x03(\x0b\x32%.google.cloud.securitycenter.v1.Label\x12=\n\ncontainers\x18\x04 \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x1a\x14\n\x04Node\x12\x0c\n\x04name\x18\x01 \x01(\t\x1aX\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Node\x1a\x9e\x01\n\x04Role\x12\x42\n\x04kind\x18\x01 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Kubernetes.Role.Kind\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"8\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x08\n\x04ROLE\x10\x01\x12\x10\n\x0c\x43LUSTER_ROLE\x10\x02\x1a\xa8\x01\n\x07\x42inding\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12=\n\x04role\x18\x03 \x01(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Role\x12\x44\n\x08subjects\x18\x04 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.Kubernetes.Subject\x1a\xbe\x01\n\x07Subject\x12I\n\x04kind\x18\x01 \x01(\x0e\x32;.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"N\n\x08\x41uthType\x12\x19\n\x15\x41UTH_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x12\n\x0eSERVICEACCOUNT\x10\x02\x12\t\n\x05GROUP\x10\x03\x1a}\n\x0c\x41\x63\x63\x65ssReview\x12\r\n\x05group\x18\x01 \x01(\t\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x13\n\x0bsubresource\x18\x05 \x01(\t\x12\x0c\n\x04verb\x18\x06 \x01(\t\x12\x0f\n\x07version\x18\x07 \x01(\t\x1a~\n\x06Object\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\n\n\x02ns\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12=\n\ncontainers\x18\x05 \x03(\x0b\x32).google.cloud.securitycenter.v1.ContainerB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fKubernetesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Kubernetes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes").msgclass + Kubernetes::Pod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Pod").msgclass + Kubernetes::Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Node").msgclass + Kubernetes::NodePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.NodePool").msgclass + Kubernetes::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Role").msgclass + Kubernetes::Role::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Role.Kind").enummodule + Kubernetes::Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Binding").msgclass + Kubernetes::Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Subject").msgclass + Kubernetes::Subject::AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType").enummodule + Kubernetes::AccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.AccessReview").msgclass + Kubernetes::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Object").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb new file mode 100644 index 000000000000..814fe4dfd80b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/label.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/securitycenter/v1/label.proto\x12\x1egoogle.cloud.securitycenter.v1\"$\n\x05Label\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v1B\nLabelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Label").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb new file mode 100644 index 000000000000..486b320844ef --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/load_balancer.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v1/load_balancer.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x1c\n\x0cLoadBalancer\x12\x0c\n\x04name\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11LoadBalancerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + LoadBalancer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.LoadBalancer").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb new file mode 100644 index 000000000000..edec9da51f37 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/log_entry.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/securitycenter/v1/log_entry.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x08LogEntry\x12P\n\x13\x63loud_logging_entry\x18\x01 \x01(\x0b\x32\x31.google.cloud.securitycenter.v1.CloudLoggingEntryH\x00\x42\x0b\n\tlog_entry\"\x81\x01\n\x11\x43loudLoggingEntry\x12\x11\n\tinsert_id\x18\x01 \x01(\t\x12\x0e\n\x06log_id\x18\x02 \x01(\t\x12\x1a\n\x12resource_container\x18\x03 \x01(\t\x12-\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rLogEntryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.LogEntry").msgclass + CloudLoggingEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudLoggingEntry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb new file mode 100644 index 000000000000..76a147892b01 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/mitre_attack.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/cloud/securitycenter/v1/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xbc\x13\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v1.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v1.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v1.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v1.MitreAttack.Technique\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xb4\x02\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x12\n\x0eRECONNAISSANCE\x10\x01\x12\x18\n\x14RESOURCE_DEVELOPMENT\x10\x02\x12\x12\n\x0eINITIAL_ACCESS\x10\x05\x12\r\n\tEXECUTION\x10\x03\x12\x0f\n\x0bPERSISTENCE\x10\x06\x12\x18\n\x14PRIVILEGE_ESCALATION\x10\x08\x12\x13\n\x0f\x44\x45\x46\x45NSE_EVASION\x10\x07\x12\x15\n\x11\x43REDENTIAL_ACCESS\x10\t\x12\r\n\tDISCOVERY\x10\n\x12\x14\n\x10LATERAL_MOVEMENT\x10\x0b\x12\x0e\n\nCOLLECTION\x10\x0c\x12\x17\n\x13\x43OMMAND_AND_CONTROL\x10\x04\x12\x10\n\x0c\x45XFILTRATION\x10\r\x12\n\n\x06IMPACT\x10\x0e\"\x9f\x0e\n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMASQUERADING\x10\x31\x12%\n!MATCH_LEGITIMATE_NAME_OR_LOCATION\x10\x32\x12(\n$BOOT_OR_LOGON_INITIALIZATION_SCRIPTS\x10%\x12\x11\n\rSTARTUP_ITEMS\x10&\x12\x1d\n\x19NETWORK_SERVICE_DISCOVERY\x10 \x12\x15\n\x11PROCESS_DISCOVERY\x10\x38\x12%\n!COMMAND_AND_SCRIPTING_INTERPRETER\x10\x06\x12\x0e\n\nUNIX_SHELL\x10\x07\x12\n\n\x06PYTHON\x10;\x12)\n%EXPLOITATION_FOR_PRIVILEGE_ESCALATION\x10?\x12\x1f\n\x1bPERMISSION_GROUPS_DISCOVERY\x10\x12\x12\x10\n\x0c\x43LOUD_GROUPS\x10\x13\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12\x1e\n\x1a\x41PPLICATION_LAYER_PROTOCOL\x10-\x12\x07\n\x03\x44NS\x10.\x12\x1d\n\x19SOFTWARE_DEPLOYMENT_TOOLS\x10/\x12\x12\n\x0eVALID_ACCOUNTS\x10\x0e\x12\x14\n\x10\x44\x45\x46\x41ULT_ACCOUNTS\x10#\x12\x12\n\x0eLOCAL_ACCOUNTS\x10\x0f\x12\x12\n\x0e\x43LOUD_ACCOUNTS\x10\x10\x12\t\n\x05PROXY\x10\t\x12\x12\n\x0e\x45XTERNAL_PROXY\x10\n\x12\x13\n\x0fMULTI_HOP_PROXY\x10\x0b\x12\x18\n\x14\x41\x43\x43OUNT_MANIPULATION\x10\x16\x12 \n\x1c\x41\x44\x44ITIONAL_CLOUD_CREDENTIALS\x10(\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x16\n\x12RESOURCE_HIJACKING\x10\x08\x12\x1d\n\x19NETWORK_DENIAL_OF_SERVICE\x10\x11\x12\x1b\n\x17\x43LOUD_SERVICE_DISCOVERY\x10\x30\x12\"\n\x1eSTEAL_APPLICATION_ACCESS_TOKEN\x10*\x12\x1a\n\x16\x41\x43\x43OUNT_ACCESS_REMOVAL\x10\x33\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12!\n\x1d\x45XFILTRATION_OVER_WEB_SERVICE\x10\x14\x12!\n\x1d\x45XFILTRATION_TO_CLOUD_STORAGE\x10\x15\x12\x16\n\x12\x44YNAMIC_RESOLUTION\x10\x0c\x12\x19\n\x15LATERAL_TOOL_TRANSFER\x10)\x12\'\n#MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE\x10\x1a\x12\x13\n\x0f\x43REATE_SNAPSHOT\x10\x36\x12\"\n\x1e\x43LOUD_INFRASTRUCTURE_DISCOVERY\x10\x35\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>B\xea\x01\n\"com.google.cloud.securitycenter.v1B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + MitreAttack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack").msgclass + MitreAttack::Tactic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack.Tactic").enummodule + MitreAttack::Technique = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack.Technique").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb new file mode 100644 index 000000000000..6f270729b563 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/mute_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/mute_config.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x06\n\nMuteConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x02\x18\x01\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12L\n\x04type\x18\x08 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.MuteConfig.MuteConfigTypeB\x03\xe0\x41\x01\x12\x34\n\x0b\x65xpiry_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"K\n\x0eMuteConfigType\x12 \n\x1cMUTE_CONFIG_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STATIC\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02:\xaa\x03\xea\x41\xa6\x03\n(securitycenter.googleapis.com/MuteConfig\x12\x36organizations/{organization}/muteConfigs/{mute_config}\x12*folders/{folder}/muteConfigs/{mute_config}\x12,projects/{project}/muteConfigs/{mute_config}\x12Korganizations/{organization}/locations/{location}/muteConfigs/{mute_config}\x12?folders/{folder}/locations/{location}/muteConfigs/{mute_config}\x12\x41projects/{project}/locations/{location}/muteConfigs/{mute_config}*\x0bmuteConfigs2\nmuteConfigB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fMuteConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + MuteConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MuteConfig").msgclass + MuteConfig::MuteConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MuteConfig.MuteConfigType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb new file mode 100644 index 000000000000..f8cc3f85eb77 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/notebook.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v1/notebook.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"x\n\x08Notebook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x13\n\x0blast_author\x18\x03 \x01(\t\x12\x38\n\x14notebook_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rNotebookProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Notebook").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb new file mode 100644 index 000000000000..df0bb0cecc79 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/notification_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n8google/cloud/securitycenter/v1/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc5\x04\n\x12NotificationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x36\n\x0cpubsub_topic\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x10streaming_config\x18\x05 \x01(\x0b\x32\x42.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfigH\x00\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xa1\x02\xea\x41\x9d\x02\n0securitycenter.googleapis.com/NotificationConfig\x12\x46organizations/{organization}/notificationConfigs/{notification_config}\x12:folders/{folder}/notificationConfigs/{notification_config}\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"\x8b\x01\n0DeleteSecurityHealthAnalyticsCustomModuleRequest\x12W\n\x04name\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\nAsecuritycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\"^\n\x18GetBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"V\n\x14GetMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"j\n\x1eGetOrganizationSettingsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2securitycenter.googleapis.com/OrganizationSettings\"\x9a\x01\n6GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x12`\n\x04name\x18\x01 \x01(\tBR\xe0\x41\x02\xfa\x41L\nJsecuritycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\"\x88\x01\n-GetSecurityHealthAnalyticsCustomModuleRequest\x12W\n\x04name\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\nAsecuritycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\x83\x02\n\x12GroupAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x10\x63ompare_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xb8\x01\n\x13GroupAssetsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\x86\x02\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xba\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xb8\x01\n\x0bGroupResult\x12O\n\nproperties\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v1.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\xbd\x01\n9ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xcc\x01\n:ListDescendantSecurityHealthAnalyticsCustomModulesResponse\x12u\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb0\x01\n\x1aListValuedResourcesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/ValuedResource\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x1bListValuedResourcesResponse\x12H\n\x10valued_resources\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x91\x01\n\x16ListAttackPathsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/AttackPath\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"t\n\x17ListAttackPathsResponse\x12@\n\x0c\x61ttack_paths\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v1.AttackPath\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetSimulationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/Simulation\"^\n\x18GetValuedResourceRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/ValuedResource\"\x81\x01\n\x16ListMuteConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListMuteConfigsResponse\x12@\n\x0cmute_configs\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v1.MuteConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8c\x01\n\x1fListNotificationConfigsResponse\x12P\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbc\x01\n8ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xdf\x01\n9ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\x12\x88\x01\n2effective_security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32L.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n/ListSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xc2\x01\n0ListSecurityHealthAnalyticsCustomModulesResponse\x12u\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"g\n\x13ListSourcesResponse\x12\x37\n\x07sources\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v1.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x02\n\x11ListAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xc3\x03\n\x12ListAssetsResponse\x12`\n\x13list_assets_results\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xee\x01\n\x10ListAssetsResult\x12\x34\n\x05\x61sset\x18\x01 \x01(\x0b\x32%.google.cloud.securitycenter.v1.Asset\x12\x65\n\x0cstate_change\x18\x02 \x01(\x0e\x32O.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange\"=\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07REMOVED\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\"\xb0\x02\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xb8\t\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xdb\x07\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Finding\x12i\n\x0cstate_change\x18\x02 \x01(\x0e\x32S.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xe7\x04\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x08 \x01(\t\x12\x0c\n\x04type\x18\x06 \x01(\t\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1c\n\x14project_display_name\x18\x03 \x01(\t\x12\x13\n\x0bparent_name\x18\x04 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x05 \x01(\t\x12\x37\n\x07\x66olders\x18\x07 \x03(\x0b\x32&.google.cloud.securitycenter.v1.Folder\x12\x45\n\x0e\x63loud_provider\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v1.CloudProvider\x12\x14\n\x0corganization\x18\n \x01(\t\x12\x0f\n\x07service\x18\x0b \x01(\t\x12\x10\n\x08location\x18\x0c \x01(\t\x12\x43\n\x0c\x61ws_metadata\x18\x10 \x01(\x0b\x32+.google.cloud.securitycenter.v1.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\x11 \x01(\x0b\x32-.google.cloud.securitycenter.v1.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\x12 \x01(\x0b\x32,.google.cloud.securitycenter.v1.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x13 \x01(\tB\x19\n\x17\x63loud_provider_metadata\"M\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\x0b\n\x07\x43HANGED\x10\x01\x12\r\n\tUNCHANGED\x10\x02\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x03\x12\x0b\n\x07REMOVED\x10\x04\"\xcd\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.StateB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\x8e\x01\n\x0eSetMuteRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12?\n\x04mute\x18\x02 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.MuteB\x03\xe0\x41\x02\"d\n\x18RunAssetDiscoveryRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\"\xac\x03\n2SimulateSecurityHealthAnalyticsCustomModuleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\rcustom_config\x18\x02 \x01(\x0b\x32,.google.cloud.securitycenter.v1.CustomConfigB\x03\xe0\x41\x02\x12{\n\x08resource\x18\x03 \x01(\x0b\x32\x64.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResourceB\x03\xe0\x41\x02\x1a\x99\x01\n\x11SimulatedResource\x12\x1a\n\rresource_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\rresource_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x33\n\x0fiam_policy_data\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\x03\xe0\x41\x01\"\xd9\x02\n3SimulateSecurityHealthAnalyticsCustomModuleResponse\x12s\n\x06result\x18\x01 \x01(\x0b\x32\x63.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult\x1a\xac\x01\n\x0fSimulatedResult\x12:\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.FindingH\x00\x12.\n\x0cno_violation\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystemB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x86\x01\n\x14UpdateFindingRequest\x12=\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x90\x01\n\x17UpdateMuteConfigRequest\x12\x44\n\x0bmute_config\x18\x01 \x01(\x0b\x32*.google.cloud.securitycenter.v1.MuteConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa8\x01\n\x1fUpdateNotificationConfigRequest\x12T\n\x13notification_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xae\x01\n!UpdateOrganizationSettingsRequest\x12X\n\x15organization_settings\x18\x01 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1.OrganizationSettingsB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xde\x01\n0UpdateSecurityHealthAnalyticsCustomModuleRequest\x12y\n\'security_health_analytics_custom_module\x18\x01 \x01(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x83\x01\n\x13UpdateSourceRequest\x12;\n\x06source\x18\x01 \x01(\x0b\x32&.google.cloud.securitycenter.v1.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xc9\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd4\x01\n\x1b\x43reateBigQueryExportRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12M\n\x10\x62ig_query_export\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x89\x01\n\x1aListBigQueryExportsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListBigQueryExportsResponse\x12I\n\x11\x62ig_query_exports\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"\xfc\x01\n-CreateEventThreatDetectionCustomModuleRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12s\n$event_threat_detection_custom_module\x18\x02 \x01(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\"\xb3\x01\n/ValidateEventThreatDetectionCustomModuleRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x15\n\x08raw_text\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x80\x01\n0ValidateEventThreatDetectionCustomModuleResponse\x12L\n\x06\x65rrors\x18\x02 \x01(\x0b\x32<.google.cloud.securitycenter.v1.CustomModuleValidationErrors\"\x85\x01\n-DeleteEventThreatDetectionCustomModuleRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\"\x82\x01\n*GetEventThreatDetectionCustomModuleRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\"\xb7\x01\n6ListDescendantEventThreatDetectionCustomModulesRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xc3\x01\n7ListDescendantEventThreatDetectionCustomModulesResponse\x12o\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n,ListEventThreatDetectionCustomModulesRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xb9\x01\n-ListEventThreatDetectionCustomModulesResponse\x12o\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd5\x01\n-UpdateEventThreatDetectionCustomModuleRequest\x12s\n$event_threat_detection_custom_module\x18\x01 \x01(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n3GetEffectiveEventThreatDetectionCustomModuleRequest\x12]\n\x04name\x18\x01 \x01(\tBO\xe0\x41\x02\xfa\x41I\nGsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\"\xbf\x01\n5ListEffectiveEventThreatDetectionCustomModulesRequest\x12_\n\x06parent\x18\x01 \x01(\tBO\xe0\x41\x02\xfa\x41I\x12Gsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xd6\x01\n6ListEffectiveEventThreatDetectionCustomModulesResponse\x12\x82\x01\n/effective_event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32I.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\xb2\x01\n\x0eSecurityCenter\x12\xe2\x02\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v1.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41P\n7google.cloud.securitycenter.v1.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x92\x01\"./v1/{parent=organizations/*}/findings:bulkMute:\x01*Z-\"(/v1/{parent=folders/*}/findings:bulkMute:\x01*Z.\")/v1/{parent=projects/*}/findings:bulkMute:\x01*\x12\xd5\x04\n)CreateSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\x90\x03\xda\x41.parent,security_health_analytics_custom_module\x82\xd3\xe4\x93\x02\xd8\x02\"J/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_moduleZo\"D/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_moduleZp\"E/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_module\x12\xb1\x01\n\x0c\x43reateSource\x12\x33.google.cloud.securitycenter.v1.CreateSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"D\xda\x41\rparent,source\x82\xd3\xe4\x93\x02.\"$/v1/{parent=organizations/*}/sources:\x06source\x12\xcc\x01\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v1.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\\\xda\x41\x19parent,finding_id,finding\x82\xd3\xe4\x93\x02:\"//v1/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x9c\x04\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v1.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xa2\x03\xda\x41\x12parent,mute_config\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"(/v1/{parent=organizations/*}/muteConfigs:\x0bmute_configZC\"4/v1/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ1\"\"/v1/{parent=folders/*}/muteConfigs:\x0bmute_configZ=\"./v1/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ2\"#/v1/{parent=projects/*}/muteConfigs:\x0bmute_configZ>\"//v1/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_config\x12\xab\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v1.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\x99\x02\xda\x41$parent,config_id,notification_config\xda\x41\x1aparent,notification_config\x82\xd3\xe4\x93\x02\xce\x01\"0/v1/{parent=organizations/*}/notificationConfigs:\x13notification_configZA\"*/v1/{parent=folders/*}/notificationConfigs:\x13notification_configZB\"+/v1/{parent=projects/*}/notificationConfigs:\x13notification_config\x12\x88\x03\n\x10\x44\x65leteMuteConfig\x12\x37.google.cloud.securitycenter.v1.DeleteMuteConfigRequest\x1a\x16.google.protobuf.Empty\"\xa2\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x02*(/v1/{name=organizations/*/muteConfigs/*}Z$*\"/v1/{name=folders/*/muteConfigs/*}Z%*#/v1/{name=projects/*/muteConfigs/*}Z6*4/v1/{name=organizations/*/locations/*/muteConfigs/*}Z0*./v1/{name=folders/*/locations/*/muteConfigs/*}Z1*//v1/{name=projects/*/locations/*/muteConfigs/*}\x12\x93\x02\n\x18\x44\x65leteNotificationConfig\x12?.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest\x1a\x16.google.protobuf.Empty\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01*0/v1/{name=organizations/*/notificationConfigs/*}Z,**/v1/{name=folders/*/notificationConfigs/*}Z-*+/v1/{name=projects/*/notificationConfigs/*}\x12\x83\x03\n)DeleteSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01*J/v1/{name=organizations/*/securityHealthAnalyticsSettings/customModules/*}ZF*D/v1/{name=folders/*/securityHealthAnalyticsSettings/customModules/*}ZG*E/v1/{name=projects/*/securityHealthAnalyticsSettings/customModules/*}\x12\xaa\x01\n\rGetSimulation\x12\x34.google.cloud.securitycenter.v1.GetSimulationRequest\x1a*.google.cloud.securitycenter.v1.Simulation\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=organizations/*/simulations/*}\x12\xc8\x01\n\x11GetValuedResource\x12\x38.google.cloud.securitycenter.v1.GetValuedResourceRequest\x1a..google.cloud.securitycenter.v1.ValuedResource\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=organizations/*/simulations/*/valuedResources/*}\x12\x91\x02\n\x11GetBigQueryExport\x12\x38.google.cloud.securitycenter.v1.GetBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\x91\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x83\x01\x12,/v1/{name=organizations/*/bigQueryExports/*}Z(\x12&/v1/{name=folders/*/bigQueryExports/*}Z)\x12\'/v1/{name=projects/*/bigQueryExports/*}\x12\x96\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"K\xda\x41\x08resource\x82\xd3\xe4\x93\x02:\"5/v1/{resource=organizations/*/sources/*}:getIamPolicy:\x01*\x12\x96\x03\n\rGetMuteConfig\x12\x34.google.cloud.securitycenter.v1.GetMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xa2\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x02\x12(/v1/{name=organizations/*/muteConfigs/*}Z$\x12\"/v1/{name=folders/*/muteConfigs/*}Z%\x12#/v1/{name=projects/*/muteConfigs/*}Z6\x12\x34/v1/{name=organizations/*/locations/*/muteConfigs/*}Z0\x12./v1/{name=folders/*/locations/*/muteConfigs/*}Z1\x12//v1/{name=projects/*/locations/*/muteConfigs/*}\x12\xa9\x02\n\x15GetNotificationConfig\x12<.google.cloud.securitycenter.v1.GetNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12\x30/v1/{name=organizations/*/notificationConfigs/*}Z,\x12*/v1/{name=folders/*/notificationConfigs/*}Z-\x12+/v1/{name=projects/*/notificationConfigs/*}\x12\xcf\x01\n\x17GetOrganizationSettings\x12>.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest\x1a\x34.google.cloud.securitycenter.v1.OrganizationSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=organizations/*/organizationSettings}\x12\xe0\x03\n/GetEffectiveSecurityHealthAnalyticsCustomModule\x12V.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x1aL.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule\"\x86\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf8\x01\x12S/v1/{name=organizations/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}ZO\x12M/v1/{name=folders/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}ZP\x12N/v1/{name=projects/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}\x12\xaa\x03\n&GetSecurityHealthAnalyticsCustomModule\x12M.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01\x12J/v1/{name=organizations/*/securityHealthAnalyticsSettings/customModules/*}ZF\x12\x44/v1/{name=folders/*/securityHealthAnalyticsSettings/customModules/*}ZG\x12\x45/v1/{name=projects/*/securityHealthAnalyticsSettings/customModules/*}\x12\x9a\x01\n\tGetSource\x12\x30.google.cloud.securitycenter.v1.GetSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=organizations/*/sources/*}\x12\x86\x02\n\x0bGroupAssets\x12\x32.google.cloud.securitycenter.v1.GroupAssetsRequest\x1a\x33.google.cloud.securitycenter.v1.GroupAssetsResponse\"\x8d\x01\x88\x02\x01\x82\xd3\xe4\x93\x02\x83\x01\")/v1/{parent=organizations/*}/assets:group:\x01*Z(\"#/v1/{parent=folders/*}/assets:group:\x01*Z)\"$/v1/{parent=projects/*}/assets:group:\x01*\x12\xbf\x02\n\rGroupFindings\x12\x34.google.cloud.securitycenter.v1.GroupFindingsRequest\x1a\x35.google.cloud.securitycenter.v1.GroupFindingsResponse\"\xc0\x01\xda\x41\x0fparent,group_by\x82\xd3\xe4\x93\x02\xa7\x01\"5/v1/{parent=organizations/*/sources/*}/findings:group:\x01*Z4\"//v1/{parent=folders/*/sources/*}/findings:group:\x01*Z5\"0/v1/{parent=projects/*/sources/*}/findings:group:\x01*\x12\xe6\x01\n\nListAssets\x12\x31.google.cloud.securitycenter.v1.ListAssetsRequest\x1a\x32.google.cloud.securitycenter.v1.ListAssetsResponse\"q\x88\x02\x01\x82\xd3\xe4\x93\x02h\x12#/v1/{parent=organizations/*}/assetsZ\x1f\x12\x1d/v1/{parent=folders/*}/assetsZ \x12\x1e/v1/{parent=projects/*}/assets\x12\x88\x04\n2ListDescendantSecurityHealthAnalyticsCustomModules\x12Y.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x1aZ.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse\"\x9a\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8a\x02\x12Y/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:listDescendantZU\x12S/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:listDescendantZV\x12T/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:listDescendant\x12\x8f\x02\n\x0cListFindings\x12\x33.google.cloud.securitycenter.v1.ListFindingsRequest\x1a\x34.google.cloud.securitycenter.v1.ListFindingsResponse\"\x93\x01\x82\xd3\xe4\x93\x02\x8c\x01\x12//v1/{parent=organizations/*/sources/*}/findingsZ+\x12)/v1/{parent=folders/*/sources/*}/findingsZ,\x12*/v1/{parent=projects/*/sources/*}/findings\x12\xa9\x03\n\x0fListMuteConfigs\x12\x36.google.cloud.securitycenter.v1.ListMuteConfigsRequest\x1a\x37.google.cloud.securitycenter.v1.ListMuteConfigsResponse\"\xa4\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x94\x02\x12(/v1/{parent=organizations/*}/muteConfigsZ$\x12\"/v1/{parent=folders/*}/muteConfigsZ%\x12#/v1/{parent=projects/*}/muteConfigsZ6\x12\x34/v1/{parent=organizations/*/locations/*/muteConfigs}Z0\x12./v1/{parent=folders/*/locations/*/muteConfigs}Z1\x12//v1/{parent=projects/*/locations/*/muteConfigs}\x12\xbc\x02\n\x17ListNotificationConfigs\x12>.google.cloud.securitycenter.v1.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v1.ListNotificationConfigsResponse\"\x9f\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8f\x01\x12\x30/v1/{parent=organizations/*}/notificationConfigsZ,\x12*/v1/{parent=folders/*}/notificationConfigsZ-\x12+/v1/{parent=projects/*}/notificationConfigs\x12\xf3\x03\n1ListEffectiveSecurityHealthAnalyticsCustomModules\x12X.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x1aY.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\"\x88\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xf8\x01\x12S/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/effectiveCustomModulesZO\x12M/v1/{parent=folders/*/securityHealthAnalyticsSettings}/effectiveCustomModulesZP\x12N/v1/{parent=projects/*/securityHealthAnalyticsSettings}/effectiveCustomModules\x12\xbd\x03\n(ListSecurityHealthAnalyticsCustomModules\x12O.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest\x1aP.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse\"\xed\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xdd\x01\x12J/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModulesZF\x12\x44/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModulesZG\x12\x45/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules\x12\xf2\x01\n\x0bListSources\x12\x32.google.cloud.securitycenter.v1.ListSourcesRequest\x1a\x33.google.cloud.securitycenter.v1.ListSourcesResponse\"z\xda\x41\x06parent\x82\xd3\xe4\x93\x02k\x12$/v1/{parent=organizations/*}/sourcesZ \x12\x1e/v1/{parent=folders/*}/sourcesZ!\x12\x1f/v1/{parent=projects/*}/sources\x12\x8a\x02\n\x11RunAssetDiscovery\x12\x38.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\x88\x02\x01\xca\x41Q\n8google.cloud.securitycenter.v1.RunAssetDiscoveryResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\"0/v1/{parent=organizations/*}/assets:runDiscovery:\x01*\x12\xc4\x02\n\x0fSetFindingState\x12\x36.google.cloud.securitycenter.v1.SetFindingStateRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xcf\x01\xda\x41\x15name,state,start_time\x82\xd3\xe4\x93\x02\xb0\x01\"8/v1/{name=organizations/*/sources/*/findings/*}:setState:\x01*Z7\"2/v1/{name=folders/*/sources/*/findings/*}:setState:\x01*Z8\"3/v1/{name=projects/*/sources/*/findings/*}:setState:\x01*\x12\xa5\x02\n\x07SetMute\x12..google.cloud.securitycenter.v1.SetMuteRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xc0\x01\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\xad\x01\"7/v1/{name=organizations/*/sources/*/findings/*}:setMute:\x01*Z6\"1/v1/{name=folders/*/sources/*/findings/*}:setMute:\x01*Z7\"2/v1/{name=projects/*/sources/*/findings/*}:setMute:\x01*\x12\x9d\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02:\"5/v1/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xc8\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02@\";/v1/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\x81\x04\n+SimulateSecurityHealthAnalyticsCustomModule\x12R.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest\x1aS.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse\"\xa8\x02\xda\x41\x1dparent,custom_config,resource\x82\xd3\xe4\x93\x02\x81\x02\"S/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*ZR\"M/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*ZS\"N/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*\x12\xd0\x03\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v1.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v1.ExternalSystem\"\xca\x02\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xa5\x02\x32Q/v1/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v1/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v1/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xc1\x02\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v1.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xd0\x01\xda\x41\x07\x66inding\x82\xd3\xe4\x93\x02\xbf\x01\x32\x37/v1/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZ<21/v1/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZ=22/v1/{finding.name=projects/*/sources/*/findings/*}:\x07\x66inding\x12\xc5\x04\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v1.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xcb\x03\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v1/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZ=2./v1/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZ>2//v1/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZO2@/v1/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZI2:/v1/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZJ2;/v1/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x12\xdb\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\xc9\x02\xda\x41\x13notification_config\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\x8a\x02\x32\x44/v1/{notification_config.name=organizations/*/notificationConfigs/*}:\x13notification_configZU2>/v1/{notification_config.name=folders/*/notificationConfigs/*}:\x13notification_configZV2?/v1/{notification_config.name=projects/*/notificationConfigs/*}:\x13notification_config\x12\x93\x02\n\x1aUpdateOrganizationSettings\x12\x41.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest\x1a\x34.google.cloud.securitycenter.v1.OrganizationSettings\"|\xda\x41\x15organization_settings\x82\xd3\xe4\x93\x02^2E/v1/{organization_settings.name=organizations/*/organizationSettings}:\x15organization_settings\x12\xd4\x05\n)UpdateSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\x8f\x04\xda\x41\x33security_health_analytics_custom_module,update_mask\x82\xd3\xe4\x93\x02\xd2\x03\x32r/v1/{security_health_analytics_custom_module.name=organizations/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_moduleZ\x97\x01\x32l/v1/{security_health_analytics_custom_module.name=folders/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_moduleZ\x98\x01\x32m/v1/{security_health_analytics_custom_module.name=projects/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_module\x12\xb1\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v1.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"D\xda\x41\x06source\x82\xd3\xe4\x93\x02\x35\x32+/v1/{source.name=organizations/*/sources/*}:\x06source\x12\x9f\x05\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v1.SecurityMarks\"\x9c\x04\xda\x41\x0esecurity_marks\x82\xd3\xe4\x93\x02\x84\x04\x32@/v1/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZL2:/v1/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZM2;/v1/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZ^2L/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xf4\x02\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v1.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\xee\x01\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xb9\x01\",/v1/{parent=organizations/*}/bigQueryExports:\x10\x62ig_query_exportZ:\"&/v1/{parent=folders/*}/bigQueryExports:\x10\x62ig_query_exportZ;\"\'/v1/{parent=projects/*}/bigQueryExports:\x10\x62ig_query_export\x12\xff\x01\n\x14\x44\x65leteBigQueryExport\x12;.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest\x1a\x16.google.protobuf.Empty\"\x91\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x83\x01*,/v1/{name=organizations/*/bigQueryExports/*}Z(*&/v1/{name=folders/*/bigQueryExports/*}Z)*\'/v1/{name=projects/*/bigQueryExports/*}\x12\x98\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\x92\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\xec\x01\x32=/v1/{big_query_export.name=organizations/*/bigQueryExports/*}:\x10\x62ig_query_exportZK27/v1/{big_query_export.name=folders/*/bigQueryExports/*}:\x10\x62ig_query_exportZL28/v1/{big_query_export.name=projects/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\xa4\x02\n\x13ListBigQueryExports\x12:.google.cloud.securitycenter.v1.ListBigQueryExportsRequest\x1a;.google.cloud.securitycenter.v1.ListBigQueryExportsResponse\"\x93\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x83\x01\x12,/v1/{parent=organizations/*}/bigQueryExportsZ(\x12&/v1/{parent=folders/*}/bigQueryExportsZ)\x12\'/v1/{parent=projects/*}/bigQueryExports\x12\xb7\x04\n&CreateEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xfb\x02\xda\x41+parent,event_threat_detection_custom_module\x82\xd3\xe4\x93\x02\xc6\x02\"G/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_moduleZi\"A/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_moduleZj\"B/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_module\x12\xf4\x02\n&DeleteEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xe2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd4\x01*G/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}ZC*A/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}ZD*B/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}\x12\x98\x03\n#GetEventThreatDetectionCustomModule\x12J.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xe2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd4\x01\x12G/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}ZC\x12\x41/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}ZD\x12\x42/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}\x12\xf6\x03\n/ListDescendantEventThreatDetectionCustomModules\x12V.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest\x1aW.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse\"\x91\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x02\x12V/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:listDescendantZR\x12P/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:listDescendantZS\x12Q/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:listDescendant\x12\xab\x03\n%ListEventThreatDetectionCustomModules\x12L.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest\x1aM.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse\"\xe4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd4\x01\x12G/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModulesZC\x12\x41/v1/{parent=folders/*/eventThreatDetectionSettings}/customModulesZD\x12\x42/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules\x12\xad\x05\n&UpdateEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xf1\x03\xda\x41\x30\x65vent_threat_detection_custom_module,update_mask\x82\xd3\xe4\x93\x02\xb7\x03\x32l/v1/{event_threat_detection_custom_module.name=organizations/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_moduleZ\x8e\x01\x32\x66/v1/{event_threat_detection_custom_module.name=folders/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_moduleZ\x8f\x01\x32g/v1/{event_threat_detection_custom_module.name=projects/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_module\x12\xc9\x03\n(ValidateEventThreatDetectionCustomModule\x12O.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest\x1aP.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse\"\xf9\x01\x82\xd3\xe4\x93\x02\xf2\x01\"N/v1/{parent=organizations/*/eventThreatDetectionSettings}:validateCustomModule:\x01*ZM\"H/v1/{parent=folders/*/eventThreatDetectionSettings}:validateCustomModule:\x01*ZN\"I/v1/{parent=projects/*/eventThreatDetectionSettings}:validateCustomModule:\x01*\x12\xce\x03\n,GetEffectiveEventThreatDetectionCustomModule\x12S.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest\x1aI.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule\"\xfd\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xef\x01\x12P/v1/{name=organizations/*/eventThreatDetectionSettings/effectiveCustomModules/*}ZL\x12J/v1/{name=folders/*/eventThreatDetectionSettings/effectiveCustomModules/*}ZM\x12K/v1/{name=projects/*/eventThreatDetectionSettings/effectiveCustomModules/*}\x12\xe1\x03\n.ListEffectiveEventThreatDetectionCustomModules\x12U.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest\x1aV.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse\"\xff\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xef\x01\x12P/v1/{parent=organizations/*/eventThreatDetectionSettings}/effectiveCustomModulesZL\x12J/v1/{parent=folders/*/eventThreatDetectionSettings}/effectiveCustomModulesZM\x12K/v1/{parent=projects/*/eventThreatDetectionSettings}/effectiveCustomModules\x12\x8e\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse\"Z\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x42\"=/v1/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*\x12\xb7\x01\n\x19\x44\x65leteResourceValueConfig\x12@.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest\x1a\x16.google.protobuf.Empty\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=organizations/*/resourceValueConfigs/*}\x12\xce\x01\n\x16GetResourceValueConfig\x12=.google.cloud.securitycenter.v1.GetResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v1.ResourceValueConfig\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=organizations/*/resourceValueConfigs/*}\x12\xe1\x01\n\x18ListResourceValueConfigs\x12?.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest\x1a@.google.cloud.securitycenter.v1.ListResourceValueConfigsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=organizations/*}/resourceValueConfigs\x12\x9f\x02\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v1.ResourceValueConfig\"\x8a\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02`2G/v1/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xb3\x02\n\x13ListValuedResources\x12:.google.cloud.securitycenter.v1.ListValuedResourcesRequest\x1a;.google.cloud.securitycenter.v1.ListValuedResourcesResponse\"\xa2\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x92\x01\x12:/v1/{parent=organizations/*/simulations/*}/valuedResourcesZT\x12R/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/valuedResources\x12\xeb\x02\n\x0fListAttackPaths\x12\x36.google.cloud.securitycenter.v1.ListAttackPathsRequest\x1a\x37.google.cloud.securitycenter.v1.ListAttackPathsResponse\"\xe6\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd6\x01\x12\x36/v1/{parent=organizations/*/simulations/*}/attackPathsZJ\x12H/v1/{parent=organizations/*/simulations/*/valuedResources/*}/attackPathsZP\x12N/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe5\x05\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41m\n4securitycenter.googleapis.com/OrganizationSimulation\x12\x35organizations/{organization}/simulations/{simulation}\xea\x41\xd7\x01\n:securitycenter.googleapis.com/EventThreatDetectionSettings\x12\x39organizations/{organization}/eventThreatDetectionSettings\x12-folders/{folder}/eventThreatDetectionSettings\x12/projects/{project}/eventThreatDetectionSettingsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + BulkMuteFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsRequest").msgclass + BulkMuteFindingsRequest::MuteState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsRequest.MuteState").enummodule + BulkMuteFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsResponse").msgclass + CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateFindingRequest").msgclass + CreateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateMuteConfigRequest").msgclass + CreateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateResourceValueConfigRequest").msgclass + BatchCreateResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest").msgclass + BatchCreateResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse").msgclass + DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest").msgclass + GetResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetResourceValueConfigRequest").msgclass + ListResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListResourceValueConfigsRequest").msgclass + ListResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListResourceValueConfigsResponse").msgclass + UpdateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest").msgclass + CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateNotificationConfigRequest").msgclass + CreateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest").msgclass + CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateSourceRequest").msgclass + DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteMuteConfigRequest").msgclass + DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteNotificationConfigRequest").msgclass + DeleteSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest").msgclass + GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetBigQueryExportRequest").msgclass + GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetMuteConfigRequest").msgclass + GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetNotificationConfigRequest").msgclass + GetOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetOrganizationSettingsRequest").msgclass + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest").msgclass + GetSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest").msgclass + GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSourceRequest").msgclass + GroupAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupAssetsRequest").msgclass + GroupAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupAssetsResponse").msgclass + GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupFindingsRequest").msgclass + GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupFindingsResponse").msgclass + GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupResult").msgclass + ListDescendantSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest").msgclass + ListDescendantSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse").msgclass + ListValuedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListValuedResourcesRequest").msgclass + ListValuedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListValuedResourcesResponse").msgclass + ListAttackPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAttackPathsRequest").msgclass + ListAttackPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAttackPathsResponse").msgclass + GetSimulationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSimulationRequest").msgclass + GetValuedResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetValuedResourceRequest").msgclass + ListMuteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListMuteConfigsRequest").msgclass + ListMuteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListMuteConfigsResponse").msgclass + ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListNotificationConfigsRequest").msgclass + ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListNotificationConfigsResponse").msgclass + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest").msgclass + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse").msgclass + ListSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest").msgclass + ListSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse").msgclass + ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSourcesRequest").msgclass + ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSourcesResponse").msgclass + ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsRequest").msgclass + ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse").msgclass + ListAssetsResponse::ListAssetsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult").msgclass + ListAssetsResponse::ListAssetsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange").enummodule + ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsRequest").msgclass + ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse").msgclass + ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult").msgclass + ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource").msgclass + ListFindingsResponse::ListFindingsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange").enummodule + SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SetFindingStateRequest").msgclass + SetMuteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SetMuteRequest").msgclass + RunAssetDiscoveryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.RunAssetDiscoveryRequest").msgclass + SimulateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest").msgclass + SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource").msgclass + SimulateSecurityHealthAnalyticsCustomModuleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse").msgclass + SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult").msgclass + UpdateExternalSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateExternalSystemRequest").msgclass + UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateFindingRequest").msgclass + UpdateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateMuteConfigRequest").msgclass + UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateNotificationConfigRequest").msgclass + UpdateOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest").msgclass + UpdateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest").msgclass + UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSourceRequest").msgclass + UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSecurityMarksRequest").msgclass + CreateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateBigQueryExportRequest").msgclass + UpdateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateBigQueryExportRequest").msgclass + ListBigQueryExportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListBigQueryExportsRequest").msgclass + ListBigQueryExportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListBigQueryExportsResponse").msgclass + DeleteBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteBigQueryExportRequest").msgclass + CreateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest").msgclass + ValidateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest").msgclass + ValidateEventThreatDetectionCustomModuleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse").msgclass + DeleteEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest").msgclass + GetEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest").msgclass + ListDescendantEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest").msgclass + ListDescendantEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse").msgclass + ListEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest").msgclass + ListEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse").msgclass + UpdateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest").msgclass + GetEffectiveEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest").msgclass + ListEffectiveEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest").msgclass + ListEffectiveEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb new file mode 100644 index 000000000000..0d62cc122298 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb @@ -0,0 +1,226 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/securitycenter/v1/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/securitycenter/v1/securitycenter_service_pb' + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + # V1 APIs for Security Center service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.securitycenter.v1.SecurityCenter' + + # Kicks off an LRO to bulk mute findings for a parent based on a filter. The + # parent can be either an organization, folder or project. The findings + # matched by the filter will be muted after the LRO is done. + rpc :BulkMuteFindings, ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Google::Longrunning::Operation + # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the + # given CRM parent, and also creates inherited + # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given + # parent. These modules are enabled by default. + rpc :CreateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule + # Creates a source. + rpc :CreateSource, ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source + # Creates a finding. The corresponding source must exist for finding creation + # to succeed. + rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V1::Finding + # Creates a mute config. + rpc :CreateMuteConfig, ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig + # Creates a notification config. + rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig + # Deletes an existing mute config. + rpc :DeleteMuteConfig, ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Google::Protobuf::Empty + # Deletes a notification config. + rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty + # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its + # descendants in the CRM hierarchy. This method is only supported for + # resident custom modules. + rpc :DeleteSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Google::Protobuf::Empty + # Get the simulation by name or the latest simulation for the given + # organization. + rpc :GetSimulation, ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Google::Cloud::SecurityCenter::V1::Simulation + # Get the valued resource by name + rpc :GetValuedResource, ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Google::Cloud::SecurityCenter::V1::ValuedResource + # Gets a BigQuery export. + rpc :GetBigQueryExport, ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport + # Gets the access control policy on the specified Source. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets a mute config. + rpc :GetMuteConfig, ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig + # Gets a notification config. + rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig + # Gets the settings for an organization. + rpc :GetOrganizationSettings, ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1::OrganizationSettings + # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + rpc :GetEffectiveSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule + # Retrieves a SecurityHealthAnalyticsCustomModule. + rpc :GetSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule + # Gets a source. + rpc :GetSource, ::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source + # Filters an organization's assets and groups them by their specified + # properties. + rpc :GroupAssets, ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/{organization_id}/sources/-/findings, + # /v1/folders/{folder_id}/sources/-/findings, + # /v1/projects/{project_id}/sources/-/findings + rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse + # Lists an organization's assets. + rpc :ListAssets, ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse + # Returns a list of all resident SecurityHealthAnalyticsCustomModules under + # the given CRM parent and all of the parent’s CRM descendants. + rpc :ListDescendantSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1/organizations/{organization_id}/sources/-/findings + rpc :ListFindings, ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse + # Lists mute configs. + rpc :ListMuteConfigs, ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse + # Lists notification configs. + rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse + # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + # given parent. This includes resident modules defined at the scope of the + # parent, and inherited modules, inherited from CRM ancestors. + rpc :ListEffectiveSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + # Returns a list of all SecurityHealthAnalyticsCustomModules for the given + # parent. This includes resident modules defined at the scope of the parent, + # and inherited modules, inherited from CRM ancestors. + rpc :ListSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse + # Lists all sources belonging to an organization. + rpc :ListSources, ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + rpc :RunAssetDiscovery, ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Google::Longrunning::Operation + # Updates the state of a finding. + rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V1::Finding + # Updates the mute state of a finding. + rpc :SetMute, ::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Google::Cloud::SecurityCenter::V1::Finding + # Sets the access control policy on the specified Source. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the permissions that a caller has on the specified source. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + rpc :SimulateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse + # Updates external system. This is for a given finding. + rpc :UpdateExternalSystem, ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Google::Cloud::SecurityCenter::V1::ExternalSystem + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V1::Finding + # Updates a mute config. + rpc :UpdateMuteConfig, ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig + # + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig + # Updates an organization's settings. + rpc :UpdateOrganizationSettings, ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1::OrganizationSettings + # Updates the SecurityHealthAnalyticsCustomModule under the given name based + # on the given update mask. Updating the enablement state is supported on + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name and custom + # config of a module is supported on resident modules only. + rpc :UpdateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule + # Updates a source. + rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source + # Updates security marks. + rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V1::SecurityMarks + # Creates a BigQuery export. + rpc :CreateBigQueryExport, ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport + # Deletes an existing BigQuery export. + rpc :DeleteBigQueryExport, ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Google::Protobuf::Empty + # Updates a BigQuery export. + rpc :UpdateBigQueryExport, ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + rpc :ListBigQueryExports, ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse + # Creates a resident Event Threat Detection custom module at the scope of the + # given Resource Manager parent, and also creates inherited custom modules + # for all descendants of the given parent. These modules are enabled by + # default. + rpc :CreateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule + # Deletes the specified Event Threat Detection custom module and all of its + # descendants in the Resource Manager hierarchy. This method is only + # supported for resident custom modules. + rpc :DeleteEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Google::Protobuf::Empty + # Gets an Event Threat Detection custom module. + rpc :GetEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule + # Lists all resident Event Threat Detection custom modules under the + # given Resource Manager parent and its descendants. + rpc :ListDescendantEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse + # Lists all Event Threat Detection custom modules for the given + # Resource Manager parent. This includes resident modules defined at the + # scope of the parent along with modules inherited from ancestors. + rpc :ListEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse + # Updates the Event Threat Detection custom module with the given name based + # on the given update mask. Updating the enablement state is supported for + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name or + # configuration of a module is supported for resident modules only. The type + # of a module cannot be changed. + rpc :UpdateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule + # Validates the given Event Threat Detection custom module. + rpc :ValidateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse + # Gets an effective Event Threat Detection custom module at the given level. + rpc :GetEffectiveEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule + # Lists all effective Event Threat Detection custom modules for the + # given parent. This includes resident modules defined at the scope of the + # parent along with modules inherited from its ancestors. + rpc :ListEffectiveEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + rpc :BatchCreateResourceValueConfigs, ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse + # Deletes a ResourceValueConfig. + rpc :DeleteResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Google::Protobuf::Empty + # Gets a ResourceValueConfig. + rpc :GetResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig + # Lists all ResourceValueConfigs. + rpc :ListResourceValueConfigs, ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse + # Updates an existing ResourceValueConfigs with new rules. + rpc :UpdateResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig + # Lists the valued resources for a set of simulation results and filter. + rpc :ListValuedResources, ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + rpc :ListAttackPaths, ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb new file mode 100644 index 000000000000..577a4d977a3a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/simulation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1/resource_pb' +require 'google/cloud/securitycenter/v1/valued_resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/simulation.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v1/resource.proto\x1a\x34google/cloud/securitycenter/v1/valued_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x02\n\nSimulation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x64\n\x1fresource_value_configs_metadata\x18\x03 \x03(\x0b\x32;.google.cloud.securitycenter.v1.ResourceValueConfigMetadata\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.CloudProvider:}\xea\x41z\n(securitycenter.googleapis.com/Simulation\x12\x35organizations/{organization}/simulations/{simulation}*\x0bsimulations2\nsimulationB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fSimulationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Simulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Simulation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb new file mode 100644 index 000000000000..2f7921ed6f0b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/source.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n+google/cloud/securitycenter/v1/source.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xfd\x01\n\x06Source\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t:\xa1\x01\xea\x41\x9d\x01\n$securitycenter.googleapis.com/Source\x12-organizations/{organization}/sources/{source}\x12!folders/{folder}/sources/{source}\x12#projects/{project}/sources/{source}B\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Source").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb new file mode 100644 index 000000000000..78da4c94159e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/toxic_combination.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/cloud/securitycenter/v1/toxic_combination.proto\x12\x1egoogle.cloud.securitycenter.v1\"K\n\x10ToxicCombination\x12\x1d\n\x15\x61ttack_exposure_score\x18\x01 \x01(\x01\x12\x18\n\x10related_findings\x18\x02 \x03(\tB\xef\x01\n\"com.google.cloud.securitycenter.v1B\x15ToxicCombinationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ToxicCombination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ToxicCombination").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb new file mode 100644 index 000000000000..c0a8708958bb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/valued_resource.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/valued_resource.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xd8\x04\n\x0eValuedResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08resource\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12T\n\x0eresource_value\x18\x05 \x01(\x0e\x32<.google.cloud.securitycenter.v1.ValuedResource.ResourceValue\x12\x15\n\rexposed_score\x18\x06 \x01(\x01\x12`\n\x1bresource_value_configs_used\x18\x07 \x03(\x0b\x32;.google.cloud.securitycenter.v1.ResourceValueConfigMetadata\"{\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_VALUE_LOW\x10\x01\x12\x19\n\x15RESOURCE_VALUE_MEDIUM\x10\x02\x12\x17\n\x13RESOURCE_VALUE_HIGH\x10\x03:\xac\x01\xea\x41\xa8\x01\n,securitycenter.googleapis.com/ValuedResource\x12Worganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}*\x0fvaluedResources2\x0evaluedResource\"+\n\x1bResourceValueConfigMetadata\x12\x0c\n\x04name\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13ValuedResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ValuedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValuedResource").msgclass + ValuedResource::ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValuedResource.ResourceValue").enummodule + ResourceValueConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ResourceValueConfigMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb new file mode 100644 index 000000000000..64dcf8c6b5f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/vulnerability.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/securitycenter/v1/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v1.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.SecurityBulletin\"\x8a\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v1.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v1.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v1.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v1.Cve.ExploitationActivity\x12\x1c\n\x14observed_in_the_wild\x18\x07 \x01(\x08\x12\x10\n\x08zero_day\x18\x08 \x01(\x08\x12\x38\n\x14\x65xploit_release_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nRiskRating\x12\x1b\n\x17RISK_RATING_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"\x84\x01\n\x14\x45xploitationActivity\x12%\n!EXPLOITATION_ACTIVITY_UNSPECIFIED\x10\x00\x12\x08\n\x04WIDE\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\x0f\n\x0b\x41NTICIPATED\x10\x04\x12\x0c\n\x08NO_KNOWN\x10\x05\"(\n\tReference\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xb1\n\n\x06\x43vssv3\x12\x12\n\nbase_score\x18\x01 \x01(\x01\x12J\n\rattack_vector\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v1.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x06 \x01(\x0e\x32\x37.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x07 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x08 \x01(\x0e\x32\x36.google.cloud.securitycenter.v1.Cvssv3.UserInteraction\x12;\n\x05scope\x18\t \x01(\x0e\x32,.google.cloud.securitycenter.v1.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x0b \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"_\n\x07Package\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x17\n\x0fpackage_version\x18\x04 \x01(\t\"\x7f\n\x10SecurityBulletin\x12\x13\n\x0b\x62ulletin_id\x18\x01 \x01(\t\x12\x33\n\x0fsubmission_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19suggested_upgrade_version\x18\x03 \x01(\tB\xec\x01\n\"com.google.cloud.securitycenter.v1B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Vulnerability").msgclass + Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve").msgclass + Cve::RiskRating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve.RiskRating").enummodule + Cve::ExploitationActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve.ExploitationActivity").enummodule + Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Reference").msgclass + Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3").msgclass + Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackVector").enummodule + Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackComplexity").enummodule + Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired").enummodule + Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.UserInteraction").enummodule + Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Scope").enummodule + Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Impact").enummodule + Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Package").msgclass + SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SecurityBulletin").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md new file mode 100644 index 000000000000..2477ff9d487e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Security Command Center V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb new file mode 100644 index 000000000000..31e390d3f8a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb @@ -0,0 +1,120 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents an access event. + # @!attribute [rw] principal_email + # @return [::String] + # Associated email, such as "foo@google.com". + # + # The email address of the authenticated user or a service account acting on + # behalf of a third party principal making the request. For third party + # identity callers, the `principal_subject` field is populated instead of + # this field. For privacy reasons, the principal email address is sometimes + # redacted. For more information, see [Caller identities in audit + # logs](https://cloud.google.com/logging/docs/audit#user-id). + # @!attribute [rw] caller_ip + # @return [::String] + # Caller's IP address, such as "1.1.1.1". + # @!attribute [rw] caller_ip_geo + # @return [::Google::Cloud::SecurityCenter::V1::Geolocation] + # The caller IP's geolocation, which identifies where the call came from. + # @!attribute [rw] user_agent_family + # @return [::String] + # Type of user agent associated with the finding. For example, an operating + # system shell or an embedded or standalone application. + # @!attribute [rw] user_agent + # @return [::String] + # The caller's user agent string associated with the finding. + # @!attribute [rw] service_name + # @return [::String] + # This is the API service that the service account made a call to, e.g. + # "iam.googleapis.com" + # @!attribute [rw] method_name + # @return [::String] + # The method that the service account called, e.g. "SetIamPolicy". + # @!attribute [rw] principal_subject + # @return [::String] + # A string that represents the principal_subject that is associated with the + # identity. Unlike `principal_email`, `principal_subject` supports principals + # that aren't associated with email addresses, such as third party + # principals. For most identities, the format is + # `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. + # Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, + # still use the legacy format `serviceAccount:{identity pool + # name}[\\{subject}]`. + # @!attribute [rw] service_account_key_name + # @return [::String] + # The name of the service account key that was used to create or exchange + # credentials when authenticating the service account that made the request. + # This is a scheme-less URI full resource name. For example: + # + # "//iam.googleapis.com/projects/\\{PROJECT_ID}/serviceAccounts/\\{ACCOUNT}/keys/\\{key}". + # @!attribute [rw] service_account_delegation_info + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ServiceAccountDelegationInfo>] + # The identity delegation history of an authenticated service account that + # made the request. The `serviceAccountDelegationInfo[]` object contains + # information about the real authorities that try to access Google Cloud + # resources by delegating on a service account. When multiple authorities are + # present, they are guaranteed to be sorted based on the original ordering of + # the identity delegation events. + # @!attribute [rw] user_name + # @return [::String] + # A string that represents a username. The username provided depends on the + # type of the finding and is likely not an IAM principal. For example, this + # can be a system username if the finding is related to a virtual machine, or + # it can be an application login username. + class Access + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identity delegation history of an authenticated service account. + # @!attribute [rw] principal_email + # @return [::String] + # The email address of a Google account. + # @!attribute [rw] principal_subject + # @return [::String] + # A string representing the principal_subject associated with the identity. + # As compared to `principal_email`, supports principals that aren't + # associated with email addresses, such as third party principals. For most + # identities, the format will be `principal://iam.googleapis.com/{identity + # pool name}/subjects/\\{subject}` except for some GKE identities + # (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + # format `serviceAccount:{identity pool name}[{subject}]` + class ServiceAccountDelegationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a geographical location for a given access. + # @!attribute [rw] region_code + # @return [::String] + # A CLDR. + class Geolocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb new file mode 100644 index 000000000000..a3af9a6b18af --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a monitored AI Agent. + # @!attribute [rw] id + # @return [::String] + # Identifier of the agent. + # @!attribute [rw] display_name + # @return [::String] + # The user friendly name of the specific agent instance where the finding was + # detected, for example, "Banking Agent". + class Agent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb new file mode 100644 index 000000000000..00775041de5b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents details about an anomaly detected in an AI agent's behavior. + # @!attribute [rw] confidence_score + # @return [::Float] + # The overall confidence score indicating the likelihood that this session + # contains a true anomaly. The score ranges from 0.0 to 1.0, where 1.0 + # signifies 100% confidence in the presence of an anomaly and 0.0 signifies + # 0% confidence. + # @!attribute [rw] detector_references + # @return [::Array<::Google::Cloud::SecurityCenter::V1::DetectorReference>] + # The list of references to specific detectors that identified anomalies + # within this session. + # @!attribute [rw] invocation_references + # @return [::Array<::Google::Cloud::SecurityCenter::V1::InvocationReference>] + # References to the OpenTelemetry invocations. + class AgentAnomaly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a reference to a specific anomaly detector. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V1::DetectorReference::Severity] + # The severity of the detector. + # @!attribute [rw] detector_id + # @return [::String] + # The unique identifier of the detector. + # @!attribute [rw] display_name + # @return [::String] + # A human readable name for the detector, providing context on its purpose. + # For example, "ASI02: Tool Misuse", or "Excessive API Calls". + # @!attribute [rw] explanation + # @return [::String] + # A detailed explanation generated by an LLM or the detector itself, + # describing why this specific anomaly was flagged. This provides rationale + # and context for the detection. + # @!attribute [rw] recommendation + # @return [::String] + # Recommended steps or actions to remediate or investigate the anomaly + # flagged by this detector. These could include configuration changes, code + # adjustments, or further diagnostic procedures. + class DetectorReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Severity levels for detectors. + module Severity + # Unspecified severity. + SEVERITY_UNSPECIFIED = 0 + + # Critical severity. + CRITICAL = 1 + + # High severity. + HIGH = 2 + + # Medium severity. + MEDIUM = 3 + + # Low severity. + LOW = 4 + end + end + + # Represents a reference to a specific OpenTelemetry invocation. + # @!attribute [rw] invocation_id + # @return [::String] + # The unique identifier of the invocation. + class InvocationReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb new file mode 100644 index 000000000000..53426497c9e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a conversational session where the finding occurred. + # @!attribute [rw] session_id + # @return [::String] + # The session ID of a conversation. + class AgentSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb new file mode 100644 index 000000000000..219bf34fde42 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents an application associated with a finding. + # @!attribute [rw] base_uri + # @return [::String] + # The base URI that identifies the network location of the application in + # which the vulnerability was detected. For example, `http://example.com`. + # @!attribute [rw] full_uri + # @return [::String] + # The full URI with payload that can be used to reproduce the + # vulnerability. For example, `http://example.com?p=aMmYgI6H`. + class Application + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb new file mode 100644 index 000000000000..d04b5a46cc91 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Security Command Center representation of a Google Cloud + # resource. + # + # The Asset is a Security Command Center resource that captures information + # about a single Google Cloud resource. All modifications to an Asset are only + # within the context of Security Command Center and don't affect the referenced + # Google Cloud resource. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this asset. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/assets/\\{asset_id}". + # @!attribute [rw] security_center_properties + # @return [::Google::Cloud::SecurityCenter::V1::Asset::SecurityCenterProperties] + # Security Command Center managed properties. These properties are managed by + # Security Command Center and cannot be modified by the user. + # @!attribute [rw] resource_properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Resource managed properties. These properties are managed and defined by + # the Google Cloud resource and cannot be modified by the user. + # @!attribute [rw] security_marks + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # User specified security marks. These marks are entirely managed by the user + # and come from the SecurityMarks resource that belongs to the asset. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the asset was created in Security Command Center. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the asset was last updated or added in Cloud SCC. + # @!attribute [rw] iam_policy + # @return [::Google::Cloud::SecurityCenter::V1::Asset::IamPolicy] + # Cloud IAM Policy information associated with the Google Cloud resource + # described by the Security Command Center asset. This information is managed + # and defined by the Google Cloud resource and cannot be modified by the + # user. + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the resource. It's either + # "organizations/\\{organization_id}/assets/\\{asset_id}", + # "folders/\\{folder_id}/assets/\\{asset_id}" or + # "projects/\\{project_number}/assets/\\{asset_id}", depending on the closest CRM + # ancestor of the resource. + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security Command Center managed properties. These properties are managed by + # Security Command Center and cannot be modified by the user. + # @!attribute [rw] resource_name + # @return [::String] + # The full resource name of the Google Cloud resource this asset + # represents. This field is immutable after create time. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_type + # @return [::String] + # The type of the Google Cloud resource. Examples include: APPLICATION, + # PROJECT, and ORGANIZATION. This is a case insensitive field defined by + # Security Command Center and/or the producer of the resource and is + # immutable after create time. + # @!attribute [rw] resource_parent + # @return [::String] + # The full resource name of the immediate parent of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_project + # @return [::String] + # The full resource name of the project the resource belongs to. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_owners + # @return [::Array<::String>] + # Owners of the Google Cloud resource. + # @!attribute [rw] resource_display_name + # @return [::String] + # The user defined display name for this resource. + # @!attribute [rw] resource_parent_display_name + # @return [::String] + # The user defined display name for the parent of this resource. + # @!attribute [rw] resource_project_display_name + # @return [::String] + # The user defined display name for the project of this resource. + # @!attribute [rw] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] + # Contains a Folder message for each folder in the assets ancestry. + # The first folder is the deepest nested folder, and the last folder is the + # folder directly under the Organization. + class SecurityCenterProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cloud IAM Policy information associated with the Google Cloud resource + # described by the Security Command Center asset. This information is managed + # and defined by the Google Cloud resource and cannot be modified by the + # user. + # @!attribute [rw] policy_blob + # @return [::String] + # The JSON representation of the Policy associated with the asset. + # See https://cloud.google.com/iam/reference/rest/v1/Policy for format + # details. + class IamPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class ResourcePropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb new file mode 100644 index 000000000000..51bd94f1fd18 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # An attack exposure contains the results of an attack path simulation run. + # @!attribute [rw] score + # @return [::Float] + # A number between 0 (inclusive) and infinity that represents how important + # this finding is to remediate. The higher the score, the more important it + # is to remediate. + # @!attribute [rw] latest_calculation_time + # @return [::Google::Protobuf::Timestamp] + # The most recent time the attack exposure was updated on this finding. + # @!attribute [rw] attack_exposure_result + # @return [::String] + # The resource name of the attack path simulation result that contains the + # details regarding this attack exposure score. + # Example: `organizations/123/simulations/456/attackExposureResults/789` + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::AttackExposure::State] + # What state this AttackExposure is in. This captures whether or not an + # attack exposure has been calculated or not. + # @!attribute [rw] exposed_high_value_resources_count + # @return [::Integer] + # The number of high value resources that are exposed as a result of this + # finding. + # @!attribute [rw] exposed_medium_value_resources_count + # @return [::Integer] + # The number of medium value resources that are exposed as a result of this + # finding. + # @!attribute [rw] exposed_low_value_resources_count + # @return [::Integer] + # The number of high value resources that are exposed as a result of this + # finding. + class AttackExposure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This enum defines the various states an AttackExposure can be in. + module State + # The state is not specified. + STATE_UNSPECIFIED = 0 + + # The attack exposure has been calculated. + CALCULATED = 1 + + # The attack exposure has not been calculated. + NOT_CALCULATED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb new file mode 100644 index 000000000000..9a78a90341b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # A path that an attacker could take to reach an exposed resource. + # @!attribute [rw] name + # @return [::String] + # The attack path name, for example, + # `organizations/12/simulation/34/valuedResources/56/attackPaths/78` + # @!attribute [rw] path_nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode>] + # A list of nodes that exist in this attack path. + # @!attribute [rw] edges + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathEdge>] + # A list of the edges between nodes in this attack path. + class AttackPath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents one point that an attacker passes through in this attack path. + # @!attribute [rw] resource + # @return [::String] + # The name of the resource at this point in the attack path. + # The format of the name follows the Cloud Asset Inventory [resource + # name + # format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # @!attribute [rw] resource_type + # @return [::String] + # The [supported resource + # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # @!attribute [rw] display_name + # @return [::String] + # Human-readable name of this resource. + # @!attribute [rw] associated_findings + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::PathNodeAssociatedFinding>] + # The findings associated with this node in the attack path. + # @!attribute [rw] uuid + # @return [::String] + # Unique id of the attack path node. + # @!attribute [rw] attack_steps + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::AttackStepNode>] + # A list of attack step nodes that exist in this attack path node. + class AttackPathNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A finding that is associated with this node in the attack path. + # @!attribute [rw] canonical_finding + # @return [::String] + # Canonical name of the associated findings. Example: + # `organizations/123/sources/456/findings/789` + # @!attribute [rw] finding_category + # @return [::String] + # The additional taxonomy group within findings from a given source. + # @!attribute [rw] name + # @return [::String] + # Full resource name of the finding. + class PathNodeAssociatedFinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detailed steps the attack can take between path nodes. + # @!attribute [rw] uuid + # @return [::String] + # Unique ID for one Node + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::NodeType] + # Attack step type. Can be either AND, OR or DEFENSE + # @!attribute [rw] display_name + # @return [::String] + # User friendly name of the attack step + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Attack step labels for metadata + # @!attribute [rw] description + # @return [::String] + # Attack step description + class AttackStepNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The type of the incoming attack step node. + module NodeType + # Type not specified + NODE_TYPE_UNSPECIFIED = 0 + + # Incoming edge joined with AND + NODE_TYPE_AND = 1 + + # Incoming edge joined with OR + NODE_TYPE_OR = 2 + + # Incoming edge is defense + NODE_TYPE_DEFENSE = 3 + + # Incoming edge is attacker + NODE_TYPE_ATTACKER = 4 + end + end + + # Represents a connection between a source node and a destination node in + # this attack path. + # @!attribute [rw] source + # @return [::String] + # The attack node uuid of the source node. + # @!attribute [rw] destination + # @return [::String] + # The attack node uuid of the destination node. + class AttackPathEdge + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb new file mode 100644 index 000000000000..8f4297aa756e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Information related to Google Cloud Backup and DR Service findings. + # @!attribute [rw] backup_template + # @return [::String] + # The name of a Backup and DR template which comprises one or more backup + # policies. See the [Backup and DR + # documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) + # for more information. For example, `snap-ov`. + # @!attribute [rw] policies + # @return [::Array<::String>] + # The names of Backup and DR policies that are associated with a template + # and that define when to run a backup, how frequently to run a backup, and + # how long to retain the backup image. For example, `onvaults`. + # @!attribute [rw] host + # @return [::String] + # The name of a Backup and DR host, which is managed by the backup and + # recovery appliance and known to the management console. The host can be of + # type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file + # system, etc.), vCenter, or an ESX server. See the [Backup and DR + # documentation on + # hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) + # for more information. For example, `centos7-01`. + # @!attribute [rw] applications + # @return [::Array<::String>] + # The names of Backup and DR applications. An application is a VM, database, + # or file system on a managed host monitored by a backup and recovery + # appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, + # `centos7-01-vol02`. + # @!attribute [rw] storage_pool + # @return [::String] + # The name of the Backup and DR storage pool that the backup and recovery + # appliance is storing data in. The storage pool could be of type Cloud, + # Primary, Snapshot, or OnVault. See the [Backup and DR documentation on + # storage + # pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). + # For example, `DiskPoolOne`. + # @!attribute [rw] policy_options + # @return [::Array<::String>] + # The names of Backup and DR advanced policy options of a policy applying to + # an application. See the [Backup and DR documentation on policy + # options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). + # For example, `skipofflineappsincongrp, nounmap`. + # @!attribute [rw] profile + # @return [::String] + # The name of the Backup and DR resource profile that specifies the storage + # media for backups of application and VM data. See the [Backup and DR + # documentation on + # profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). + # For example, `GCP`. + # @!attribute [rw] appliance + # @return [::String] + # The name of the Backup and DR appliance that captures, moves, and manages + # the lifecycle of backup data. For example, `backup-server-57137`. + # @!attribute [rw] backup_type + # @return [::String] + # The backup type of the Backup and DR image. + # For example, `Snapshot`, `Remote Snapshot`, `OnVault`. + # @!attribute [rw] backup_create_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp at which the Backup and DR backup was created. + class BackupDisasterRecovery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb new file mode 100644 index 000000000000..f558699d1218 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Configures how to deliver Findings to BigQuery Instance. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this export. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name. + # Example format: + # "organizations/\\{organization_id}/bigQueryExports/\\{export_id}" Example + # format: "folders/\\{folder_id}/bigQueryExports/\\{export_id}" Example format: + # "projects/\\{project_id}/bigQueryExports/\\{export_id}" + # This field is provided in responses, and is ignored when provided in create + # requests. + # @!attribute [rw] description + # @return [::String] + # The description of the export (max of 1024 characters). + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across create/update events + # of findings. The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @!attribute [rw] dataset + # @return [::String] + # The dataset to write findings' updates to. Its format is + # "projects/[project_id]/datasets/[bigquery_dataset_id]". + # BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers + # (0-9), or underscores (_). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the BigQuery export was created. + # This field is set by the server and will be ignored if provided on export + # on creation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the BigQuery export was updated. + # This field is set by the server and will be ignored if provided on export + # creation or update. + # @!attribute [r] most_recent_editor + # @return [::String] + # Output only. Email address of the user who last edited the BigQuery export. + # This field is set by the server and will be ignored if provided on export + # creation or update. + # @!attribute [r] principal + # @return [::String] + # Output only. The service account that needs permission to create table and + # upload data to the BigQuery dataset. + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb new file mode 100644 index 000000000000..d16907c3f4b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains details about a chokepoint, which is a resource or resource group + # where high-risk attack paths converge, based on [attack path simulations] + # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). + # @!attribute [rw] related_findings + # @return [::Array<::String>] + # List of resource names of findings associated with this chokepoint. + # For example, organizations/123/sources/456/findings/789. + # This list will have at most 100 findings. + class Chokepoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb new file mode 100644 index 000000000000..589ad76bf248 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Fields related to Google Cloud Armor findings. + # @!attribute [rw] security_policy + # @return [::Google::Cloud::SecurityCenter::V1::SecurityPolicy] + # Information about the [Google Cloud Armor security + # policy](https://cloud.google.com/armor/docs/security-policy-overview) + # relevant to the finding. + # @!attribute [rw] requests + # @return [::Google::Cloud::SecurityCenter::V1::Requests] + # Information about incoming requests evaluated by [Google Cloud Armor + # security + # policies](https://cloud.google.com/armor/docs/security-policy-overview). + # @!attribute [rw] adaptive_protection + # @return [::Google::Cloud::SecurityCenter::V1::AdaptiveProtection] + # Information about potential Layer 7 DDoS attacks identified by [Google + # Cloud Armor Adaptive + # Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + # @!attribute [rw] attack + # @return [::Google::Cloud::SecurityCenter::V1::Attack] + # Information about DDoS attack volume and classification. + # @!attribute [rw] threat_vector + # @return [::String] + # Distinguish between volumetric & protocol DDoS attack and + # application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS + # attacks, or "L_7" for Layer 7 DDoS attacks. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Duration of attack from the start until the current moment (updated every 5 + # minutes). + class CloudArmor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the [Google Cloud Armor security + # policy](https://cloud.google.com/armor/docs/security-policy-overview) + # relevant to the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the Google Cloud Armor security policy, for example, + # "my-security-policy". + # @!attribute [rw] type + # @return [::String] + # The type of Google Cloud Armor security policy for example, 'backend + # security policy', 'edge security policy', 'network edge security policy', + # or 'always-on DDoS protection'. + # @!attribute [rw] preview + # @return [::Boolean] + # Whether or not the associated rule or policy is in preview mode. + class SecurityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the requests relevant to the finding. + # @!attribute [rw] ratio + # @return [::Float] + # For 'Increasing deny ratio', the ratio is the denied traffic divided by the + # allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + # traffic in the short term divided by allowed traffic in the long term. + # @!attribute [rw] short_term_allowed + # @return [::Integer] + # Allowed RPS (requests per second) in the short term. + # @!attribute [rw] long_term_allowed + # @return [::Integer] + # Allowed RPS (requests per second) over the long term. + # @!attribute [rw] long_term_denied + # @return [::Integer] + # Denied RPS (requests per second) over the long term. + class Requests + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about [Google Cloud Armor Adaptive + # Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). + # @!attribute [rw] confidence + # @return [::Float] + # A score of 0 means that there is low confidence that the detected event is + # an actual attack. A score of 1 means that there is high confidence that the + # detected event is an attack. See the [Adaptive Protection + # documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + # for further explanation. + class AdaptiveProtection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about DDoS attack volume and classification. + # @!attribute [rw] volume_pps + # @return [::Integer] + # Total PPS (packets per second) volume of attack. + # @!attribute [rw] volume_bps + # @return [::Integer] + # Total BPS (bytes per second) volume of attack. + # @!attribute [rw] classification + # @return [::String] + # Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. + class Attack + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb new file mode 100644 index 000000000000..83d9ad22a479 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb @@ -0,0 +1,114 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # The [data profile](https://cloud.google.com/dlp/docs/data-profiles) + # associated with the finding. + # @!attribute [rw] data_profile + # @return [::String] + # Name of the data profile, for example, + # `projects/123/locations/europe/tableProfiles/8383929`. + # @!attribute [rw] parent_type + # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpDataProfile::ParentType] + # The resource hierarchy level at which the data profile was generated. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::SecurityCenter::V1::InfoType>] + # Type of information detected by SDP. + # Info type includes name, version and sensitivity of the detected + # information type. + class CloudDlpDataProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Parents for configurations that produce data profile findings. + module ParentType + # Unspecified parent type. + PARENT_TYPE_UNSPECIFIED = 0 + + # Organization-level configurations. + ORGANIZATION = 1 + + # Project-level configurations. + PROJECT = 2 + end + end + + # Type of information detected by the API. + # @!attribute [rw] name + # @return [::String] + # Name of the information type. Either a name of your choosing when + # creating a CustomInfoType, or one of the names listed + # at + # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + # when specifying a built-in type. When sending Cloud DLP results to Data + # Catalog, infoType names should conform to the pattern + # `[A-Za-z0-9$_-]{1,64}`. + # @!attribute [rw] version + # @return [::String] + # Optional version name for this InfoType. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::SecurityCenter::V1::SensitivityScore] + # Optional custom sensitivity for this InfoType. + # This only applies to data profiling. + class InfoType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Score is calculated from of all elements in the data profile. + # A higher level means the data is more sensitive. + # @!attribute [rw] score + # @return [::Google::Cloud::SecurityCenter::V1::SensitivityScore::SensitivityScoreLevel] + # The sensitivity score applied to the resource. + class SensitivityScore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Various sensitivity score levels for resources. + module SensitivityScoreLevel + # Unused. + SENSITIVITY_SCORE_LEVEL_UNSPECIFIED = 0 + + # No sensitive information detected. The resource isn't publicly + # accessible. + SENSITIVITY_LOW = 10 + + # Unable to determine sensitivity. + SENSITIVITY_UNKNOWN = 12 + + # Medium risk. Contains personally identifiable information (PII), + # potentially sensitive data, or fields with free-text data that are at a + # higher risk of having intermittent sensitive data. Consider limiting + # access. + SENSITIVITY_MODERATE = 20 + + # High risk. Sensitive personally identifiable information (SPII) can be + # present. Exfiltration of data can lead to user data loss. + # Re-identification of users might be possible. Consider limiting usage and + # or removing SPII. + SENSITIVITY_HIGH = 30 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb new file mode 100644 index 000000000000..9faad618c6f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection + # job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced + # the finding. + # @!attribute [rw] inspect_job + # @return [::String] + # Name of the inspection job, for example, + # `projects/123/locations/europe/dlpJobs/i-8383929`. + # @!attribute [rw] info_type + # @return [::String] + # The type of information (or + # *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, + # for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. + # @!attribute [rw] info_type_count + # @return [::Integer] + # The number of times Cloud DLP found this infoType within this job + # and resource. + # @!attribute [rw] full_scan + # @return [::Boolean] + # Whether Cloud DLP scanned the complete resource or a sampled subset. + class CloudDlpInspection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb new file mode 100644 index 000000000000..158ef2e388fe --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains compliance information about a security standard indicating unmet + # recommendations. + # @!attribute [rw] standard + # @return [::String] + # Industry-wide compliance standards or benchmarks, such as CIS, PCI, and + # OWASP. + # @!attribute [rw] version + # @return [::String] + # Version of the standard or benchmark, for example, 1.1 + # @!attribute [rw] ids + # @return [::Array<::String>] + # Policies within the standard or benchmark, for example, A.12.4.1 + class Compliance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb new file mode 100644 index 000000000000..b44d3c237ea7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains information about the IP connection associated with the finding. + # @!attribute [rw] destination_ip + # @return [::String] + # Destination IP address. Not present for sockets that are listening and not + # connected. + # @!attribute [rw] destination_port + # @return [::Integer] + # Destination port. Not present for sockets that are listening and not + # connected. + # @!attribute [rw] source_ip + # @return [::String] + # Source IP address. + # @!attribute [rw] source_port + # @return [::Integer] + # Source port. + # @!attribute [rw] protocol + # @return [::Google::Cloud::SecurityCenter::V1::Connection::Protocol] + # IANA Internet Protocol Number such as TCP(6) and UDP(17). + class Connection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # IANA Internet Protocol Number such as TCP(6) and UDP(17). + module Protocol + # Unspecified protocol (not HOPOPT). + PROTOCOL_UNSPECIFIED = 0 + + # Internet Control Message Protocol. + ICMP = 1 + + # Transmission Control Protocol. + TCP = 6 + + # User Datagram Protocol. + UDP = 17 + + # Generic Routing Encapsulation. + GRE = 47 + + # Encap Security Payload. + ESP = 50 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb new file mode 100644 index 000000000000..de91713678d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Details about specific contacts + # @!attribute [rw] contacts + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Contact>] + # A list of contacts + class ContactDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The email address of a contact. + # @!attribute [rw] email + # @return [::String] + # An email address. For example, "`person123@company.com`". + class Contact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb new file mode 100644 index 000000000000..acc0a1015fa9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Container associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Name of the container. + # @!attribute [rw] uri + # @return [::String] + # Container image URI provided when configuring a pod or container. This + # string can identify a container image version using mutable tags. + # @!attribute [rw] image_id + # @return [::String] + # Optional container image ID, if provided by the container runtime. Uniquely + # identifies the container image launched using a container image digest. + # @!attribute [rw] labels + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Label>] + # Container labels, as provided by the container runtime. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time that the container was created. + class Container + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb new file mode 100644 index 000000000000..2294178aef6c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents database access information, such as queries. A database may be a + # sub-resource of an instance (as in the case of Cloud SQL instances or Cloud + # Spanner instances), or the database instance itself. Some database resources + # might not have the [full resource + # name](https://google.aip.dev/122#full-resource-names) populated because these + # resource types, such as Cloud SQL databases, are not yet supported by Cloud + # Asset Inventory. In these cases only the display name is provided. + # @!attribute [rw] name + # @return [::String] + # Some database resources may not have the [full resource + # name](https://google.aip.dev/122#full-resource-names) populated because + # these resource types are not yet supported by Cloud Asset Inventory (e.g. + # Cloud SQL databases). In these cases only the display name will be + # provided. + # The [full resource name](https://google.aip.dev/122#full-resource-names) of + # the database that the user connected to, if it is supported by Cloud Asset + # Inventory. + # @!attribute [rw] display_name + # @return [::String] + # The human-readable name of the database that the user connected to. + # @!attribute [rw] user_name + # @return [::String] + # The username used to connect to the database. The username might not be an + # IAM principal and does not have a set format. + # @!attribute [rw] query + # @return [::String] + # The SQL statement that is associated with the database access. + # @!attribute [rw] grantees + # @return [::Array<::String>] + # The target usernames, roles, or groups of an SQL privilege grant, which is + # not an IAM policy change. + # @!attribute [rw] version + # @return [::String] + # The version of the database, for example, POSTGRES_14. + # See [the complete + # list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + class Database + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..06a03cf035f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # An EffectiveEventThreatDetectionCustomModule is the representation of + # an Event Threat Detection custom module at a specified level of the + # resource hierarchy: organization, folder, or project. If a custom module is + # inherited from a parent organization or folder, the value of the + # `enablement_state` property in EffectiveEventThreatDetectionCustomModule is + # set to the value that is effective in the parent, instead of `INHERITED`. + # For example, if the module is enabled in a parent organization or folder, the + # effective `enablement_state` for the module in all child folders or projects + # is also `enabled`. EffectiveEventThreatDetectionCustomModule is read-only. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the effective ETD custom module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # @!attribute [r] config + # @return [::Google::Protobuf::Struct] + # Output only. Config for the effective module. + # @!attribute [r] enablement_state + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule::EnablementState] + # Output only. The effective state of enablement for the module at the given + # level of the hierarchy. + # @!attribute [r] type + # @return [::String] + # Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + # @!attribute [r] display_name + # @return [::String] + # Output only. The human readable name to be displayed for the module. + # @!attribute [r] description + # @return [::String] + # Output only. The description for the module. + class EffectiveEventThreatDetectionCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..83aab7af710b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # An EffectiveSecurityHealthAnalyticsCustomModule is the representation of + # a Security Health Analytics custom module at a specified level of the + # resource hierarchy: organization, folder, or project. If a custom module is + # inherited from a parent organization or folder, the value of the + # `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is + # set to the value that is effective in the parent, instead of `INHERITED`. + # For example, if the module is enabled in a parent organization or folder, the + # effective enablement_state for the module in all child folders or projects is + # also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the custom module. + # Its format is + # "organizations/\\{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}", + # or + # "folders/\\{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}", + # or + # "projects/\\{project}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}" + # @!attribute [r] custom_config + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] + # Output only. The user-specified configuration for the module. + # @!attribute [r] enablement_state + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule::EnablementState] + # Output only. The effective state of enablement for the module at the given + # level of the hierarchy. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name for the custom module. The name must be + # between 1 and 128 characters, start with a lowercase letter, and contain + # alphanumeric characters or underscores only. + class EffectiveSecurityHealthAnalyticsCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..e5b28d560c27 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents an instance of an Event Threat Detection custom module, + # including its full module name, display name, enablement state, and last + # updated time. You can create a custom module at the organization, folder, or + # project level. Custom modules that you create at the organization or folder + # level are inherited by child folders and projects. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the Event Threat Detection custom module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # @!attribute [rw] config + # @return [::Google::Protobuf::Struct] + # Config for the module. For the resident module, its config value is defined + # at this level. For the inherited module, its config value is inherited from + # the ancestor module. + # @!attribute [r] ancestor_module + # @return [::String] + # Output only. The closest ancestor module that this module inherits the + # enablement state from. The format is the same as the + # EventThreatDetectionCustomModule resource name. + # @!attribute [rw] enablement_state + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule::EnablementState] + # The state of enablement for the module at the given level of the hierarchy. + # @!attribute [rw] type + # @return [::String] + # Type for the module. e.g. CONFIGURABLE_BAD_IP. + # @!attribute [rw] display_name + # @return [::String] + # The human readable name to be displayed for the module. + # @!attribute [rw] description + # @return [::String] + # The description for the module. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the module was last updated. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The editor the module was last updated by. + class EventThreatDetectionCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + + # When the enablement state is inherited. + INHERITED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb new file mode 100644 index 000000000000..0751dbe51e9a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # A list of zero or more errors encountered while validating the uploaded + # configuration of an Event Threat Detection Custom Module. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::SecurityCenter::V1::CustomModuleValidationError>] + class CustomModuleValidationErrors + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An error encountered while validating the uploaded configuration of an + # Event Threat Detection Custom Module. + # @!attribute [rw] description + # @return [::String] + # A description of the error, suitable for human consumption. Required. + # @!attribute [rw] field_path + # @return [::String] + # The path, in RFC 8901 JSON Pointer format, to the field that failed + # validation. This may be left empty if no specific field is affected. + # @!attribute [rw] start + # @return [::Google::Cloud::SecurityCenter::V1::Position] + # The initial position of the error in the uploaded text version of the + # module. This field may be omitted if no specific position applies, or if + # one could not be computed. + # @!attribute [rw] end + # @return [::Google::Cloud::SecurityCenter::V1::Position] + # The end position of the error in the uploaded text version of the + # module. This field may be omitted if no specific position applies, or if + # one could not be computed.. + class CustomModuleValidationError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A position in the uploaded text version of a module. + # @!attribute [rw] line_number + # @return [::Integer] + # @!attribute [rw] column_number + # @return [::Integer] + class Position + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb new file mode 100644 index 000000000000..718388b29179 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Exfiltration represents a data exfiltration attempt from one or more sources + # to one or more targets. The `sources` attribute lists the sources of the + # exfiltrated data. The `targets` attribute lists the destinations the data was + # copied to. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ExfilResource>] + # If there are multiple sources, then the data is considered "joined" between + # them. For instance, BigQuery can join multiple tables, and each + # table would be considered a source. + # @!attribute [rw] targets + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ExfilResource>] + # If there are multiple targets, each target would get a complete copy of the + # "joined" source data. + # @!attribute [rw] total_exfiltrated_bytes + # @return [::Integer] + # Total exfiltrated bytes processed for the entire job. + class Exfiltration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Resource where data was exfiltrated from or exfiltrated to. + # @!attribute [rw] name + # @return [::String] + # The resource's [full resource + # name](https://cloud.google.com/apis/design/resource_names#full_resource_name). + # @!attribute [rw] components + # @return [::Array<::String>] + # Subcomponents of the asset that was exfiltrated, like URIs used during + # exfiltration, table names, databases, and filenames. For example, multiple + # tables might have been exfiltrated from the same Cloud SQL instance, or + # multiple files might have been exfiltrated from the same Cloud Storage + # bucket. + class ExfilResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb new file mode 100644 index 000000000000..8b10d2880776 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Details about the externally exposed resource associated with the finding. + # @!attribute [rw] private_ip_address + # @return [::String] + # Private IP address of the exposed endpoint. + # @!attribute [rw] private_port + # @return [::String] + # Port number associated with private IP address. + # @!attribute [rw] exposed_service + # @return [::String] + # The name and version of the service, for example, "Jupyter + # Notebook 6.14.0". + # @!attribute [rw] public_ip_address + # @return [::String] + # Public IP address of the exposed endpoint. + # @!attribute [rw] public_port + # @return [::String] + # Public port number of the exposed endpoint. + # @!attribute [rw] exposed_endpoint + # @return [::String] + # The resource which is running the exposed service, for example, + # "//compute.googleapis.com/projects/\\{project-id}/zones/\\{zone}/instances/\\{instance}.” + # @!attribute [rw] load_balancer_firewall_policy + # @return [::String] + # The full resource name of the load balancer firewall policy, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/firewallPolicies/\\{policy-name}". + # @!attribute [rw] service_firewall_policy + # @return [::String] + # The full resource name of the firewall policy of the exposed service, for + # example, + # "//compute.googleapis.com/projects/\\{project-id}/global/firewallPolicies/\\{policy-name}". + # @!attribute [rw] forwarding_rule + # @return [::String] + # The full resource name of the forwarding rule, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/forwardingRules/\\{forwarding-rule-name}". + # @!attribute [rw] backend_service + # @return [::String] + # The full resource name of load balancer backend service, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/backendServices/\\{name}". + # @!attribute [rw] instance_group + # @return [::String] + # The full resource name of the instance group, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/instanceGroups/\\{name}". + # @!attribute [rw] network_endpoint_group + # @return [::String] + # The full resource name of the network endpoint group, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/networkEndpointGroups/\\{name}". + class ExternalExposure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb new file mode 100644 index 000000000000..9a0f33c8a79a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Representation of third party SIEM/SOAR fields within SCC. + # @!attribute [rw] name + # @return [::String] + # Full resource name of the external system, for example: + # "organizations/1234/sources/5678/findings/123456/externalSystems/jira", + # "folders/1234/sources/5678/findings/123456/externalSystems/jira", + # "projects/1234/sources/5678/findings/123456/externalSystems/jira" + # @!attribute [rw] assignees + # @return [::Array<::String>] + # References primary/secondary etc assignees in the external system. + # @!attribute [rw] external_uid + # @return [::String] + # The identifier that's used to track the finding's corresponding case in the + # external system. + # @!attribute [rw] status + # @return [::String] + # The most recent status of the finding's corresponding case, as reported by + # the external system. + # @!attribute [rw] external_system_update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was last updated, as reported by the external + # system. + # @!attribute [rw] case_uri + # @return [::String] + # The link to the finding's corresponding case in the external system. + # @!attribute [rw] case_priority + # @return [::String] + # The priority of the finding's corresponding case in the external system. + # @!attribute [rw] case_sla + # @return [::Google::Protobuf::Timestamp] + # The SLA of the finding's corresponding case in the external system. + # @!attribute [rw] case_create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was created, as reported by the external system. + # @!attribute [rw] case_close_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was closed, as reported by the external system. + # @!attribute [rw] ticket_info + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem::TicketInfo] + # Information about the ticket, if any, that is being used to track the + # resolution of the issue that is identified by this finding. + class ExternalSystem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the ticket, if any, that is being used to track the + # resolution of the issue that is identified by this finding. + # @!attribute [rw] id + # @return [::String] + # The identifier of the ticket in the ticket system. + # @!attribute [rw] assignee + # @return [::String] + # The assignee of the ticket in the ticket system. + # @!attribute [rw] description + # @return [::String] + # The description of the ticket in the ticket system. + # @!attribute [rw] uri + # @return [::String] + # The link to the ticket in the ticket system. + # @!attribute [rw] status + # @return [::String] + # The latest status of the ticket, as reported by the ticket system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the ticket was last updated, as reported by the ticket + # system. + class TicketInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb new file mode 100644 index 000000000000..7e7468407e6a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # File information about the related binary/library used by an executable, or + # the script used by a script interpreter + # @!attribute [rw] path + # @return [::String] + # Absolute path of the file as a JSON encoded string. + # @!attribute [rw] size + # @return [::Integer] + # Size of the file in bytes. + # @!attribute [rw] sha256 + # @return [::String] + # SHA256 hash of the first hashed_size bytes of the file encoded as a + # hex string. If hashed_size == size, sha256 represents the SHA256 hash + # of the entire file. + # @!attribute [rw] hashed_size + # @return [::Integer] + # The length in bytes of the file prefix that was hashed. If + # hashed_size == size, any hashes reported represent the entire + # file. + # @!attribute [rw] partially_hashed + # @return [::Boolean] + # True when the hash covers only a prefix of the file. + # @!attribute [rw] contents + # @return [::String] + # Prefix of the file contents as a JSON-encoded string. + # @!attribute [rw] disk_path + # @return [::Google::Cloud::SecurityCenter::V1::File::DiskPath] + # Path of the file in terms of underlying disk/partition identifiers. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Path of the file in terms of underlying disk/partition identifiers. + # @!attribute [rw] partition_uuid + # @return [::String] + # UUID of the partition (format + # https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) + # @!attribute [rw] relative_path + # @return [::String] + # Relative path of the file in the partition as a JSON encoded string. + # Example: /home/user1/executable_file.sh + class DiskPath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb new file mode 100644 index 000000000000..d4cb1b117d7c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb @@ -0,0 +1,486 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Security Command Center finding. + # + # A finding is a record of assessment data like security, risk, health, or + # privacy, that is ingested into Security Command Center for presentation, + # notification, analysis, policy testing, and enforcement. For example, a + # cross-site scripting (XSS) vulnerability in an App Engine application is a + # finding. + # @!attribute [rw] name + # @return [::String] + # The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", + # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}", + # "projects/\\{project_id}/sources/\\{source_id}/findings/\\{finding_id}". + # @!attribute [rw] parent + # @return [::String] + # The relative resource name of the source the finding belongs to. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # This field is immutable after creation time. + # For example: + # "organizations/\\{organization_id}/sources/\\{source_id}" + # @!attribute [rw] resource_name + # @return [::String] + # For findings on Google Cloud resources, the full resource + # name of the Google Cloud resource this finding is for. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # When the finding is for a non-Google Cloud resource, the resourceName can + # be a customer or partner defined string. This field is immutable after + # creation time. + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::Finding::State] + # The state of the finding. + # @!attribute [rw] category + # @return [::String] + # The additional taxonomy group within findings from a given source. + # This field is immutable after creation time. + # Example: "XSS_FLASH_INJECTION" + # @!attribute [rw] external_uri + # @return [::String] + # The URI that, if available, points to a web page outside of Security + # Command Center where additional information about the finding can be found. + # This field is guaranteed to be either empty or a well formed URL. + # @!attribute [rw] source_properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Source specific properties. These properties are managed by the source + # that writes the finding. The key names in the source_properties map must be + # between 1 and 255 characters, and must start with a letter and contain + # alphanumeric characters or underscores only. + # @!attribute [r] security_marks + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # Output only. User specified security marks. These marks are entirely + # managed by the user and come from the SecurityMarks resource that belongs + # to the finding. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # The time the finding was first detected. If an existing finding is updated, + # then this is the time the update occurred. + # For example, if the finding represents an open firewall, this property + # captures the time the detector believes the firewall became open. The + # accuracy is determined by the detector. If the finding is later resolved, + # then this time reflects when the finding was resolved. This must not + # be set to a value greater than the current timestamp. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the finding was created in Security Command Center. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V1::Finding::Severity] + # The severity of the finding. This field is managed by the source that + # writes the finding. + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the finding. It's either + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", + # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}" or + # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}", + # depending on the closest CRM ancestor of the resource associated with the + # finding. + # @!attribute [rw] mute + # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # Indicates the mute state of a finding (either muted, unmuted + # or undefined). Unlike other attributes of a finding, a finding provider + # shouldn't set the value of mute. + # @!attribute [rw] finding_class + # @return [::Google::Cloud::SecurityCenter::V1::Finding::FindingClass] + # The class of the finding. + # @!attribute [rw] indicator + # @return [::Google::Cloud::SecurityCenter::V1::Indicator] + # Represents what's commonly known as an *indicator of compromise* (IoC) in + # computer forensics. This is an artifact observed on a network or in an + # operating system that, with high confidence, indicates a computer + # intrusion. For more information, see [Indicator of + # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). + # @!attribute [rw] vulnerability + # @return [::Google::Cloud::SecurityCenter::V1::Vulnerability] + # Represents vulnerability-specific fields like CVE and CVSS scores. + # CVE stands for Common Vulnerabilities and Exposures + # (https://cve.mitre.org/about/) + # @!attribute [r] mute_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time this finding was muted or unmuted. + # @!attribute [r] external_systems + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V1::ExternalSystem}] + # Output only. Third party SIEM/SOAR fields within SCC, contains external + # system information and external system finding fields. + # @!attribute [rw] mitre_attack + # @return [::Google::Cloud::SecurityCenter::V1::MitreAttack] + # MITRE ATT&CK tactics and techniques related to this finding. + # See: https://attack.mitre.org + # @!attribute [rw] access + # @return [::Google::Cloud::SecurityCenter::V1::Access] + # Access details associated with the finding, such as more information on the + # caller, which method was accessed, and from where. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Connection>] + # Contains information about the IP connection associated with the finding. + # @!attribute [rw] mute_initiator + # @return [::String] + # Records additional information about the mute operation, for example, the + # [mute configuration](/security-command-center/docs/how-to-mute-findings) + # that muted the finding and the user who muted the finding. + # @!attribute [r] mute_info + # @return [::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo] + # Output only. The mute information regarding this finding. + # @!attribute [rw] processes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Process>] + # Represents operating system processes associated with the Finding. + # @!attribute [r] contacts + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V1::ContactDetails}] + # Output only. Map containing the points of contact for the given finding. + # The key represents the type of contact, while the value contains a list of + # all the contacts that pertain. Please refer to: + # https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories + # + # { + # "security": { + # "contacts": [ + # { + # "email": "person1@company.com" + # }, + # { + # "email": "person2@company.com" + # } + # ] + # } + # } + # @!attribute [rw] compliances + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Compliance>] + # Contains compliance information for security standards associated to the + # finding. + # @!attribute [r] parent_display_name + # @return [::String] + # Output only. The human readable display name of the finding source such as + # "Event Threat Detection" or "Security Health Analytics". + # @!attribute [rw] description + # @return [::String] + # Contains more details about the finding. + # @!attribute [rw] exfiltration + # @return [::Google::Cloud::SecurityCenter::V1::Exfiltration] + # Represents exfiltrations associated with the finding. + # @!attribute [rw] iam_bindings + # @return [::Array<::Google::Cloud::SecurityCenter::V1::IamBinding>] + # Represents IAM bindings associated with the finding. + # @!attribute [rw] next_steps + # @return [::String] + # Steps to address the finding. + # @!attribute [rw] module_name + # @return [::String] + # Unique identifier of the module which generated the finding. + # Example: + # folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] + # Containers associated with the finding. This field provides information for + # both Kubernetes and non-Kubernetes containers. + # @!attribute [rw] kubernetes + # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes] + # Kubernetes resources associated with the finding. + # @!attribute [rw] database + # @return [::Google::Cloud::SecurityCenter::V1::Database] + # Database associated with the finding. + # @!attribute [rw] attack_exposure + # @return [::Google::Cloud::SecurityCenter::V1::AttackExposure] + # The results of an attack path simulation relevant to this finding. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::SecurityCenter::V1::File>] + # File associated with the finding. + # @!attribute [rw] cloud_dlp_inspection + # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpInspection] + # Cloud Data Loss Prevention (Cloud DLP) inspection results that are + # associated with the finding. + # @!attribute [rw] cloud_dlp_data_profile + # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpDataProfile] + # Cloud DLP data profile that is associated with the finding. + # @!attribute [rw] kernel_rootkit + # @return [::Google::Cloud::SecurityCenter::V1::KernelRootkit] + # Signature of the kernel rootkit. + # @!attribute [rw] org_policies + # @return [::Array<::Google::Cloud::SecurityCenter::V1::OrgPolicy>] + # Contains information about the org policies associated with the finding. + # @!attribute [rw] application + # @return [::Google::Cloud::SecurityCenter::V1::Application] + # Represents an application associated with the finding. + # @!attribute [rw] backup_disaster_recovery + # @return [::Google::Cloud::SecurityCenter::V1::BackupDisasterRecovery] + # Fields related to Backup and DR findings. + # @!attribute [rw] security_posture + # @return [::Google::Cloud::SecurityCenter::V1::SecurityPosture] + # The security posture associated with the finding. + # @!attribute [rw] log_entries + # @return [::Array<::Google::Cloud::SecurityCenter::V1::LogEntry>] + # Log entries that are relevant to the finding. + # @!attribute [rw] load_balancers + # @return [::Array<::Google::Cloud::SecurityCenter::V1::LoadBalancer>] + # The load balancers associated with the finding. + # @!attribute [rw] cloud_armor + # @return [::Google::Cloud::SecurityCenter::V1::CloudArmor] + # Fields related to Cloud Armor findings. + # @!attribute [rw] notebook + # @return [::Google::Cloud::SecurityCenter::V1::Notebook] + # Notebook associated with the finding. + # @!attribute [rw] toxic_combination + # @return [::Google::Cloud::SecurityCenter::V1::ToxicCombination] + # Contains details about a group of security issues that, when the issues + # occur together, represent a greater risk than when the issues occur + # independently. A group of such issues is referred to as a toxic + # combination. + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] group_memberships + # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupMembership>] + # Contains details about groups of which this finding is a member. A group is + # a collection of findings that are related in some way. + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] chokepoint + # @return [::Google::Cloud::SecurityCenter::V1::Chokepoint] + # Contains details about a chokepoint, which is a resource or resource group + # where high-risk attack paths converge, based on [attack path simulations] + # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] external_exposure + # @return [::Google::Cloud::SecurityCenter::V1::ExternalExposure] + # External exposure associated with the finding. + # @!attribute [rw] agent + # @return [::Google::Cloud::SecurityCenter::V1::Agent] + # Primary Agent that the specified finding was flagged for + # @!attribute [rw] agent_sessions + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AgentSession>] + # Conversational session(s) where the finding occurred. + # @!attribute [rw] agent_anomaly + # @return [::Google::Cloud::SecurityCenter::V1::AgentAnomaly] + # Details about behavior anomalies detected in AI agents. + class Finding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mute information about the finding, including whether the finding has a + # static mute or any matching dynamic mute rules. + # @!attribute [rw] static_mute + # @return [::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo::StaticMute] + # If set, the static mute applied to this finding. Static mutes override + # dynamic mutes. If unset, there is no static mute. + # @!attribute [rw] dynamic_mute_records + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo::DynamicMuteRecord>] + # The list of dynamic mute rules that currently match the finding. + class MuteInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the static mute state. A static mute state overrides + # any dynamic mute rules that apply to this finding. The static mute state + # can be set by a static mute rule or by muting the finding directly. + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # The static mute state. If the value is `MUTED` or `UNMUTED`, then the + # finding's overall mute state will have the same value. + # @!attribute [rw] apply_time + # @return [::Google::Protobuf::Timestamp] + # When the static mute was applied. + class StaticMute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The record of a dynamic mute rule that matches the finding. + # @!attribute [rw] mute_config + # @return [::String] + # The relative resource name of the mute rule, represented by a mute + # config, that created this record, for example + # `organizations/123/muteConfigs/mymuteconfig` or + # `organizations/123/locations/global/muteConfigs/mymuteconfig`. + # @!attribute [rw] match_time + # @return [::Google::Protobuf::Timestamp] + # When the dynamic mute rule first matched the finding. + class DynamicMuteRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class SourcePropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + class ExternalSystemsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::SecurityCenter::V1::ContactDetails] + class ContactsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the finding. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The finding requires attention and has not been addressed yet. + ACTIVE = 1 + + # The finding has been fixed, triaged as a non-issue or otherwise addressed + # and is no longer active. + INACTIVE = 2 + end + + # The severity of the finding. + module Severity + # This value is used for findings when a source doesn't write a severity + # value. + SEVERITY_UNSPECIFIED = 0 + + # Vulnerability: + # A critical vulnerability is easily discoverable by an external actor, + # exploitable, and results in the direct ability to execute arbitrary code, + # exfiltrate data, and otherwise gain additional access and privileges to + # cloud resources and workloads. Examples include publicly accessible + # unprotected user data and public SSH access with weak or no + # passwords. + # + # Threat: + # Indicates a threat that is able to access, modify, or delete data or + # execute unauthorized code within existing resources. + CRITICAL = 1 + + # Vulnerability: + # A high risk vulnerability can be easily discovered and exploited in + # combination with other vulnerabilities in order to gain direct access and + # the ability to execute arbitrary code, exfiltrate data, and otherwise + # gain additional access and privileges to cloud resources and workloads. + # An example is a database with weak or no passwords that is only + # accessible internally. This database could easily be compromised by an + # actor that had access to the internal network. + # + # Threat: + # Indicates a threat that is able to create new computational resources in + # an environment but not able to access data or execute code in existing + # resources. + HIGH = 2 + + # Vulnerability: + # A medium risk vulnerability could be used by an actor to gain access to + # resources or privileges that enable them to eventually (through multiple + # steps or a complex exploit) gain access and the ability to execute + # arbitrary code or exfiltrate data. An example is a service account with + # access to more projects than it should have. If an actor gains access to + # the service account, they could potentially use that access to manipulate + # a project the service account was not intended to. + # + # Threat: + # Indicates a threat that is able to cause operational impact but may not + # access data or execute unauthorized code. + MEDIUM = 3 + + # Vulnerability: + # A low risk vulnerability hampers a security organization's ability to + # detect vulnerabilities or active threats in their deployment, or prevents + # the root cause investigation of security issues. An example is monitoring + # and logs being disabled for resource configurations and access. + # + # Threat: + # Indicates a threat that has obtained minimal access to an environment but + # is not able to access data, execute code, or create resources. + LOW = 4 + end + + # Mute state a finding can be in. + module Mute + # Unspecified. + MUTE_UNSPECIFIED = 0 + + # Finding has been muted. + MUTED = 1 + + # Finding has been unmuted. + UNMUTED = 2 + + # Finding has never been muted/unmuted. + UNDEFINED = 4 + end + + # Represents what kind of Finding it is. + module FindingClass + # Unspecified finding class. + FINDING_CLASS_UNSPECIFIED = 0 + + # Describes unwanted or malicious activity. + THREAT = 1 + + # Describes a potential weakness in software that increases risk to + # Confidentiality & Integrity & Availability. + VULNERABILITY = 2 + + # Describes a potential weakness in cloud resource/asset configuration that + # increases risk. + MISCONFIGURATION = 3 + + # Describes a security observation that is for informational purposes. + OBSERVATION = 4 + + # Describes an error that prevents some SCC functionality. + SCC_ERROR = 5 + + # Describes a potential security risk due to a change in the security + # posture. + POSTURE_VIOLATION = 6 + + # Describes a group of security issues that, when the issues + # occur together, represent a greater risk than when the issues occur + # independently. A group of such issues is referred to as a toxic + # combination. + TOXIC_COMBINATION = 7 + + # Describes a potential security risk to data assets that contain sensitive + # data. + SENSITIVE_DATA_RISK = 8 + + # Describes a resource or resource group where high risk attack paths + # converge, based on attack path simulations (APS). + CHOKEPOINT = 9 + + # Describes a potential security risk due to the resource being exposed to + # the internet. + EXTERNAL_EXPOSURE = 10 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb new file mode 100644 index 000000000000..18f745ec7791 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Message that contains the resource name and display name of a folder + # resource. + # @!attribute [rw] resource_folder + # @return [::String] + # Full resource name of this folder. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_folder_display_name + # @return [::String] + # The user defined display name for this folder. + class Folder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb new file mode 100644 index 000000000000..78f19b012cf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains details about groups of which this finding is a member. A group is a + # collection of findings that are related in some way. + # @!attribute [rw] group_type + # @return [::Google::Cloud::SecurityCenter::V1::GroupMembership::GroupType] + # Type of group. + # @!attribute [rw] group_id + # @return [::String] + # ID of the group. + class GroupMembership + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of groups. + module GroupType + # Default value. + GROUP_TYPE_UNSPECIFIED = 0 + + # Group represents a toxic combination. + GROUP_TYPE_TOXIC_COMBINATION = 1 + + # Group represents a chokepoint. + GROUP_TYPE_CHOKEPOINT = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb new file mode 100644 index 000000000000..0444b9de78dc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a particular IAM binding, which captures a member's role addition, + # removal, or state. + # @!attribute [rw] action + # @return [::Google::Cloud::SecurityCenter::V1::IamBinding::Action] + # The action that was performed on a Binding. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to "members". + # For example, "roles/viewer", "roles/editor", or "roles/owner". + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Cloud Platform resource, for + # example, "foo@google.com". + class IamBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb new file mode 100644 index 000000000000..518ba2e5451a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents what's commonly known as an _indicator of compromise_ (IoC) in + # computer forensics. This is an artifact observed on a network or in an + # operating system that, with high confidence, indicates a computer intrusion. + # For more information, see [Indicator of + # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). + # @!attribute [rw] ip_addresses + # @return [::Array<::String>] + # The list of IP addresses that are associated with the finding. + # @!attribute [rw] domains + # @return [::Array<::String>] + # List of domains associated to the Finding. + # @!attribute [rw] signatures + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature>] + # The list of matched signatures indicating that the given + # process is present in the environment. + # @!attribute [rw] uris + # @return [::Array<::String>] + # The list of URIs associated to the Findings. + class Indicator + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates what signature matched this process. + # @!attribute [rw] memory_hash_signature + # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::MemoryHashSignature] + # Signature indicating that a binary family was matched. + # + # Note: The following fields are mutually exclusive: `memory_hash_signature`, `yara_rule_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] yara_rule_signature + # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::YaraRuleSignature] + # Signature indicating that a YARA rule was matched. + # + # Note: The following fields are mutually exclusive: `yara_rule_signature`, `memory_hash_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] signature_type + # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::SignatureType] + # Describes the type of resource associated with the signature. + class ProcessSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A signature corresponding to memory page hashes. + # @!attribute [rw] binary_family + # @return [::String] + # The binary family. + # @!attribute [rw] detections + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::MemoryHashSignature::Detection>] + # The list of memory hash detections contributing to the binary family + # match. + class MemoryHashSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Memory hash detection contributing to the binary family match. + # @!attribute [rw] binary + # @return [::String] + # The name of the binary associated with the memory hash + # signature detection. + # @!attribute [rw] percent_pages_matched + # @return [::Float] + # The percentage of memory page hashes in the signature + # that were matched. + class Detection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A signature corresponding to a YARA rule. + # @!attribute [rw] yara_rule + # @return [::String] + # The name of the YARA rule. + class YaraRuleSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible resource types to be associated with a signature. + module SignatureType + # The default signature type. + SIGNATURE_TYPE_UNSPECIFIED = 0 + + # Used for signatures concerning processes. + SIGNATURE_TYPE_PROCESS = 1 + + # Used for signatures concerning disks. + SIGNATURE_TYPE_FILE = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb new file mode 100644 index 000000000000..9fc2809838c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Kernel mode rootkit signatures. + # @!attribute [rw] name + # @return [::String] + # Rootkit name, when available. + # @!attribute [rw] unexpected_code_modification + # @return [::Boolean] + # True if unexpected modifications of kernel code memory are present. + # @!attribute [rw] unexpected_read_only_data_modification + # @return [::Boolean] + # True if unexpected modifications of kernel read-only data memory are + # present. + # @!attribute [rw] unexpected_ftrace_handler + # @return [::Boolean] + # True if `ftrace` points are present with callbacks pointing to regions + # that are not in the expected kernel or module code range. + # @!attribute [rw] unexpected_kprobe_handler + # @return [::Boolean] + # True if `kprobe` points are present with callbacks pointing to regions + # that are not in the expected kernel or module code range. + # @!attribute [rw] unexpected_kernel_code_pages + # @return [::Boolean] + # True if kernel code pages that are not in the expected kernel or module + # code regions are present. + # @!attribute [rw] unexpected_system_call_handler + # @return [::Boolean] + # True if system call handlers that are are not in the expected kernel or + # module code regions are present. + # @!attribute [rw] unexpected_interrupt_handler + # @return [::Boolean] + # True if interrupt handlers that are are not in the expected kernel or + # module code regions are present. + # @!attribute [rw] unexpected_processes_in_runqueue + # @return [::Boolean] + # True if unexpected processes in the scheduler run queue are present. Such + # processes are in the run queue, but not in the process task list. + class KernelRootkit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb new file mode 100644 index 000000000000..6286084901a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb @@ -0,0 +1,241 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Kubernetes-related attributes. + # @!attribute [rw] pods + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Pod>] + # Kubernetes + # [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) + # associated with the finding. This field contains Pod records for each + # container that is owned by a Pod. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Node>] + # Provides Kubernetes + # [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) + # information. + # @!attribute [rw] node_pools + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::NodePool>] + # GKE [node + # pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) + # associated with the finding. This field contains node pool information for + # each node, when it is available. + # @!attribute [rw] roles + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Role>] + # Provides Kubernetes role information for findings that involve [Roles or + # ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). + # @!attribute [rw] bindings + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Binding>] + # Provides Kubernetes role binding information for findings that involve + # [RoleBindings or + # ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). + # @!attribute [rw] access_reviews + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::AccessReview>] + # Provides information on any Kubernetes access reviews (privilege checks) + # relevant to the finding. + # @!attribute [rw] objects + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Object>] + # Kubernetes objects related to the finding. + class Kubernetes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A Kubernetes Pod. + # @!attribute [rw] ns + # @return [::String] + # Kubernetes Pod namespace. + # @!attribute [rw] name + # @return [::String] + # Kubernetes Pod name. + # @!attribute [rw] labels + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Label>] + # Pod labels. For Kubernetes containers, these are applied to the + # container. + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] + # Pod containers associated with this finding, if any. + class Pod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes nodes associated with the finding. + # @!attribute [rw] name + # @return [::String] + # [Full resource name](https://google.aip.dev/122#full-resource-names) of + # the Compute Engine VM running the cluster node. + class Node + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides GKE node pool information. + # @!attribute [rw] name + # @return [::String] + # Kubernetes node pool name. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Node>] + # Nodes associated with the finding. + class NodePool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes Role or ClusterRole. + # @!attribute [rw] kind + # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Role::Kind] + # Role type. + # @!attribute [rw] ns + # @return [::String] + # Role namespace. + # @!attribute [rw] name + # @return [::String] + # Role name. + class Role + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of Kubernetes roles. + module Kind + # Role type is not specified. + KIND_UNSPECIFIED = 0 + + # Kubernetes Role. + ROLE = 1 + + # Kubernetes ClusterRole. + CLUSTER_ROLE = 2 + end + end + + # Represents a Kubernetes RoleBinding or ClusterRoleBinding. + # @!attribute [rw] ns + # @return [::String] + # Namespace for the binding. + # @!attribute [rw] name + # @return [::String] + # Name for the binding. + # @!attribute [rw] role + # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Role] + # The Role or ClusterRole referenced by the binding. + # @!attribute [rw] subjects + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Subject>] + # Represents one or more subjects that are bound to the role. Not always + # available for PATCH requests. + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Kubernetes subject. + # @!attribute [rw] kind + # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Subject::AuthType] + # Authentication type for the subject. + # @!attribute [rw] ns + # @return [::String] + # Namespace for the subject. + # @!attribute [rw] name + # @return [::String] + # Name for the subject. + class Subject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Auth types that can be used for the subject's kind field. + module AuthType + # Authentication is not specified. + AUTH_TYPE_UNSPECIFIED = 0 + + # User with valid certificate. + USER = 1 + + # Users managed by Kubernetes API with credentials stored as secrets. + SERVICEACCOUNT = 2 + + # Collection of users. + GROUP = 3 + end + end + + # Conveys information about a Kubernetes access review (such as one returned + # by a [`kubectl auth + # can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) + # command) that was involved in a finding. + # @!attribute [rw] group + # @return [::String] + # The API group of the resource. "*" means all. + # @!attribute [rw] ns + # @return [::String] + # Namespace of the action being requested. Currently, there is no + # distinction between no namespace and all namespaces. Both + # are represented by "" (empty). + # @!attribute [rw] name + # @return [::String] + # The name of the resource being requested. Empty means all. + # @!attribute [rw] resource + # @return [::String] + # The optional resource type requested. "*" means all. + # @!attribute [rw] subresource + # @return [::String] + # The optional subresource type. + # @!attribute [rw] verb + # @return [::String] + # A Kubernetes resource API verb, like get, list, watch, create, update, + # delete, proxy. "*" means all. + # @!attribute [rw] version + # @return [::String] + # The API version of the resource. "*" means all. + class AccessReview + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes object related to the finding, uniquely identified by GKNN. + # Used if the object Kind is not one of Pod, Node, NodePool, Binding, or + # AccessReview. + # @!attribute [rw] group + # @return [::String] + # Kubernetes object group, such as "policy.k8s.io/v1". + # @!attribute [rw] kind + # @return [::String] + # Kubernetes object kind, such as "Namespace". + # @!attribute [rw] ns + # @return [::String] + # Kubernetes object namespace. Must be a valid DNS label. Named + # "ns" to avoid collision with C++ namespace keyword. For details see + # https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. + # @!attribute [rw] name + # @return [::String] + # Kubernetes object name. For details see + # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] + # Pod containers associated with this finding, if any. + class Object + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb new file mode 100644 index 000000000000..d3887e4fc185 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a generic name-value label. A label has separate name and value + # fields to support filtering with the `contains()` function. For more + # information, see [Filtering on array-type + # fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). + # @!attribute [rw] name + # @return [::String] + # Name of the label. + # @!attribute [rw] value + # @return [::String] + # Value that corresponds to the label's name. + class Label + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb new file mode 100644 index 000000000000..be5ec1bb5606 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains information related to the load balancer associated with the + # finding. + # @!attribute [rw] name + # @return [::String] + # The name of the load balancer associated with the finding. + class LoadBalancer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb new file mode 100644 index 000000000000..6f028cba55b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # An individual entry in a log. + # @!attribute [rw] cloud_logging_entry + # @return [::Google::Cloud::SecurityCenter::V1::CloudLoggingEntry] + # An individual entry in a log stored in Cloud Logging. + class LogEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata taken from a [Cloud Logging + # LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) + # @!attribute [rw] insert_id + # @return [::String] + # A unique identifier for the log entry. + # @!attribute [rw] log_id + # @return [::String] + # The type of the log (part of `log_name`. `log_name` is the resource name of + # the log to which this log entry belongs). For example: + # `cloudresourcemanager.googleapis.com/activity`. Note that this field is not + # URL-encoded, unlike the `LOG_ID` field in `LogEntry`. + # @!attribute [rw] resource_container + # @return [::String] + # The organization, folder, or project of the monitored resource that + # produced this log entry. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # The time the event described by the log entry occurred. + class CloudLoggingEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb new file mode 100644 index 000000000000..6e17500226e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb @@ -0,0 +1,303 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # MITRE ATT&CK tactics and techniques related to this finding. + # See: https://attack.mitre.org + # @!attribute [rw] primary_tactic + # @return [::Google::Cloud::SecurityCenter::V1::MitreAttack::Tactic] + # The MITRE ATT&CK tactic most closely represented by this finding, if any. + # @!attribute [rw] primary_techniques + # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Technique>] + # The MITRE ATT&CK technique most closely represented by this finding, if + # any. primary_techniques is a repeated field because there are multiple + # levels of MITRE ATT&CK techniques. If the technique most closely + # represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), + # both the sub-technique and its parent technique(s) will be listed (e.g. + # `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). + # @!attribute [rw] additional_tactics + # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Tactic>] + # Additional MITRE ATT&CK tactics related to this finding, if any. + # @!attribute [rw] additional_techniques + # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Technique>] + # Additional MITRE ATT&CK techniques related to this finding, if any, along + # with any of their respective parent techniques. + # @!attribute [rw] version + # @return [::String] + # The MITRE ATT&CK version referenced by the above fields. E.g. "8". + class MitreAttack + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # MITRE ATT&CK tactics that can be referenced by SCC findings. + # See: https://attack.mitre.org/tactics/enterprise/ + module Tactic + # Unspecified value. + TACTIC_UNSPECIFIED = 0 + + # TA0043 + RECONNAISSANCE = 1 + + # TA0042 + RESOURCE_DEVELOPMENT = 2 + + # TA0001 + INITIAL_ACCESS = 5 + + # TA0002 + EXECUTION = 3 + + # TA0003 + PERSISTENCE = 6 + + # TA0004 + PRIVILEGE_ESCALATION = 8 + + # TA0005 + DEFENSE_EVASION = 7 + + # TA0006 + CREDENTIAL_ACCESS = 9 + + # TA0007 + DISCOVERY = 10 + + # TA0008 + LATERAL_MOVEMENT = 11 + + # TA0009 + COLLECTION = 12 + + # TA0011 + COMMAND_AND_CONTROL = 4 + + # TA0010 + EXFILTRATION = 13 + + # TA0040 + IMPACT = 14 + end + + # MITRE ATT&CK techniques that can be referenced by SCC findings. + # See: https://attack.mitre.org/techniques/enterprise/ + # Next ID: 65 + module Technique + # Unspecified value. + TECHNIQUE_UNSPECIFIED = 0 + + # T1036 + MASQUERADING = 49 + + # T1036.005 + MATCH_LEGITIMATE_NAME_OR_LOCATION = 50 + + # T1037 + BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37 + + # T1037.005 + STARTUP_ITEMS = 38 + + # T1046 + NETWORK_SERVICE_DISCOVERY = 32 + + # T1057 + PROCESS_DISCOVERY = 56 + + # T1059 + COMMAND_AND_SCRIPTING_INTERPRETER = 6 + + # T1059.004 + UNIX_SHELL = 7 + + # T1059.006 + PYTHON = 59 + + # T1068 + EXPLOITATION_FOR_PRIVILEGE_ESCALATION = 63 + + # T1069 + PERMISSION_GROUPS_DISCOVERY = 18 + + # T1069.003 + CLOUD_GROUPS = 19 + + # T1070.004 + INDICATOR_REMOVAL_FILE_DELETION = 64 + + # T1071 + APPLICATION_LAYER_PROTOCOL = 45 + + # T1071.004 + DNS = 46 + + # T1072 + SOFTWARE_DEPLOYMENT_TOOLS = 47 + + # T1078 + VALID_ACCOUNTS = 14 + + # T1078.001 + DEFAULT_ACCOUNTS = 35 + + # T1078.003 + LOCAL_ACCOUNTS = 15 + + # T1078.004 + CLOUD_ACCOUNTS = 16 + + # T1090 + PROXY = 9 + + # T1090.002 + EXTERNAL_PROXY = 10 + + # T1090.003 + MULTI_HOP_PROXY = 11 + + # T1098 + ACCOUNT_MANIPULATION = 22 + + # T1098.001 + ADDITIONAL_CLOUD_CREDENTIALS = 40 + + # T1098.004 + SSH_AUTHORIZED_KEYS = 23 + + # T1098.006 + ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 + + # T1105 + INGRESS_TOOL_TRANSFER = 3 + + # T1106 + NATIVE_API = 4 + + # T1110 + BRUTE_FORCE = 44 + + # T1129 + SHARED_MODULES = 5 + + # T1134 + ACCESS_TOKEN_MANIPULATION = 33 + + # T1134.001 + TOKEN_IMPERSONATION_OR_THEFT = 39 + + # T1190 + EXPLOIT_PUBLIC_FACING_APPLICATION = 27 + + # T1484 + DOMAIN_POLICY_MODIFICATION = 30 + + # T1485 + DATA_DESTRUCTION = 29 + + # T1489 + SERVICE_STOP = 52 + + # T1490 + INHIBIT_SYSTEM_RECOVERY = 36 + + # T1496 + RESOURCE_HIJACKING = 8 + + # T1498 + NETWORK_DENIAL_OF_SERVICE = 17 + + # T1526 + CLOUD_SERVICE_DISCOVERY = 48 + + # T1528 + STEAL_APPLICATION_ACCESS_TOKEN = 42 + + # T1531 + ACCOUNT_ACCESS_REMOVAL = 51 + + # T1539 + STEAL_WEB_SESSION_COOKIE = 25 + + # T1543 + CREATE_OR_MODIFY_SYSTEM_PROCESS = 24 + + # T1548 + ABUSE_ELEVATION_CONTROL_MECHANISM = 34 + + # T1552 + UNSECURED_CREDENTIALS = 13 + + # T1556 + MODIFY_AUTHENTICATION_PROCESS = 28 + + # T1562 + IMPAIR_DEFENSES = 31 + + # T1562.001 + DISABLE_OR_MODIFY_TOOLS = 55 + + # T1567 + EXFILTRATION_OVER_WEB_SERVICE = 20 + + # T1567.002 + EXFILTRATION_TO_CLOUD_STORAGE = 21 + + # T1568 + DYNAMIC_RESOLUTION = 12 + + # T1570 + LATERAL_TOOL_TRANSFER = 41 + + # T1578 + MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 + + # T1578.001 + CREATE_SNAPSHOT = 54 + + # T1580 + CLOUD_INFRASTRUCTURE_DISCOVERY = 53 + + # T1588 + OBTAIN_CAPABILITIES = 43 + + # T1595 + ACTIVE_SCANNING = 1 + + # T1595.001 + SCANNING_IP_BLOCKS = 2 + + # T1609 + CONTAINER_ADMINISTRATION_COMMAND = 60 + + # T1611 + ESCAPE_TO_HOST = 61 + + # T1613 + CONTAINER_AND_RESOURCE_DISCOVERY = 57 + + # T1649 + STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb new file mode 100644 index 000000000000..ef639857ed11 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # A mute config is a Cloud SCC resource that contains the configuration + # to mute create/update events of findings. + # @!attribute [rw] name + # @return [::String] + # This field will be ignored if provided on config creation. Format + # `organizations/{organization}/muteConfigs/{mute_config}` + # `folders/{folder}/muteConfigs/{mute_config}` + # `projects/{project}/muteConfigs/{mute_config}` + # `organizations/{organization}/locations/global/muteConfigs/{mute_config}` + # `folders/{folder}/locations/global/muteConfigs/{mute_config}` + # `projects/{project}/locations/global/muteConfigs/{mute_config}` + # @!attribute [rw] display_name + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # The human readable name to be displayed for the mute config. + # @!attribute [rw] description + # @return [::String] + # A description of the mute config. + # @!attribute [rw] filter + # @return [::String] + # Required. An expression that defines the filter to apply across + # create/update events of findings. While creating a filter string, be + # mindful of the scope in which the mute configuration is being created. + # E.g., If a filter contains project = X but is created under the project = Y + # scope, it might not match any findings. + # + # The following field and operator combinations are supported: + # + # * severity: `=`, `:` + # * category: `=`, `:` + # * resource.name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * finding_class: `=`, `:` + # * indicator.ip_addresses: `=`, `:` + # * indicator.domains: `=`, `:` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the mute config was created. + # This field is set by the server and will be ignored if provided on config + # creation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the mute config was updated. + # This field is set by the server and will be ignored if provided on config + # creation or update. + # @!attribute [r] most_recent_editor + # @return [::String] + # Output only. Email address of the user who last edited the mute config. + # This field is set by the server and will be ignored if provided on config + # creation or update. + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig::MuteConfigType] + # Optional. The type of the mute config, which determines what type of mute + # state the config affects. The static mute state takes precedence over the + # dynamic mute state. Immutable after creation. STATIC by default if not set + # during creation. + # @!attribute [rw] expiry_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The expiry of the mute config. Only applicable for dynamic + # configs. If the expiry is set, when the config expires, it is removed from + # all findings. + class MuteConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of MuteConfig. + module MuteConfigType + # Unused. + MUTE_CONFIG_TYPE_UNSPECIFIED = 0 + + # A static mute config, which sets the static mute state of future matching + # findings to muted. Once the static mute state has been set, finding or + # config modifications will not affect the state. + STATIC = 1 + + # A dynamic mute config, which is applied to existing and future matching + # findings, setting their dynamic mute state to "muted". If the config is + # updated or deleted, or a matching finding is updated, such that the + # finding doesn't match the config, the config will be removed from the + # finding, and the finding's dynamic mute state may become "unmuted" + # (unless other configs still match). + DYNAMIC = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb new file mode 100644 index 000000000000..c1a520b911b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise + # notebook](https://cloud.google.com/colab/docs/introduction) file, that is + # associated with a finding. + # @!attribute [rw] name + # @return [::String] + # The name of the notebook. + # @!attribute [rw] service + # @return [::String] + # The source notebook service, for example, "Colab Enterprise". + # @!attribute [rw] last_author + # @return [::String] + # The user ID of the latest author to modify the notebook. + # @!attribute [rw] notebook_update_time + # @return [::Google::Protobuf::Timestamp] + # The most recent time the notebook was updated. + class Notebook + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb new file mode 100644 index 000000000000..76042f526f38 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Cloud Security Command Center (Cloud SCC) notification configs. + # + # A notification config is a Cloud SCC resource that contains the configuration + # to send notifications for create/update events of findings, assets and etc. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this notification config. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/notificationConfigs/notify_public_bucket", + # "folders/\\{folder_id}/notificationConfigs/notify_public_bucket", + # or "projects/\\{project_id}/notificationConfigs/notify_public_bucket". + # @!attribute [rw] description + # @return [::String] + # The description of the notification config (max of 1024 characters). + # @!attribute [rw] pubsub_topic + # @return [::String] + # The Pub/Sub topic to send notifications to. Its format is + # "projects/[project_id]/topics/[topic]". + # @!attribute [r] service_account + # @return [::String] + # Output only. The service account that needs "pubsub.topics.publish" + # permission to publish to the Pub/Sub topic. + # @!attribute [rw] streaming_config + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig::StreamingConfig] + # The config for triggering streaming-based notifications. + class NotificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The config for streaming-based notifications, which send each event as soon + # as it is detected. + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across create/update events + # of assets or findings as specified by the event type. The expression is a + # list of zero or more restrictions combined via logical operators `AND` + # and `OR`. Parentheses are supported, and `OR` has higher precedence than + # `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + class StreamingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb new file mode 100644 index 000000000000..117cc8daf4cc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Cloud SCC's Notification + # @!attribute [rw] notification_config_name + # @return [::String] + # Name of the notification config that generated current notification. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # If it's a Finding based notification config, this field will be + # populated. + # @!attribute [rw] resource + # @return [::Google::Cloud::SecurityCenter::V1::Resource] + # The Cloud resource tied to this notification's Finding. + class NotificationMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb new file mode 100644 index 000000000000..dd2663301322 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains information about the org policies associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The resource name of the org policy. + # Example: + # "organizations/\\{organization_id}/policies/\\{constraint_name}" + class OrgPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb new file mode 100644 index 000000000000..d75d60b378de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # User specified settings that are attached to the Security Command + # Center organization. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of the settings. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/organizationSettings". + # @!attribute [rw] enable_asset_discovery + # @return [::Boolean] + # A flag that indicates if Asset Discovery should be enabled. If the flag is + # set to `true`, then discovery of assets will occur. If it is set to + # `false`, all historical assets will remain, but discovery of future assets + # will not occur. + # @!attribute [rw] asset_discovery_config + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig] + # The configuration used for Asset Discovery runs. + class OrganizationSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration used for Asset Discovery runs. + # @!attribute [rw] project_ids + # @return [::Array<::String>] + # The project ids to use for filtering asset discovery. + # @!attribute [rw] inclusion_mode + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig::InclusionMode] + # The mode to use for filtering asset discovery. + # @!attribute [rw] folder_ids + # @return [::Array<::String>] + # The folder ids to use for filtering asset discovery. + # It consists of only digits, e.g., 756619654966. + class AssetDiscoveryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mode of inclusion when running Asset Discovery. + # Asset discovery can be limited by explicitly identifying projects to be + # included or excluded. If INCLUDE_ONLY is set, then only those projects + # within the organization and their children are discovered during asset + # discovery. If EXCLUDE is set, then projects that don't match those + # projects are discovered during asset discovery. If neither are set, then + # all projects within the organization are discovered during asset + # discovery. + module InclusionMode + # Unspecified. Setting the mode with this value will disable + # inclusion/exclusion filtering for Asset Discovery. + INCLUSION_MODE_UNSPECIFIED = 0 + + # Asset Discovery will capture only the resources within the projects + # specified. All other resources will be ignored. + INCLUDE_ONLY = 1 + + # Asset Discovery will ignore all resources under the projects specified. + # All other resources will be retrieved. + EXCLUDE = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb new file mode 100644 index 000000000000..7c14c9d1baf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents an operating system process. + # @!attribute [rw] name + # @return [::String] + # The process name, as displayed in utilities like `top` and `ps`. This name + # can be accessed through `/proc/[pid]/comm` and changed with + # `prctl(PR_SET_NAME)`. + # @!attribute [rw] binary + # @return [::Google::Cloud::SecurityCenter::V1::File] + # File information for the process executable. + # @!attribute [rw] libraries + # @return [::Array<::Google::Cloud::SecurityCenter::V1::File>] + # File information for libraries loaded by the process. + # @!attribute [rw] script + # @return [::Google::Cloud::SecurityCenter::V1::File] + # When the process represents the invocation of a script, `binary` provides + # information about the interpreter, while `script` provides information + # about the script file provided to the interpreter. + # @!attribute [rw] args + # @return [::Array<::String>] + # Process arguments as JSON encoded strings. + # @!attribute [rw] arguments_truncated + # @return [::Boolean] + # True if `args` is incomplete. + # @!attribute [rw] env_variables + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EnvironmentVariable>] + # Process environment variables. + # @!attribute [rw] env_variables_truncated + # @return [::Boolean] + # True if `env_variables` is incomplete. + # @!attribute [rw] pid + # @return [::Integer] + # The process ID. + # @!attribute [rw] parent_pid + # @return [::Integer] + # The parent process ID. + class Process + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A name-value pair representing an environment variable used in an operating + # system process. + # @!attribute [rw] name + # @return [::String] + # Environment variable name as a JSON encoded string. + # @!attribute [rw] val + # @return [::String] + # Environment variable value as a JSON encoded string. + class EnvironmentVariable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb new file mode 100644 index 000000000000..5783203927c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb @@ -0,0 +1,286 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Information related to the Google Cloud resource. + # @!attribute [rw] name + # @return [::String] + # The full resource name of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] display_name + # @return [::String] + # The human readable name of the resource. + # @!attribute [rw] type + # @return [::String] + # The full resource type of the resource. + # @!attribute [rw] project + # @return [::String] + # The full resource name of project that the resource belongs to. + # @!attribute [rw] project_display_name + # @return [::String] + # The project ID that the resource belongs to. + # @!attribute [rw] parent + # @return [::String] + # The full resource name of resource's parent. + # @!attribute [rw] parent_display_name + # @return [::String] + # The human readable name of resource's parent. + # @!attribute [r] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] + # Output only. Contains a Folder message for each folder in the assets + # ancestry. The first folder is the deepest nested folder, and the last + # folder is the folder directly under the Organization. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] + # Indicates which cloud provider the resource resides in. + # @!attribute [rw] organization + # @return [::String] + # Indicates which organization or tenant in the cloud provider the finding + # applies to. + # @!attribute [rw] service + # @return [::String] + # The parent service or product from which the resource is provided, for + # example, GKE or SNS. + # @!attribute [rw] location + # @return [::String] + # The region or location of the service (if applicable). + # @!attribute [rw] aws_metadata + # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata] + # The AWS metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_metadata + # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata] + # The Azure metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `azure_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource_path + # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath] + # Provides the path to the resource within the resource hierarchy. + # @!attribute [rw] resource_path_string + # @return [::String] + # A string representation of the resource path. + # For Google Cloud, it has the format of + # `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` + # where there can be any number of folders. + # For AWS, it has the format of + # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` + # where there can be any number of organizational units. + # For Azure, it has the format of + # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` + # where there can be any number of management groups. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AWS metadata associated with the resource, only applicable if the finding's + # cloud provider is Amazon Web Services. + # @!attribute [rw] organization + # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsOrganization] + # The AWS organization associated with the resource. + # @!attribute [rw] organizational_units + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsOrganizationalUnit>] + # A list of AWS organizational units associated with the resource, ordered + # from lowest level (closest to the account) to highest level. + # @!attribute [rw] account + # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsAccount] + # The AWS account associated with the resource. + class AwsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An organization is a collection of accounts that are centrally managed + # together using consolidated billing, organized hierarchically with + # organizational units (OUs), and controlled with policies. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) for the organization. The regex pattern for an + # organization ID string requires "o-" followed by from 10 to 32 lowercase + # letters or digits. + class AwsOrganization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An Organizational Unit (OU) is a container of AWS accounts within a root of + # an organization. Policies that are attached to an OU apply to all accounts + # contained in that OU and in any child OUs. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) associated with this OU. The regex pattern for + # an organizational unit ID string requires "ou-" followed by from 4 to 32 + # lowercase letters or digits (the ID of the root that contains the OU). + # This string is followed by a second "-" dash and from 8 to 32 additional + # lowercase letters or digits. For example, "ou-ab12-cd34ef56". + # @!attribute [rw] name + # @return [::String] + # The friendly name of the OU. + class AwsOrganizationalUnit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An AWS account that is a member of an organization. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) of the account, containing exactly 12 digits. + # @!attribute [rw] name + # @return [::String] + # The friendly name of this account. + class AwsAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Azure metadata associated with the resource, only applicable if the finding's + # cloud provider is Microsoft Azure. + # @!attribute [rw] management_groups + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureManagementGroup>] + # A list of Azure management groups associated with the resource, ordered + # from lowest level (closest to the subscription) to highest level. + # @!attribute [rw] subscription + # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureSubscription] + # The Azure subscription associated with the resource. + # @!attribute [rw] resource_group + # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureResourceGroup] + # The Azure resource group associated with the resource. + class AzureMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents an Azure management group. + # @!attribute [rw] id + # @return [::String] + # The UUID of the Azure management group, for example, + # `20000000-0001-0000-0000-000000000000`. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Azure management group. + class AzureManagementGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an Azure subscription. + # @!attribute [rw] id + # @return [::String] + # The UUID of the Azure subscription, for example, + # `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Azure subscription. + class AzureSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an Azure resource group. + # @!attribute [rw] name + # @return [::String] + # The name of the Azure resource group. This is not a UUID. + class AzureResourceGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents the path of resources leading up to the resource this finding is + # about. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourcePath::ResourcePathNode>] + # The list of nodes that make the up resource path, ordered from lowest + # level to highest level. + class ResourcePath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A node within the resource path. Each node represents a resource within the + # resource hierarchy. + # @!attribute [rw] node_type + # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath::ResourcePathNodeType] + # The type of resource this node represents. + # @!attribute [rw] id + # @return [::String] + # The ID of the resource this node represents. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the resource this node represents. + class ResourcePathNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of resource the node represents. + module ResourcePathNodeType + # Node type is unspecified. + RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0 + + # The node represents a Google Cloud organization. + GCP_ORGANIZATION = 1 + + # The node represents a Google Cloud folder. + GCP_FOLDER = 2 + + # The node represents a Google Cloud project. + GCP_PROJECT = 3 + + # The node represents an AWS organization. + AWS_ORGANIZATION = 4 + + # The node represents an AWS organizational unit. + AWS_ORGANIZATIONAL_UNIT = 5 + + # The node represents an AWS account. + AWS_ACCOUNT = 6 + + # The node represents an Azure management group. + AZURE_MANAGEMENT_GROUP = 7 + + # The node represents an Azure subscription. + AZURE_SUBSCRIPTION = 8 + + # The node represents an Azure resource group. + AZURE_RESOURCE_GROUP = 9 + end + end + + # Enumeration representing the various cloud providers a finding's resource + # could reside in. + module CloudProvider + # The cloud provider is unspecified. + CLOUD_PROVIDER_UNSPECIFIED = 0 + + # The cloud provider is Google Cloud Platform. + GOOGLE_CLOUD_PLATFORM = 1 + + # The cloud provider is Amazon Web Services. + AMAZON_WEB_SERVICES = 2 + + # The cloud provider is Microsoft Azure. + MICROSOFT_AZURE = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb new file mode 100644 index 000000000000..f231fe97ed46 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb @@ -0,0 +1,125 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # A resource value configuration (RVC) is a mapping configuration of user's + # resources to resource values. Used in Attack path simulations. + # @!attribute [rw] name + # @return [::String] + # Name for the resource value configuration + # @!attribute [rw] resource_value + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] + # Required. Resource value level this expression represents + # @!attribute [rw] tag_values + # @return [::Array<::String>] + # Required. Tag values combined with `AND` to check against. + # Values in the form "tagValues/123" + # Example: `[ "tagValues/123", "tagValues/456", "tagValues/789" ]` + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing + # @!attribute [rw] resource_type + # @return [::String] + # Apply resource_value only to resources that match resource_type. + # resource_type will be checked with `AND` of other resources. + # For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" + # will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. + # @!attribute [rw] scope + # @return [::String] + # Project or folder to scope this configuration to. + # For example, "project/456" would apply this configuration only to resources + # in "project/456" scope will be checked with `AND` of other + # resources. + # @!attribute [rw] resource_labels_selector + # @return [::Google::Protobuf::Map{::String => ::String}] + # List of resource labels to search for, evaluated with `AND`. + # For example, `"resource_labels_selector": {"key": "value", "env": "prod"}` + # will match resources with labels "key": "value" `AND` "env": + # "prod" + # https://cloud.google.com/resource-manager/docs/creating-managing-labels + # @!attribute [rw] description + # @return [::String] + # Description of the resource value configuration. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp this resource value configuration was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp this resource value configuration was last updated. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] + # Cloud provider this configuration applies to + # @!attribute [rw] sensitive_data_protection_mapping + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig::SensitiveDataProtectionMapping] + # A mapping of the sensitivity on Sensitive Data Protection finding to + # resource values. This mapping can only be used in combination with a + # resource_type that is related to BigQuery, e.g. + # "bigquery.googleapis.com/Dataset". + class ResourceValueConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Resource value mapping for Sensitive Data Protection findings. + # If any of these mappings have a resource value that is not unspecified, + # the resource_value field will be ignored when reading this configuration. + # @!attribute [rw] high_sensitivity_mapping + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] + # Resource value mapping for high-sensitivity Sensitive Data Protection + # findings + # @!attribute [rw] medium_sensitivity_mapping + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] + # Resource value mapping for medium-sensitivity Sensitive Data Protection + # findings + class SensitiveDataProtectionMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceLabelsSelectorEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Value enum to map to a resource + module ResourceValue + # Unspecific value + RESOURCE_VALUE_UNSPECIFIED = 0 + + # High resource value + HIGH = 1 + + # Medium resource value + MEDIUM = 2 + + # Low resource value + LOW = 3 + + # No resource value, e.g. ignore these resources + NONE = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb new file mode 100644 index 000000000000..c00c755d2726 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Response of asset discovery run + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryResponse::State] + # The state of an asset discovery run. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # The duration between asset discovery run start and end + class RunAssetDiscoveryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of an asset discovery run. + module State + # Asset discovery run state was unspecified. + STATE_UNSPECIFIED = 0 + + # Asset discovery run completed successfully. + COMPLETED = 1 + + # Asset discovery run was cancelled with tasks still pending, as another + # run for the same organization was started with a higher priority. + SUPERSEDED = 2 + + # Asset discovery run was killed and terminated. + TERMINATED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb new file mode 100644 index 000000000000..042d8ac3a7b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Defines the properties in a custom module configuration for Security + # Health Analytics. Use the custom module configuration to create custom + # detectors that generate custom findings for resources that you specify. + # @!attribute [rw] predicate + # @return [::Google::Type::Expr] + # The CEL expression to evaluate to produce findings. When the expression + # evaluates to true against a resource, a finding is generated. + # @!attribute [rw] custom_output + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::CustomOutputSpec] + # Custom output properties. + # @!attribute [rw] resource_selector + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::ResourceSelector] + # The resource types that the custom module operates on. Each custom module + # can specify up to 5 resource types. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::Severity] + # The severity to assign to findings generated by the module. + # @!attribute [rw] description + # @return [::String] + # Text that describes the vulnerability or misconfiguration that the custom + # module detects. This explanation is returned with each finding instance to + # help investigators understand the detected issue. The text must be enclosed + # in quotation marks. + # @!attribute [rw] recommendation + # @return [::String] + # An explanation of the recommended steps that security teams can take to + # resolve the detected issue. This explanation is returned with each finding + # generated by this module in the `nextSteps` property of the finding JSON. + class CustomConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A set of optional name-value pairs that define custom source properties to + # return with each finding that is generated by the custom module. The custom + # source properties that are defined here are included in the finding JSON + # under `sourceProperties`. + # @!attribute [rw] properties + # @return [::Array<::Google::Cloud::SecurityCenter::V1::CustomConfig::CustomOutputSpec::Property>] + # A list of custom output properties to add to the finding. + class CustomOutputSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An individual name-value pair that defines a custom source property. + # @!attribute [rw] name + # @return [::String] + # Name of the property for the custom output. + # @!attribute [rw] value_expression + # @return [::Google::Type::Expr] + # The CEL expression for the custom output. A resource property can be + # specified to return the value of the property or a text string enclosed + # in quotation marks. + class Property + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Resource for selecting resource type. + # @!attribute [rw] resource_types + # @return [::Array<::String>] + # The resource types to run the detector on. + class ResourceSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the valid value options for the severity of a finding. + module Severity + # Unspecified severity. + SEVERITY_UNSPECIFIED = 0 + + # Critical severity. + CRITICAL = 1 + + # High severity. + HIGH = 2 + + # Medium severity. + MEDIUM = 3 + + # Low severity. + LOW = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..0b327125cfc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents an instance of a Security Health Analytics custom module, + # including its full module name, display name, enablement state, and last + # updated time. You can create a custom module at the organization, folder, or + # project level. Custom modules that you create at the organization or folder + # level are inherited by the child folders and projects. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the custom module. + # Its format is + # "organizations/\\{organization}/securityHealthAnalyticsSettings/customModules/\\{customModule}", + # or + # "folders/\\{folder}/securityHealthAnalyticsSettings/customModules/\\{customModule}", + # or + # "projects/\\{project}/securityHealthAnalyticsSettings/customModules/\\{customModule}" + # + # The id \\{customModule} is server-generated and is not user settable. + # It will be a numeric id containing 1-20 digits. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Security Health Analytics custom module. This + # display name becomes the finding category for all findings that are + # returned by this custom module. The display name must be between 1 and + # 128 characters, start with a lowercase letter, and contain alphanumeric + # characters or underscores only. + # @!attribute [rw] enablement_state + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule::EnablementState] + # The enablement state of the custom module. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the custom module was last updated. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The editor that last updated the custom module. + # @!attribute [r] ancestor_module + # @return [::String] + # Output only. If empty, indicates that the custom module was created in the + # organization, folder, or project in which you are viewing the custom + # module. Otherwise, `ancestor_module` specifies the organization or folder + # from which the custom module is inherited. + # @!attribute [rw] custom_config + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] + # The user specified custom configuration for the module. + class SecurityHealthAnalyticsCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible enablement states of a custom module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given CRM resource. + ENABLED = 1 + + # The module is disabled at the given CRM resource. + DISABLED = 2 + + # State is inherited from an ancestor module. The module will either + # be effectively ENABLED or DISABLED based on its closest non-inherited + # ancestor module in the CRM hierarchy. + INHERITED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb new file mode 100644 index 000000000000..0fd162583773 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # User specified security marks that are attached to the parent Security + # Command Center resource. Security marks are scoped within a Security Command + # Center organization -- they can be modified and viewed by all users who have + # proper permissions on the organization. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of the SecurityMarks. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Examples: + # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks". + # @!attribute [rw] marks + # @return [::Google::Protobuf::Map{::String => ::String}] + # Mutable user specified security marks belonging to the parent resource. + # Constraints are as follows: + # + # * Keys and values are treated as case insensitive + # * Keys must be between 1 - 256 characters (inclusive) + # * Keys must be letters, numbers, underscores, or dashes + # * Values have leading and trailing whitespace trimmed, remaining + # characters must be between 1 - 4096 characters (inclusive) + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the marks. + # Examples: + # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" + # "folders/\\{folder_id}/assets/\\{asset_id}/securityMarks" + # "projects/\\{project_number}/assets/\\{asset_id}/securityMarks" + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + class SecurityMarks + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MarksEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb new file mode 100644 index 000000000000..fb8f89c609e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a posture that is deployed on Google Cloud by the + # Security Command Center Posture Management service. + # A posture contains one or more policy sets. A policy set is a + # group of policies that enforce a set of security rules on Google + # Cloud. + # @!attribute [rw] name + # @return [::String] + # Name of the posture, for example, `CIS-Posture`. + # @!attribute [rw] revision_id + # @return [::String] + # The version of the posture, for example, `c7cfa2a8`. + # @!attribute [rw] posture_deployment_resource + # @return [::String] + # The project, folder, or organization on which the posture is deployed, + # for example, `projects/{project_number}`. + # @!attribute [rw] posture_deployment + # @return [::String] + # The name of the posture deployment, for example, + # `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. + # @!attribute [rw] changed_policy + # @return [::String] + # The name of the updated policy, for example, + # `projects/{project_id}/policies/{constraint_name}`. + # @!attribute [rw] policy_set + # @return [::String] + # The name of the updated policyset, for example, `cis-policyset`. + # @!attribute [rw] policy + # @return [::String] + # The ID of the updated policy, for example, `compute-policy-1`. + # @!attribute [rw] policy_drift_details + # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityPosture::PolicyDriftDetails>] + # The details about a change in an updated policy that violates the deployed + # posture. + class SecurityPosture + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The policy field that violates the deployed posture and its expected and + # detected values. + # @!attribute [rw] field + # @return [::String] + # The name of the updated field, for example + # constraint.implementation.policy_rules[0].enforce + # @!attribute [rw] expected_value + # @return [::String] + # The value of this field that was configured in a posture, for example, + # `true` or `allowed_values={"projects/29831892"}`. + # @!attribute [rw] detected_value + # @return [::String] + # The detected value that violates the deployed posture, for example, + # `false` or `allowed_values={"projects/22831892"}`. + class PolicyDriftDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb new file mode 100644 index 000000000000..6b9045050b73 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb @@ -0,0 +1,2146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Request message for bulk findings update. + # + # Note: + # 1. If multiple bulk update requests match the same resource, the order in + # which they get executed is not defined. + # 2. Once a bulk operation is started, there is no way to stop it. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, at which bulk action needs to be applied. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @!attribute [rw] filter + # @return [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @!attribute [rw] mute_annotation + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # This can be a mute configuration name or any identifier for mute/unmute + # of findings based on the filter. + # @!attribute [rw] mute_state + # @return [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + class BulkMuteFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mute state. + module MuteState + # Unused. + MUTE_STATE_UNSPECIFIED = 0 + + # Matching findings will be muted (default). + MUTED = 1 + + # Matching findings will have their mute state cleared. + UNDEFINED = 2 + end + end + + # The response to a BulkMute request. Contains the LRO information. + class BulkMuteFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a finding. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new finding's parent. Its format should be + # `organizations/[organization_id]/sources/[source_id]`. + # @!attribute [rw] finding_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + class CreateFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a mute config. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] mute_config + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # Required. The mute config being created. + # @!attribute [rw] mute_config_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + class CreateMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to create single resource value config + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # @!attribute [rw] resource_value_config + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # Required. The resource value config being created. + class CreateResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to create multiple resource value configs + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest>] + # Required. The resource value configs to be created. + class BatchCreateResourceValueConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BatchCreateResourceValueConfigs + # @!attribute [rw] resource_value_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # The resource value configs created + class BatchCreateResourceValueConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete resource value config + # @!attribute [rw] name + # @return [::String] + # Required. Name of the ResourceValueConfig to delete + class DeleteResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get resource value config + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource value config to retrieve. Its format is + # `organizations/{organization}/resourceValueConfigs/{config_id}`. + class GetResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to list resource value configs of a parent + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @!attribute [rw] page_size + # @return [::Integer] + # The number of results to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + class ListResourceValueConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message to list resource value configs + # @!attribute [rw] resource_value_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # The resource value configs from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is empty, there are no subsequent pages. + class ListResourceValueConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to update resource value config + # @!attribute [rw] resource_value_config + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # Required. The resource value config being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a notification config. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] config_id + # @return [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + class CreateNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating Security Health Analytics custom modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new custom module's parent. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @!attribute [rw] security_health_analytics_custom_module + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # Required. SecurityHealthAnalytics custom module to create. The provided + # name is ignored and reset with provided parent information and + # server-generated ID. + class CreateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a source. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + class CreateSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a mute config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the mute config to delete. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + class DeleteMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a notification config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the notification config to delete. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + class DeleteNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting Security Health Analytics custom modules. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom module to delete. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + class DeleteSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for retrieving a BigQuery export. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the BigQuery export to retrieve. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + class GetBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for retrieving a mute config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the mute config to retrieve. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + class GetMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a notification config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the notification config to get. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + class GetNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting organization settings. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the organization to get organization settings for. Its + # format is `organizations/[organization_id]/organizationSettings`. + class GetOrganizationSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting effective Security Health Analytics custom + # modules. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the effective custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` + class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting Security Health Analytics custom modules. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + class GetSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a source. + # @!attribute [rw] name + # @return [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + class GetSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for grouping by assets. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent to group the assets by. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @!attribute [rw] group_by + # @return [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class GroupAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for grouping by assets. + # @!attribute [rw] group_by_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # Group results. There exists an element for each existing unique + # combination of property/values. The element contains a count for the number + # of times those specific property/values appear. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the groupBy request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of results matching the query. + class GroupAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for grouping by findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source to groupBy. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + # or `projects/{project_id}/sources/-` + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @!attribute [rw] group_by + # @return [::String] + # Required. Expression that defines what assets fields to use for grouping + # (including `state_change`). The string value should follow SQL syntax: + # comma separated list of fields. For example: "parent,resource_name". + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class GroupFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for group by findings. + # @!attribute [rw] group_by_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # Group results. There exists an element for each existing unique + # combination of property/values. The element contains a count for the number + # of times those specific property/values appear. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the groupBy request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of results matching the query. + class GroupFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result containing the properties and count of a groupBy request. + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Properties matching the groupBy fields in the request. + # @!attribute [rw] count + # @return [::Integer] + # Total count of resources for the given properties. + class GroupResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for listing descendant Security Health Analytics custom + # modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list descendant custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last call indicating a continuation + class ListDescendantSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing descendant Security Health Analytics custom + # modules. + # @!attribute [rw] security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # Custom modules belonging to the requested parent and its descendants. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more custom modules to be + # returned. + class ListDescendantSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing the valued resources for a given simulation. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list valued resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @!attribute [rw] filter + # @return [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # * `resource` + # + # * `display_name` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + # example: `exposed_score DESC`. + class ListValuedResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing the valued resources for a given simulation. + # @!attribute [rw] valued_resources + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # The valued resources that the attack path simulation identified. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The estimated total number of results matching the query. + class ListValuedResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing the attack paths for a given simulation or valued + # resource. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @!attribute [rw] filter + # @return [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListAttackPathsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing the attack paths for a given simulation or + # valued resource. + # @!attribute [rw] attack_paths + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # The attack paths that the attack path simulation identified. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListAttackPathsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting simulation. + # Simulation name can include "latest" to retrieve the latest simulation + # For example, "organizations/123/simulations/latest" + # @!attribute [rw] name + # @return [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + class GetSimulationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a valued resource. + # @!attribute [rw] name + # @return [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + class GetValuedResourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing mute configs at a given scope e.g. organization, + # folder or project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + class ListMuteConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing mute configs. + # @!attribute [rw] mute_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # The mute configs from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMuteConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing notification configs. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is "organizations/[organization_id]", + # "folders/[folder_id]", or "projects/[project_id]". + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListNotificationConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing notification configs. + # @!attribute [rw] notification_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # Notification configs belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListNotificationConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing effective Security Health Analytics custom + # modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list effective custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last call indicating a continuation + class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing effective Security Health Analytics custom + # modules. + # @!attribute [rw] effective_security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # Effective custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more effective custom modules to + # be returned. + class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing Security Health Analytics custom modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last call indicating a continuation + class ListSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing Security Health Analytics custom modules. + # @!attribute [rw] security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # Custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more custom modules to be + # returned. + class ListSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing sources. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing sources. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Source>] + # Sources belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing assets. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource that contains the assets. The + # value that you can specify on parent depends on the method in which you + # specify parent. You can specify one of the following values: + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @!attribute [rw] order_by + # @return [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing assets. + # @!attribute [rw] list_assets_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # Assets matching the list request. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the list request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of assets matching the query. + class ListAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result containing the Asset and its State. + # @!attribute [rw] asset + # @return [::Google::Cloud::SecurityCenter::V1::Asset] + # Asset matching the search request. + # @!attribute [rw] state_change + # @return [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult::StateChange] + # State change of the asset between the points in time. + class ListAssetsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The change in state of the asset. + # + # When querying across two points in time this describes + # the change between the two points: ADDED, REMOVED, or ACTIVE. + # If there was no compare_duration supplied in the request the state change + # will be: UNUSED + module StateChange + # State change is unused, this is the canonical default for this enum. + UNUSED = 0 + + # Asset was added between the points in time. + ADDED = 1 + + # Asset was removed between the points in time. + REMOVED = 2 + + # Asset was present at both point(s) in time. + ACTIVE = 3 + end + end + end + + # Request message for listing findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source the findings belong to. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To list across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-`, + # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @!attribute [rw] order_by + # @return [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing findings. + # @!attribute [rw] list_findings_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # Findings matching the list request. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the list request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of findings matching the query. + class ListFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result containing the Finding and its StateChange. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # Finding matching the search request. + # @!attribute [rw] state_change + # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::StateChange] + # State change of the finding between the points in time. + # @!attribute [r] resource + # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::Resource] + # Output only. Resource that is associated with this finding. + class ListFindingsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information related to the Google Cloud resource that is + # associated with this finding. + # @!attribute [rw] name + # @return [::String] + # The full resource name of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] display_name + # @return [::String] + # The human readable name of the resource. + # @!attribute [rw] type + # @return [::String] + # The full resource type of the resource. + # @!attribute [rw] project_name + # @return [::String] + # The full resource name of project that the resource belongs to. + # @!attribute [rw] project_display_name + # @return [::String] + # The project ID that the resource belongs to. + # @!attribute [rw] parent_name + # @return [::String] + # The full resource name of resource's parent. + # @!attribute [rw] parent_display_name + # @return [::String] + # The human readable name of resource's parent. + # @!attribute [rw] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] + # Contains a Folder message for each folder in the assets ancestry. + # The first folder is the deepest nested folder, and the last folder is + # the folder directly under the Organization. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] + # Indicates which cloud provider the finding is from. + # @!attribute [rw] organization + # @return [::String] + # Indicates which organization / tenant the finding is for. + # @!attribute [rw] service + # @return [::String] + # The service or resource provider associated with the resource. + # @!attribute [rw] location + # @return [::String] + # The region or location of the service (if applicable). + # @!attribute [rw] aws_metadata + # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata] + # The AWS metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_metadata + # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata] + # The Azure metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `azure_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource_path + # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath] + # Provides the path to the resource within the resource hierarchy. + # @!attribute [rw] resource_path_string + # @return [::String] + # A string representation of the resource path. + # For Google Cloud, it has the format of + # `org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id}` + # where there can be any number of folders. + # For AWS, it has the format of + # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` + # where there can be any number of organizational units. + # For Azure, it has the format of + # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` + # where there can be any number of management groups. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The change in state of the finding. + # + # When querying across two points in time this describes + # the change in the finding between the two points: CHANGED, UNCHANGED, + # ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that + # the finding at timestamp does not match the filter specified, but it did + # at timestamp - compare_duration. If there was no compare_duration + # supplied in the request the state change will be: UNUSED + module StateChange + # State change is unused, this is the canonical default for this enum. + UNUSED = 0 + + # The finding has changed state in some way between the points in time + # and existed at both points. + CHANGED = 1 + + # The finding has not changed state between the points in time and + # existed at both points. + UNCHANGED = 2 + + # The finding was created between the points in time. + ADDED = 3 + + # The finding at timestamp does not match the filter specified, but it + # did at timestamp - compare_duration. + REMOVED = 4 + end + end + end + + # Request message for updating a finding's state. + # @!attribute [rw] name + # @return [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::Finding::State] + # Required. The desired State of the finding. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. The time at which the updated state takes effect. + class SetFindingStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a finding's mute status. + # @!attribute [rw] name + # @return [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @!attribute [rw] mute + # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # Required. The desired state of the Mute. + class SetMuteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for running asset discovery for an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the organization to run asset discovery for. Its format + # is `organizations/[organization_id]`. + class RunAssetDiscoveryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to simulate a CustomConfig against a given test resource. + # Maximum size of the request is 4 MB by default. + # @!attribute [rw] parent + # @return [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [Relative + # Resource + # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # Example: `organizations/{organization_id}` + # @!attribute [rw] custom_config + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] + # Required. The custom configuration that you need to test. + # @!attribute [rw] resource + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource] + # Required. Resource data to simulate custom module against. + class SimulateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Manually constructed resource name. If the custom module evaluates against + # only the resource data, you can omit the `iam_policy_data` field. If it + # evaluates only the `iam_policy_data` field, you can omit the resource data. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the resource, for example, + # `compute.googleapis.com/Disk`. + # @!attribute [rw] resource_data + # @return [::Google::Protobuf::Struct] + # Optional. A representation of the Google Cloud resource. Should match the + # Google Cloud resource JSON format. + # @!attribute [rw] iam_policy_data + # @return [::Google::Iam::V1::Policy] + # Optional. A representation of the IAM policy. + class SimulatedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for simulating a `SecurityHealthAnalyticsCustomModule` + # against a given resource. + # @!attribute [rw] result + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult] + # Result for test case in the corresponding request. + class SimulateSecurityHealthAnalyticsCustomModuleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible test result. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # Finding that would be published for the test case, + # if a violation is detected. + # + # Note: The following fields are mutually exclusive: `finding`, `no_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] no_violation + # @return [::Google::Protobuf::Empty] + # Indicates that the test case does not trigger any violation. + # + # Note: The following fields are mutually exclusive: `no_violation`, `finding`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Error encountered during the test. + # + # Note: The following fields are mutually exclusive: `error`, `finding`, `no_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SimulatedResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for updating a ExternalSystem resource. + # @!attribute [rw] external_system + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # Required. The external system resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + class UpdateExternalSystemRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating or creating a finding. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + class UpdateFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a mute config. + # @!attribute [rw] mute_config + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # Required. The mute config being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a notification config. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # Required. The notification config to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + class UpdateNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating an organization's settings. + # @!attribute [rw] organization_settings + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # Required. The organization settings resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + class UpdateOrganizationSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating Security Health Analytics custom modules. + # @!attribute [rw] security_health_analytics_custom_module + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # Required. The SecurityHealthAnalytics custom module to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. The only fields that can be updated are + # `enablement_state` and `custom_config`. If empty or set to the wildcard + # value `*`, both `enablement_state` and `custom_config` are updated. + class UpdateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a source. + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # Required. The source resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + class UpdateSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a SecurityMarks resource. + # @!attribute [rw] security_marks + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # Required. The security marks resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. Must be + # earlier or equal to the server time. + class UpdateSecurityMarksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a BigQuery export. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] big_query_export + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # Required. The BigQuery export being created. + # @!attribute [rw] big_query_export_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + class CreateBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a BigQuery export. + # @!attribute [rw] big_query_export + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # Required. The BigQuery export being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing BigQuery exports at a given scope e.g. + # organization, folder or project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + class ListBigQueryExportsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing BigQuery exports. + # @!attribute [rw] big_query_exports + # @return [::Array<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # The BigQuery exports from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListBigQueryExportsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a BigQuery export. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the BigQuery export to delete. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + class DeleteBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create an Event Threat Detection custom module. + # @!attribute [rw] parent + # @return [::String] + # Required. The new custom module's parent. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] event_threat_detection_custom_module + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # Required. The module to create. The + # event_threat_detection_custom_module.name will be ignored and server + # generated. + class CreateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to validate an Event Threat Detection custom module. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent to validate the Custom Module under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] raw_text + # @return [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @!attribute [rw] type + # @return [::String] + # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + class ValidateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to validating an Event Threat Detection custom module. + # @!attribute [rw] errors + # @return [::Google::Cloud::SecurityCenter::V1::CustomModuleValidationErrors] + # A list of errors returned by the validator. If the list is empty, there + # were no errors. + class ValidateEventThreatDetectionCustomModuleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete an Event Threat Detection custom module. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom module to delete. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + class DeleteEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get an Event Threat Detection custom module. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom module to get. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + class GetEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list current and descendant resident Event Threat Detection custom + # modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous + # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDescendantEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + class ListDescendantEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing current and descendant resident + # Event Threat Detection custom modules. + # @!attribute [rw] event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # Custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDescendantEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Event Threat Detection custom modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous + # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListEventThreatDetectionCustomModules` must match the call that provided + # the page token. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + class ListEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing Event Threat Detection custom modules. + # @!attribute [rw] event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # Custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update an Event Threat Detection custom module. + # @!attribute [rw] event_threat_detection_custom_module + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # Required. The module being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get an EffectiveEventThreatDetectionCustomModule. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the effective Event Threat Detection custom + # module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + class GetEffectiveEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list effective Event Threat Detection custom modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent to list custom modules for. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous + # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListEffectiveEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + class ListEffectiveEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing EffectiveEventThreatDetectionCustomModules. + # @!attribute [rw] effective_event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # Effective custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListEffectiveEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb new file mode 100644 index 000000000000..63924f12b411 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Attack path simulation + # @!attribute [rw] name + # @return [::String] + # Full resource name of the Simulation: + # `organizations/123/simulations/456` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time simulation was created + # @!attribute [rw] resource_value_configs_metadata + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfigMetadata>] + # Resource value configurations' metadata used in this simulation. Maximum of + # 100. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] + # Indicates which cloud provider was used in this simulation. + class Simulation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb new file mode 100644 index 000000000000..4ccbdd08fd29 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Security Command Center finding source. A finding source + # is an entity or a mechanism that can produce a finding. A source is like a + # container of findings that come from the same scanner, logger, monitor, and + # other tools. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this source. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/sources/\\{source_id}" + # @!attribute [rw] display_name + # @return [::String] + # The source's display name. + # A source's display name must be unique amongst its siblings, for example, + # two sources with the same parent can't share the same display name. + # The display name must have a length between 1 and 64 characters + # (inclusive). + # @!attribute [rw] description + # @return [::String] + # The description of the source (max of 1024 characters). + # Example: + # "Web Security Scanner is a web security scanner for common + # vulnerabilities in App Engine applications. It can automatically + # scan and detect four common vulnerabilities, including cross-site-scripting + # (XSS), Flash injection, mixed content (HTTP in HTTPS), and + # outdated or insecure libraries." + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the finding source. It's either + # "organizations/\\{organization_id}/sources/\\{source_id}", + # "folders/\\{folder_id}/sources/\\{source_id}", or + # "projects/\\{project_number}/sources/\\{source_id}", + # depending on the closest CRM ancestor of the resource associated with the + # finding. + class Source + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb new file mode 100644 index 000000000000..4ad02b3ce5f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains details about a group of security issues that, when the issues + # occur together, represent a greater risk than when the issues occur + # independently. A group of such issues is referred to as a toxic combination. + # @!attribute [rw] attack_exposure_score + # @return [::Float] + # The + # [Attack exposure + # score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + # of this toxic combination. The score is a measure of how much this toxic + # combination exposes one or more high-value resources to potential attack. + # @!attribute [rw] related_findings + # @return [::Array<::String>] + # List of resource names of findings associated with this toxic combination. + # For example, `organizations/123/sources/456/findings/789`. + class ToxicCombination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb new file mode 100644 index 000000000000..1cd95d5b43f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # A resource that is determined to have value to a user's system + # @!attribute [rw] name + # @return [::String] + # Valued resource name, for example, + # e.g.: + # `organizations/123/simulations/456/valuedResources/789` + # @!attribute [rw] resource + # @return [::String] + # The + # [full resource + # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # of the valued resource. + # @!attribute [rw] resource_type + # @return [::String] + # The [resource + # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # of the valued resource. + # @!attribute [rw] display_name + # @return [::String] + # Human-readable name of the valued resource. + # @!attribute [rw] resource_value + # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource::ResourceValue] + # How valuable this resource is. + # @!attribute [rw] exposed_score + # @return [::Float] + # Exposed score for this valued resource. A value of 0 means no exposure was + # detected exposure. + # @!attribute [rw] resource_value_configs_used + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfigMetadata>] + # List of resource value configurations' metadata used to determine the value + # of this resource. Maximum of 100. + class ValuedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How valuable the resource is. + module ResourceValue + # The resource value isn't specified. + RESOURCE_VALUE_UNSPECIFIED = 0 + + # This is a low-value resource. + RESOURCE_VALUE_LOW = 1 + + # This is a medium-value resource. + RESOURCE_VALUE_MEDIUM = 2 + + # This is a high-value resource. + RESOURCE_VALUE_HIGH = 3 + end + end + + # Metadata about a ResourceValueConfig. For example, id and name. + # @!attribute [rw] name + # @return [::String] + # Resource value config name + class ResourceValueConfigMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb new file mode 100644 index 000000000000..aadd507c0a50 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb @@ -0,0 +1,336 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Refers to common vulnerability fields e.g. cve, cvss, cwe etc. + # @!attribute [rw] cve + # @return [::Google::Cloud::SecurityCenter::V1::Cve] + # CVE stands for Common Vulnerabilities and Exposures + # (https://cve.mitre.org/about/) + # @!attribute [rw] offending_package + # @return [::Google::Cloud::SecurityCenter::V1::Package] + # The offending package is relevant to the finding. + # @!attribute [rw] fixed_package + # @return [::Google::Cloud::SecurityCenter::V1::Package] + # The fixed package is relevant to the finding. + # @!attribute [rw] security_bulletin + # @return [::Google::Cloud::SecurityCenter::V1::SecurityBulletin] + # The security bulletin is relevant to this finding. + class Vulnerability + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CVE stands for Common Vulnerabilities and Exposures. + # Information from the [CVE + # record](https://www.cve.org/ResourcesSupport/Glossary) that describes this + # vulnerability. + # @!attribute [rw] id + # @return [::String] + # The unique identifier for the vulnerability. e.g. CVE-2021-34527 + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Reference>] + # Additional information about the CVE. + # e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 + # @!attribute [rw] cvssv3 + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3] + # Describe Common Vulnerability Scoring System specified at + # https://www.first.org/cvss/v3.1/specification-document + # @!attribute [rw] upstream_fix_available + # @return [::Boolean] + # Whether upstream fix is available for the CVE. + # @!attribute [rw] impact + # @return [::Google::Cloud::SecurityCenter::V1::Cve::RiskRating] + # The potential impact of the vulnerability if it was to be exploited. + # @!attribute [rw] exploitation_activity + # @return [::Google::Cloud::SecurityCenter::V1::Cve::ExploitationActivity] + # The exploitation activity of the vulnerability in the wild. + # @!attribute [rw] observed_in_the_wild + # @return [::Boolean] + # Whether or not the vulnerability has been observed in the wild. + # @!attribute [rw] zero_day + # @return [::Boolean] + # Whether or not the vulnerability was zero day when the finding was + # published. + # @!attribute [rw] exploit_release_date + # @return [::Google::Protobuf::Timestamp] + # Date the first publicly available exploit or PoC was released. + class Cve + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible values of impact of the vulnerability if it was to be + # exploited. + module RiskRating + # Invalid or empty value. + RISK_RATING_UNSPECIFIED = 0 + + # Exploitation would have little to no security impact. + LOW = 1 + + # Exploitation would enable attackers to perform activities, or could allow + # attackers to have a direct impact, but would require additional steps. + MEDIUM = 2 + + # Exploitation would enable attackers to have a notable direct impact + # without needing to overcome any major mitigating factors. + HIGH = 3 + + # Exploitation would fundamentally undermine the security of affected + # systems, enable actors to perform significant attacks with minimal + # effort, with little to no mitigating factors to overcome. + CRITICAL = 4 + end + + # The possible values of exploitation activity of the vulnerability in the + # wild. + module ExploitationActivity + # Invalid or empty value. + EXPLOITATION_ACTIVITY_UNSPECIFIED = 0 + + # Exploitation has been reported or confirmed to widely occur. + WIDE = 1 + + # Limited reported or confirmed exploitation activities. + CONFIRMED = 2 + + # Exploit is publicly available. + AVAILABLE = 3 + + # No known exploitation activity, but has a high potential for + # exploitation. + ANTICIPATED = 4 + + # No known exploitation activity. + NO_KNOWN = 5 + end + end + + # Additional Links + # @!attribute [rw] source + # @return [::String] + # Source of the reference e.g. NVD + # @!attribute [rw] uri + # @return [::String] + # Uri for the mentioned source e.g. + # https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. + class Reference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Common Vulnerability Scoring System version 3. + # @!attribute [rw] base_score + # @return [::Float] + # The base score is a function of the base metric scores. + # @!attribute [rw] attack_vector + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::AttackVector] + # Base Metrics + # Represents the intrinsic characteristics of a vulnerability that are + # constant over time and across user environments. + # This metric reflects the context by which vulnerability exploitation is + # possible. + # @!attribute [rw] attack_complexity + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::AttackComplexity] + # This metric describes the conditions beyond the attacker's control that + # must exist in order to exploit the vulnerability. + # @!attribute [rw] privileges_required + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::PrivilegesRequired] + # This metric describes the level of privileges an attacker must possess + # before successfully exploiting the vulnerability. + # @!attribute [rw] user_interaction + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::UserInteraction] + # This metric captures the requirement for a human user, other than the + # attacker, to participate in the successful compromise of the vulnerable + # component. + # @!attribute [rw] scope + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Scope] + # The Scope metric captures whether a vulnerability in one vulnerable + # component impacts resources in components beyond its security scope. + # @!attribute [rw] confidentiality_impact + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] + # This metric measures the impact to the confidentiality of the information + # resources managed by a software component due to a successfully exploited + # vulnerability. + # @!attribute [rw] integrity_impact + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] + # This metric measures the impact to integrity of a successfully exploited + # vulnerability. + # @!attribute [rw] availability_impact + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] + # This metric measures the impact to the availability of the impacted + # component resulting from a successfully exploited vulnerability. + class Cvssv3 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This metric reflects the context by which vulnerability exploitation is + # possible. + module AttackVector + # Invalid value. + ATTACK_VECTOR_UNSPECIFIED = 0 + + # The vulnerable component is bound to the network stack and the set of + # possible attackers extends beyond the other options listed below, up to + # and including the entire Internet. + ATTACK_VECTOR_NETWORK = 1 + + # The vulnerable component is bound to the network stack, but the attack is + # limited at the protocol level to a logically adjacent topology. + ATTACK_VECTOR_ADJACENT = 2 + + # The vulnerable component is not bound to the network stack and the + # attacker's path is via read/write/execute capabilities. + ATTACK_VECTOR_LOCAL = 3 + + # The attack requires the attacker to physically touch or manipulate the + # vulnerable component. + ATTACK_VECTOR_PHYSICAL = 4 + end + + # This metric describes the conditions beyond the attacker's control that + # must exist in order to exploit the vulnerability. + module AttackComplexity + # Invalid value. + ATTACK_COMPLEXITY_UNSPECIFIED = 0 + + # Specialized access conditions or extenuating circumstances do not exist. + # An attacker can expect repeatable success when attacking the vulnerable + # component. + ATTACK_COMPLEXITY_LOW = 1 + + # A successful attack depends on conditions beyond the attacker's control. + # That is, a successful attack cannot be accomplished at will, but requires + # the attacker to invest in some measurable amount of effort in preparation + # or execution against the vulnerable component before a successful attack + # can be expected. + ATTACK_COMPLEXITY_HIGH = 2 + end + + # This metric describes the level of privileges an attacker must possess + # before successfully exploiting the vulnerability. + module PrivilegesRequired + # Invalid value. + PRIVILEGES_REQUIRED_UNSPECIFIED = 0 + + # The attacker is unauthorized prior to attack, and therefore does not + # require any access to settings or files of the vulnerable system to + # carry out an attack. + PRIVILEGES_REQUIRED_NONE = 1 + + # The attacker requires privileges that provide basic user capabilities + # that could normally affect only settings and files owned by a user. + # Alternatively, an attacker with Low privileges has the ability to access + # only non-sensitive resources. + PRIVILEGES_REQUIRED_LOW = 2 + + # The attacker requires privileges that provide significant (e.g., + # administrative) control over the vulnerable component allowing access to + # component-wide settings and files. + PRIVILEGES_REQUIRED_HIGH = 3 + end + + # This metric captures the requirement for a human user, other than the + # attacker, to participate in the successful compromise of the vulnerable + # component. + module UserInteraction + # Invalid value. + USER_INTERACTION_UNSPECIFIED = 0 + + # The vulnerable system can be exploited without interaction from any user. + USER_INTERACTION_NONE = 1 + + # Successful exploitation of this vulnerability requires a user to take + # some action before the vulnerability can be exploited. + USER_INTERACTION_REQUIRED = 2 + end + + # The Scope metric captures whether a vulnerability in one vulnerable + # component impacts resources in components beyond its security scope. + module Scope + # Invalid value. + SCOPE_UNSPECIFIED = 0 + + # An exploited vulnerability can only affect resources managed by the same + # security authority. + SCOPE_UNCHANGED = 1 + + # An exploited vulnerability can affect resources beyond the security scope + # managed by the security authority of the vulnerable component. + SCOPE_CHANGED = 2 + end + + # The Impact metrics capture the effects of a successfully exploited + # vulnerability on the component that suffers the worst outcome that is most + # directly and predictably associated with the attack. + module Impact + # Invalid value. + IMPACT_UNSPECIFIED = 0 + + # High impact. + IMPACT_HIGH = 1 + + # Low impact. + IMPACT_LOW = 2 + + # No impact. + IMPACT_NONE = 3 + end + end + + # Package is a generic definition of a package. + # @!attribute [rw] package_name + # @return [::String] + # The name of the package where the vulnerability was detected. + # @!attribute [rw] cpe_uri + # @return [::String] + # The CPE URI where the vulnerability was detected. + # @!attribute [rw] package_type + # @return [::String] + # Type of package, for example, os, maven, or go. + # @!attribute [rw] package_version + # @return [::String] + # The version of the package. + class Package + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SecurityBulletin are notifications of vulnerabilities of Google products. + # @!attribute [rw] bulletin_id + # @return [::String] + # ID of the bulletin corresponding to the vulnerability. + # @!attribute [rw] submission_time + # @return [::Google::Protobuf::Timestamp] + # Submission time of this Security Bulletin. + # @!attribute [rw] suggested_upgrade_version + # @return [::String] + # This represents a version that the cluster receiving this notification + # should be upgraded to, based on its current version. For example, 1.15.0 + class SecurityBulletin + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile new file mode 100644 index 000000000000..f16288a177ba --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-security_center-v1", path: "../" +else + gem "google-cloud-security_center-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb new file mode 100644 index 000000000000..62423aec31af --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the batch_create_resource_value_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs. +# +def batch_create_resource_value_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new + + # Call the batch_create_resource_value_configs method. + result = client.batch_create_resource_value_configs request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb new file mode 100644 index 000000000000..93db8d1e0876 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the bulk_mute_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings. +# +def bulk_mute_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new + + # Call the bulk_mute_findings method. + result = client.bulk_mute_findings request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb new file mode 100644 index 000000000000..be92178bf7b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export. +# +def create_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new + + # Call the create_big_query_export method. + result = client.create_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..08036d256638 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module. +# +def create_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new + + # Call the create_event_threat_detection_custom_module method. + result = client.create_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb new file mode 100644 index 000000000000..0b195fb59e80 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_finding call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding. +# +def create_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new + + # Call the create_finding method. + result = client.create_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb new file mode 100644 index 000000000000..7c91c84d013c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config. +# +def create_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new + + # Call the create_mute_config method. + result = client.create_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb new file mode 100644 index 000000000000..9d25cf280532 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config. +# +def create_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new + + # Call the create_notification_config method. + result = client.create_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..5de06ad0e47b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module. +# +def create_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the create_security_health_analytics_custom_module method. + result = client.create_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb new file mode 100644 index 000000000000..426ebeba8ec5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateSource_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source. +# +def create_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new + + # Call the create_source method. + result = client.create_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb new file mode 100644 index 000000000000..e549c6d67597 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export. +# +def delete_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new + + # Call the delete_big_query_export method. + result = client.delete_big_query_export request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..9da872ba42f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module. +# +def delete_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new + + # Call the delete_event_threat_detection_custom_module method. + result = client.delete_event_threat_detection_custom_module request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb new file mode 100644 index 000000000000..ea8a60533934 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config. +# +def delete_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new + + # Call the delete_mute_config method. + result = client.delete_mute_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb new file mode 100644 index 000000000000..6bc88e7ff81e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config. +# +def delete_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new + + # Call the delete_notification_config method. + result = client.delete_notification_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb new file mode 100644 index 000000000000..a39d9a23c8fd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config. +# +def delete_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new + + # Call the delete_resource_value_config method. + result = client.delete_resource_value_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..946a821c16e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module. +# +def delete_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the delete_security_health_analytics_custom_module method. + result = client.delete_security_health_analytics_custom_module request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb new file mode 100644 index 000000000000..1c58bd5b0d78 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export. +# +def get_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new + + # Call the get_big_query_export method. + result = client.get_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..be112113b672 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module. +# +def get_effective_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + + # Call the get_effective_event_threat_detection_custom_module method. + result = client.get_effective_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..7db2ddb3ecfc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module. +# +def get_effective_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the get_effective_security_health_analytics_custom_module method. + result = client.get_effective_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..ec5742081391 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module. +# +def get_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new + + # Call the get_event_threat_detection_custom_module method. + result = client.get_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb new file mode 100644 index 000000000000..2b9a6db77e1e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_iam_policy call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb new file mode 100644 index 000000000000..48df3fdf3201 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config. +# +def get_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new + + # Call the get_mute_config method. + result = client.get_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb new file mode 100644 index 000000000000..6b5a3b4c0d68 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config. +# +def get_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new + + # Call the get_notification_config method. + result = client.get_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb new file mode 100644 index 000000000000..b4b9f24ba65c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_organization_settings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings. +# +def get_organization_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new + + # Call the get_organization_settings method. + result = client.get_organization_settings request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb new file mode 100644 index 000000000000..d40c67a9eba0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config. +# +def get_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new + + # Call the get_resource_value_config method. + result = client.get_resource_value_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..a4f9f8ef3f19 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module. +# +def get_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the get_security_health_analytics_custom_module method. + result = client.get_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb new file mode 100644 index 000000000000..c0a1d22fa00d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetSimulation_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_simulation call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation. +# +def get_simulation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new + + # Call the get_simulation method. + result = client.get_simulation request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetSimulation_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb new file mode 100644 index 000000000000..bd7c16821102 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetSource_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source. +# +def get_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new + + # Call the get_source method. + result = client.get_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb new file mode 100644 index 000000000000..8c1d07bdc6de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_valued_resource call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource. +# +def get_valued_resource + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new + + # Call the get_valued_resource method. + result = client.get_valued_resource request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb new file mode 100644 index 000000000000..ae956d56813e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the group_assets call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets. +# +def group_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new + + # Call the group_assets method. + result = client.group_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb new file mode 100644 index 000000000000..c4786c15f09b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the group_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings. +# +def group_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new + + # Call the group_findings method. + result = client.group_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb new file mode 100644 index 000000000000..ceeaebf8d86d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListAssets_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_assets call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets. +# +def list_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new + + # Call the list_assets method. + result = client.list_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb new file mode 100644 index 000000000000..5862a15cff4a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_attack_paths call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths. +# +def list_attack_paths + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new + + # Call the list_attack_paths method. + result = client.list_attack_paths request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb new file mode 100644 index 000000000000..3746c178ec2f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_big_query_exports call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports. +# +def list_big_query_exports + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new + + # Call the list_big_query_exports method. + result = client.list_big_query_exports request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..5dacc91c28be --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules. +# +def list_descendant_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + + # Call the list_descendant_event_threat_detection_custom_modules method. + result = client.list_descendant_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..5f821c75b303 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules. +# +def list_descendant_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_descendant_security_health_analytics_custom_modules method. + result = client.list_descendant_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..39414a8834dd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules. +# +def list_effective_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + + # Call the list_effective_event_threat_detection_custom_modules method. + result = client.list_effective_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..964e57448ce6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules. +# +def list_effective_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_effective_security_health_analytics_custom_modules method. + result = client.list_effective_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..41b6dd7a76c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules. +# +def list_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new + + # Call the list_event_threat_detection_custom_modules method. + result = client.list_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb new file mode 100644 index 000000000000..57fb4cae4392 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListFindings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings. +# +def list_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new + + # Call the list_findings method. + result = client.list_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb new file mode 100644 index 000000000000..eb1fdb03d97d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_mute_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs. +# +def list_mute_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new + + # Call the list_mute_configs method. + result = client.list_mute_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb new file mode 100644 index 000000000000..b7b5eee3314f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_notification_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs. +# +def list_notification_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new + + # Call the list_notification_configs method. + result = client.list_notification_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb new file mode 100644 index 000000000000..251454a75ea0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_resource_value_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs. +# +def list_resource_value_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new + + # Call the list_resource_value_configs method. + result = client.list_resource_value_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..1c67c25b10d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules. +# +def list_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_security_health_analytics_custom_modules method. + result = client.list_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb new file mode 100644 index 000000000000..c97a5da2a253 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListSources_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_sources call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources. +# +def list_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new + + # Call the list_sources method. + result = client.list_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb new file mode 100644 index 000000000000..2dfc8bf0281c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_valued_resources call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources. +# +def list_valued_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new + + # Call the list_valued_resources method. + result = client.list_valued_resources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb new file mode 100644 index 000000000000..b4992daa0dfc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the run_asset_discovery call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery. +# +def run_asset_discovery + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new + + # Call the run_asset_discovery method. + result = client.run_asset_discovery request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb new file mode 100644 index 000000000000..46ec0d32e12b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the set_finding_state call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state. +# +def set_finding_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new + + # Call the set_finding_state method. + result = client.set_finding_state request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb new file mode 100644 index 000000000000..61c6f0c2658c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the set_iam_policy call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb new file mode 100644 index 000000000000..0d8d48794099 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_SetMute_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the set_mute call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute. +# +def set_mute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new + + # Call the set_mute method. + result = client.set_mute request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..6573cca21b08 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module. +# +def simulate_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the simulate_security_health_analytics_custom_module method. + result = client.simulate_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb new file mode 100644 index 000000000000..2beb6f525829 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the test_iam_permissions call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb new file mode 100644 index 000000000000..64a07908fd64 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export. +# +def update_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new + + # Call the update_big_query_export method. + result = client.update_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..20ba7f0b690c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module. +# +def update_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new + + # Call the update_event_threat_detection_custom_module method. + result = client.update_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb new file mode 100644 index 000000000000..4ec047a6fb39 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_external_system call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system. +# +def update_external_system + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new + + # Call the update_external_system method. + result = client.update_external_system request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb new file mode 100644 index 000000000000..39355b256e0d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_finding call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding. +# +def update_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new + + # Call the update_finding method. + result = client.update_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb new file mode 100644 index 000000000000..aa233b884d74 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config. +# +def update_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new + + # Call the update_mute_config method. + result = client.update_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb new file mode 100644 index 000000000000..f976002b3515 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config. +# +def update_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new + + # Call the update_notification_config method. + result = client.update_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb new file mode 100644 index 000000000000..a4f402013e90 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_organization_settings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings. +# +def update_organization_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new + + # Call the update_organization_settings method. + result = client.update_organization_settings request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb new file mode 100644 index 000000000000..40a21d5efc16 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config. +# +def update_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new + + # Call the update_resource_value_config method. + result = client.update_resource_value_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..8e83edf227ea --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module. +# +def update_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the update_security_health_analytics_custom_module method. + result = client.update_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb new file mode 100644 index 000000000000..04da82c1a94b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_security_marks call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks. +# +def update_security_marks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new + + # Call the update_security_marks method. + result = client.update_security_marks request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb new file mode 100644 index 000000000000..6f0ba52cd6f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source. +# +def update_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new + + # Call the update_source method. + result = client.update_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..31919bb29465 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module. +# +def validate_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new + + # Call the validate_event_threat_detection_custom_module method. + result = client.validate_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json b/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json new file mode 100644 index 000000000000..97ec18a5449f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json @@ -0,0 +1,2535 @@ +{ + "client_library": { + "name": "google-cloud-security_center-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.securitycenter.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync", + "title": "Snippet for the bulk_mute_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings.", + "file": "security_center/bulk_mute_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_mute_findings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "BulkMuteFindings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.BulkMuteFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the create_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module.", + "file": "security_center/create_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateSource_sync", + "title": "Snippet for the create_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source.", + "file": "security_center/create_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_source", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateSource", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateFinding_sync", + "title": "Snippet for the create_finding call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding.", + "file": "security_center/create_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_finding", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateFinding", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync", + "title": "Snippet for the create_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config.", + "file": "security_center/create_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateMuteConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync", + "title": "Snippet for the create_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config.", + "file": "security_center/create_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateNotificationConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync", + "title": "Snippet for the delete_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config.", + "file": "security_center/delete_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteMuteConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync", + "title": "Snippet for the delete_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config.", + "file": "security_center/delete_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteNotificationConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module.", + "file": "security_center/delete_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSimulation_sync", + "title": "Snippet for the get_simulation call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation.", + "file": "security_center/get_simulation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_simulation", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetSimulationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Simulation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSimulation", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSimulation", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync", + "title": "Snippet for the get_valued_resource call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource.", + "file": "security_center/get_valued_resource.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_valued_resource", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ValuedResource", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetValuedResource", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetValuedResource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync", + "title": "Snippet for the get_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export.", + "file": "security_center/get_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetBigQueryExport", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy.", + "file": "security_center/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync", + "title": "Snippet for the get_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config.", + "file": "security_center/get_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetMuteConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync", + "title": "Snippet for the get_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config.", + "file": "security_center/get_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetNotificationConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync", + "title": "Snippet for the get_organization_settings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings.", + "file": "security_center/get_organization_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_organization_settings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::OrganizationSettings", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetOrganizationSettings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module.", + "file": "security_center/get_effective_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_effective_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetEffectiveSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the get_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module.", + "file": "security_center/get_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSource_sync", + "title": "Snippet for the get_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source.", + "file": "security_center/get_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_source", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSource", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GroupAssets_sync", + "title": "Snippet for the group_assets call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets.", + "file": "security_center/group_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "group_assets", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GroupAssets", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GroupAssets", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GroupFindings_sync", + "title": "Snippet for the group_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings.", + "file": "security_center/group_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "group_findings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GroupFindings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GroupFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListAssets_sync", + "title": "Snippet for the list_assets call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets.", + "file": "security_center/list_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assets", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListAssetsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListAssets", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListAssets", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules.", + "file": "security_center/list_descendant_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_descendant_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListDescendantSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListFindings_sync", + "title": "Snippet for the list_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings.", + "file": "security_center/list_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_findings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListFindings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync", + "title": "Snippet for the list_mute_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs.", + "file": "security_center/list_mute_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_mute_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListMuteConfigs", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListMuteConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync", + "title": "Snippet for the list_notification_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs.", + "file": "security_center/list_notification_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notification_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListNotificationConfigs", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListNotificationConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules.", + "file": "security_center/list_effective_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_effective_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListEffectiveSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules.", + "file": "security_center/list_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListSources_sync", + "title": "Snippet for the list_sources call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources.", + "file": "security_center/list_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sources", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListSourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListSources", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListSources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync", + "title": "Snippet for the run_asset_discovery call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery.", + "file": "security_center/run_asset_discovery.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_asset_discovery", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "RunAssetDiscovery", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscovery", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_SetFindingState_sync", + "title": "Snippet for the set_finding_state call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state.", + "file": "security_center/set_finding_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_finding_state", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "SetFindingState", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetFindingState", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_SetMute_sync", + "title": "Snippet for the set_mute call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute.", + "file": "security_center/set_mute.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_mute", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::SetMuteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "SetMute", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetMute", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy.", + "file": "security_center/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions.", + "file": "security_center/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissions", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module.", + "file": "security_center/simulate_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "simulate_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "SimulateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SimulateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync", + "title": "Snippet for the update_external_system call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system.", + "file": "security_center/update_external_system.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_external_system", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ExternalSystem", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateExternalSystem", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateExternalSystem", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync", + "title": "Snippet for the update_finding call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding.", + "file": "security_center/update_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_finding", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateFinding", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync", + "title": "Snippet for the update_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config.", + "file": "security_center/update_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateMuteConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync", + "title": "Snippet for the update_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config.", + "file": "security_center/update_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateNotificationConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync", + "title": "Snippet for the update_organization_settings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings.", + "file": "security_center/update_organization_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_organization_settings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::OrganizationSettings", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateOrganizationSettings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the update_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module.", + "file": "security_center/update_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSource_sync", + "title": "Snippet for the update_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source.", + "file": "security_center/update_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_source", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSource", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync", + "title": "Snippet for the update_security_marks call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks.", + "file": "security_center/update_security_marks.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_marks", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityMarks", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSecurityMarks", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarks", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync", + "title": "Snippet for the create_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export.", + "file": "security_center/create_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateBigQueryExport", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync", + "title": "Snippet for the delete_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export.", + "file": "security_center/delete_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteBigQueryExport", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync", + "title": "Snippet for the update_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export.", + "file": "security_center/update_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateBigQueryExport", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync", + "title": "Snippet for the list_big_query_exports call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports.", + "file": "security_center/list_big_query_exports.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_big_query_exports", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListBigQueryExports", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListBigQueryExports", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the create_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module.", + "file": "security_center/create_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync", + "title": "Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module.", + "file": "security_center/delete_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync", + "title": "Snippet for the get_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module.", + "file": "security_center/get_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules.", + "file": "security_center/list_descendant_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_descendant_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListDescendantEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules.", + "file": "security_center/list_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the update_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module.", + "file": "security_center/update_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module.", + "file": "security_center/validate_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "validate_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ValidateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ValidateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync", + "title": "Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module.", + "file": "security_center/get_effective_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_effective_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetEffectiveEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules.", + "file": "security_center/list_effective_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_effective_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListEffectiveEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync", + "title": "Snippet for the batch_create_resource_value_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs.", + "file": "security_center/batch_create_resource_value_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_resource_value_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "BatchCreateResourceValueConfigs", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.BatchCreateResourceValueConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync", + "title": "Snippet for the delete_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config.", + "file": "security_center/delete_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteResourceValueConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync", + "title": "Snippet for the get_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config.", + "file": "security_center/get_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ResourceValueConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetResourceValueConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync", + "title": "Snippet for the list_resource_value_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs.", + "file": "security_center/list_resource_value_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_value_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListResourceValueConfigs", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListResourceValueConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync", + "title": "Snippet for the update_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config.", + "file": "security_center/update_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ResourceValueConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateResourceValueConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync", + "title": "Snippet for the list_valued_resources call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources.", + "file": "security_center/list_valued_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_valued_resources", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListValuedResources", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListValuedResources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync", + "title": "Snippet for the list_attack_paths call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths.", + "file": "security_center/list_attack_paths.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_attack_paths", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListAttackPaths", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListAttackPaths", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb new file mode 100644 index 000000000000..650ae5647c63 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycenter/v1/securitycenter_service_pb" +require "google/cloud/securitycenter/v1/securitycenter_service_services_pb" +require "google/cloud/security_center/v1/security_center" + +class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb new file mode 100644 index 000000000000..25ac2a34d4cc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb @@ -0,0 +1,487 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security_center/v1/security_center" + +class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_big_query_export_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.big_query_export_path organization: "value0", export: "value1" + assert_equal "organizations/value0/bigQueryExports/value1", path + + path = client.big_query_export_path folder: "value0", export: "value1" + assert_equal "folders/value0/bigQueryExports/value1", path + + path = client.big_query_export_path project: "value0", export: "value1" + assert_equal "projects/value0/bigQueryExports/value1", path + end + end + + def test_dlp_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dlp_job_path project: "value0", dlp_job: "value1" + assert_equal "projects/value0/dlpJobs/value1", path + + path = client.dlp_job_path project: "value0", location: "value1", dlp_job: "value2" + assert_equal "projects/value0/locations/value1/dlpJobs/value2", path + end + end + + def test_effective_event_threat_detection_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.effective_event_threat_detection_custom_module_path organization: "value0", module: "value1" + assert_equal "organizations/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path + + path = client.effective_event_threat_detection_custom_module_path folder: "value0", module: "value1" + assert_equal "folders/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path + + path = client.effective_event_threat_detection_custom_module_path project: "value0", module: "value1" + assert_equal "projects/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path + end + end + + def test_effective_security_health_analytics_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.effective_security_health_analytics_custom_module_path organization: "value0", effective_custom_module: "value1" + assert_equal "organizations/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path + + path = client.effective_security_health_analytics_custom_module_path folder: "value0", effective_custom_module: "value1" + assert_equal "folders/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path + + path = client.effective_security_health_analytics_custom_module_path project: "value0", effective_custom_module: "value1" + assert_equal "projects/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path + end + end + + def test_event_threat_detection_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.event_threat_detection_custom_module_path organization: "value0", module: "value1" + assert_equal "organizations/value0/eventThreatDetectionSettings/customModules/value1", path + + path = client.event_threat_detection_custom_module_path folder: "value0", module: "value1" + assert_equal "folders/value0/eventThreatDetectionSettings/customModules/value1", path + + path = client.event_threat_detection_custom_module_path project: "value0", module: "value1" + assert_equal "projects/value0/eventThreatDetectionSettings/customModules/value1", path + end + end + + def test_event_threat_detection_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.event_threat_detection_settings_path organization: "value0" + assert_equal "organizations/value0/eventThreatDetectionSettings", path + + path = client.event_threat_detection_settings_path folder: "value0" + assert_equal "folders/value0/eventThreatDetectionSettings", path + + path = client.event_threat_detection_settings_path project: "value0" + assert_equal "projects/value0/eventThreatDetectionSettings", path + end + end + + def test_external_system_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.external_system_path organization: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "organizations/value0/sources/value1/findings/value2/externalSystems/value3", path + + path = client.external_system_path folder: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "folders/value0/sources/value1/findings/value2/externalSystems/value3", path + + path = client.external_system_path project: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "projects/value0/sources/value1/findings/value2/externalSystems/value3", path + end + end + + def test_finding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.finding_path organization: "value0", source: "value1", finding: "value2" + assert_equal "organizations/value0/sources/value1/findings/value2", path + + path = client.finding_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2", path + + path = client.finding_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2", path + end + end + + def test_folder_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_path folder: "value0" + assert_equal "folders/value0", path + end + end + + def test_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_mute_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.mute_config_path organization: "value0", mute_config: "value1" + assert_equal "organizations/value0/muteConfigs/value1", path + + path = client.mute_config_path folder: "value0", mute_config: "value1" + assert_equal "folders/value0/muteConfigs/value1", path + + path = client.mute_config_path project: "value0", mute_config: "value1" + assert_equal "projects/value0/muteConfigs/value1", path + + path = client.mute_config_path organization: "value0", location: "value1", mute_config: "value2" + assert_equal "organizations/value0/locations/value1/muteConfigs/value2", path + + path = client.mute_config_path folder: "value0", location: "value1", mute_config: "value2" + assert_equal "folders/value0/locations/value1/muteConfigs/value2", path + + path = client.mute_config_path project: "value0", location: "value1", mute_config: "value2" + assert_equal "projects/value0/locations/value1/muteConfigs/value2", path + end + end + + def test_notification_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_config_path organization: "value0", notification_config: "value1" + assert_equal "organizations/value0/notificationConfigs/value1", path + + path = client.notification_config_path folder: "value0", notification_config: "value1" + assert_equal "folders/value0/notificationConfigs/value1", path + + path = client.notification_config_path project: "value0", notification_config: "value1" + assert_equal "projects/value0/notificationConfigs/value1", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_organization_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_settings_path organization: "value0" + assert_equal "organizations/value0/organizationSettings", path + end + end + + def test_organization_simulation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_simulation_path organization: "value0", simulation: "value1" + assert_equal "organizations/value0/simulations/value1", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path organization: "value0", constraint_name: "value1" + assert_equal "organizations/value0/policies/value1", path + + path = client.policy_path folder: "value0", constraint_name: "value1" + assert_equal "folders/value0/policies/value1", path + + path = client.policy_path project: "value0", constraint_name: "value1" + assert_equal "projects/value0/policies/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_resource_value_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.resource_value_config_path organization: "value0", resource_value_config: "value1" + assert_equal "organizations/value0/resourceValueConfigs/value1", path + end + end + + def test_security_health_analytics_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_health_analytics_custom_module_path organization: "value0", custom_module: "value1" + assert_equal "organizations/value0/securityHealthAnalyticsSettings/customModules/value1", path + + path = client.security_health_analytics_custom_module_path folder: "value0", custom_module: "value1" + assert_equal "folders/value0/securityHealthAnalyticsSettings/customModules/value1", path + + path = client.security_health_analytics_custom_module_path project: "value0", custom_module: "value1" + assert_equal "projects/value0/securityHealthAnalyticsSettings/customModules/value1", path + end + end + + def test_security_health_analytics_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_health_analytics_settings_path organization: "value0" + assert_equal "organizations/value0/securityHealthAnalyticsSettings", path + + path = client.security_health_analytics_settings_path folder: "value0" + assert_equal "folders/value0/securityHealthAnalyticsSettings", path + + path = client.security_health_analytics_settings_path project: "value0" + assert_equal "projects/value0/securityHealthAnalyticsSettings", path + end + end + + def test_security_marks_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_marks_path organization: "value0", asset: "value1" + assert_equal "organizations/value0/assets/value1/securityMarks", path + + path = client.security_marks_path organization: "value0", source: "value1", finding: "value2" + assert_equal "organizations/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path folder: "value0", asset: "value1" + assert_equal "folders/value0/assets/value1/securityMarks", path + + path = client.security_marks_path project: "value0", asset: "value1" + assert_equal "projects/value0/assets/value1/securityMarks", path + + path = client.security_marks_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path + end + end + + def test_simulation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.simulation_path organization: "value0", simulation: "value1" + assert_equal "organizations/value0/simulations/value1", path + end + end + + def test_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.source_path organization: "value0", source: "value1" + assert_equal "organizations/value0/sources/value1", path + + path = client.source_path folder: "value0", source: "value1" + assert_equal "folders/value0/sources/value1", path + + path = client.source_path project: "value0", source: "value1" + assert_equal "projects/value0/sources/value1", path + end + end + + def test_table_data_profile_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_data_profile_path project: "value0", table_profile: "value1" + assert_equal "projects/value0/tableProfiles/value1", path + + path = client.table_data_profile_path project: "value0", location: "value1", table_profile: "value2" + assert_equal "projects/value0/locations/value1/tableProfiles/value2", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end + + def test_valued_resource_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.valued_resource_path organization: "value0", simulation: "value1", valued_resource: "value2" + assert_equal "organizations/value0/simulations/value1/valuedResources/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb new file mode 100644 index 000000000000..d85963f8c45d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb @@ -0,0 +1,3594 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/securitycenter/v1/securitycenter_service_pb" +require "google/cloud/security_center/v1/security_center/rest" + + +class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_bulk_mute_findings + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + mute_annotation = "hello world" + mute_state = :MUTE_STATE_UNSPECIFIED + + bulk_mute_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_bulk_mute_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_mute_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.bulk_mute_findings parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_mute_findings_client_stub.call_count + end + end + end + + def test_create_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + security_health_analytics_custom_module = {} + + create_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_create_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + create_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_source({ parent: parent, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_source parent: parent, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_source ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_source({ parent: parent, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_source(::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_source_client_stub.call_count + end + end + end + + def test_create_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + finding_id = "hello world" + finding = {} + + create_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_finding parent: parent, finding_id: finding_id, finding: finding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_finding ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_finding(::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_finding_client_stub.call_count + end + end + end + + def test_create_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + mute_config = {} + mute_config_id = "hello world" + + create_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_mute_config ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_mute_config(::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_mute_config_client_stub.call_count + end + end + end + + def test_create_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config_id = "hello world" + notification_config = {} + + create_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_notification_config ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_notification_config(::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_notification_config_client_stub.call_count + end + end + end + + def test_delete_mute_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_mute_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_mute_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_mute_config ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_mute_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_mute_config(::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_mute_config_client_stub.call_count + end + end + end + + def test_delete_notification_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_notification_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_notification_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_notification_config ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_notification_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_notification_config(::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_notification_config_client_stub.call_count + end + end + end + + def test_delete_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_security_health_analytics_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_security_health_analytics_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_get_simulation + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Simulation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_simulation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_simulation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_simulation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_simulation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_simulation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_simulation ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_simulation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_simulation(::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_simulation_client_stub.call_count + end + end + end + + def test_get_valued_resource + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ValuedResource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_valued_resource_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_valued_resource_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_valued_resource_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_valued_resource({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_valued_resource name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_valued_resource ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_valued_resource({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_valued_resource(::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_valued_resource_client_stub.call_count + end + end + end + + def test_get_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_big_query_export({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_big_query_export name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_big_query_export ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_big_query_export({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_big_query_export(::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_big_query_export_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_get_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_mute_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_mute_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_mute_config ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_mute_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_mute_config(::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_mute_config_client_stub.call_count + end + end + end + + def test_get_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_notification_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_notification_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_notification_config ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_notification_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_notification_config(::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_config_client_stub.call_count + end + end + end + + def test_get_organization_settings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_organization_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_organization_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_organization_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_organization_settings ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_organization_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_organization_settings(::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_organization_settings_client_stub.call_count + end + end + end + + def test_get_effective_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_effective_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_effective_security_health_analytics_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_effective_security_health_analytics_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_effective_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_get_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_security_health_analytics_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_security_health_analytics_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_get_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_source ::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_source(::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_source_client_stub.call_count + end + end + end + + def test_group_assets + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + compare_duration = {} + read_time = {} + page_token = "hello world" + page_size = 42 + + group_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, group_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.group_assets ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.group_assets(::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, group_assets_client_stub.call_count + end + end + end + + def test_group_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + read_time = {} + compare_duration = {} + page_token = "hello world" + page_size = 42 + + group_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, group_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.group_findings ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.group_findings(::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, group_findings_client_stub.call_count + end + end + end + + def test_list_assets + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_assets ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_assets(::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_count + end + end + end + + def test_list_descendant_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_descendant_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_list_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_findings ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_findings(::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_count + end + end + end + + def test_list_mute_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_mute_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_mute_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_mute_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_mute_configs ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_mute_configs(::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_mute_configs_client_stub.call_count + end + end + end + + def test_list_notification_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_notification_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_notification_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_notification_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_notification_configs ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_notification_configs(::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_notification_configs_client_stub.call_count + end + end + end + + def test_list_effective_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_effective_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_list_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_list_sources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_sources ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_sources(::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sources_client_stub.call_count + end + end + end + + def test_run_asset_discovery + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + run_asset_discovery_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_run_asset_discovery_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_asset_discovery_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.run_asset_discovery({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.run_asset_discovery parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.run_asset_discovery({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_asset_discovery_client_stub.call_count + end + end + end + + def test_set_finding_state + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + state = :STATE_UNSPECIFIED + start_time = {} + + set_finding_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_finding_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_finding_state({ name: name, state: state, start_time: start_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_finding_state name: name, state: state, start_time: start_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state, start_time: start_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_finding_state(::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_finding_state_client_stub.call_count + end + end + end + + def test_set_mute + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mute = :MUTE_UNSPECIFIED + + set_mute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_mute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_mute_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_mute({ name: name, mute: mute }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_mute name: name, mute: mute do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_mute ::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_mute({ name: name, mute: mute }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_mute(::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_mute_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_simulate_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_config = {} + resource = {} + + simulate_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_simulate_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_update_external_system + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + external_system = {} + update_mask = {} + + update_external_system_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_external_system_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_external_system_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_external_system external_system: external_system, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_external_system ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_external_system({ external_system: external_system, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_external_system(::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_external_system_client_stub.call_count + end + end + end + + def test_update_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + finding = {} + update_mask = {} + + update_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_finding({ finding: finding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_finding finding: finding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_finding ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_finding({ finding: finding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_finding(::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_finding_client_stub.call_count + end + end + end + + def test_update_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + mute_config = {} + update_mask = {} + + update_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_mute_config mute_config: mute_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_mute_config ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_mute_config(::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_mute_config_client_stub.call_count + end + end + end + + def test_update_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + notification_config = {} + update_mask = {} + + update_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_notification_config notification_config: notification_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_notification_config ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_notification_config(::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_notification_config_client_stub.call_count + end + end + end + + def test_update_organization_settings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + organization_settings = {} + update_mask = {} + + update_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_organization_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_organization_settings ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_organization_settings(::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_organization_settings_client_stub.call_count + end + end + end + + def test_update_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_health_analytics_custom_module = {} + update_mask = {} + + update_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_security_health_analytics_custom_module security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_update_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + source = {} + update_mask = {} + + update_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_source({ source: source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_source source: source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_source ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_source({ source: source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_source(::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_source_client_stub.call_count + end + end + end + + def test_update_security_marks + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + start_time = {} + + update_security_marks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_marks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_security_marks(::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_marks_client_stub.call_count + end + end + end + + def test_create_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + big_query_export = {} + big_query_export_id = "hello world" + + create_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_big_query_export ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_big_query_export(::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_big_query_export_client_stub.call_count + end + end + end + + def test_delete_big_query_export + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_big_query_export({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_big_query_export name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_big_query_export ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_big_query_export({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_big_query_export(::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_big_query_export_client_stub.call_count + end + end + end + + def test_update_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + big_query_export = {} + update_mask = {} + + update_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_big_query_export ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_big_query_export(::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_big_query_export_client_stub.call_count + end + end + end + + def test_list_big_query_exports + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_big_query_exports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_big_query_exports_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_big_query_exports_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_big_query_exports ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_big_query_exports(::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_big_query_exports_client_stub.call_count + end + end + end + + def test_create_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + event_threat_detection_custom_module = {} + + create_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_delete_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_event_threat_detection_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_event_threat_detection_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_get_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_event_threat_detection_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_event_threat_detection_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_list_descendant_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_descendant_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_descendant_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_list_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_update_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + event_threat_detection_custom_module = {} + update_mask = {} + + update_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_event_threat_detection_custom_module event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_validate_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + raw_text = "hello world" + type = "hello world" + + validate_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_validate_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, validate_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_get_effective_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_effective_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_effective_event_threat_detection_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_effective_event_threat_detection_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_effective_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_list_effective_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_effective_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_effective_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_batch_create_resource_value_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_batch_create_resource_value_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_create_resource_value_configs parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_create_resource_value_configs({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_resource_value_configs_client_stub.call_count + end + end + end + + def test_delete_resource_value_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_resource_value_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_resource_value_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_resource_value_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_resource_value_config_client_stub.call_count + end + end + end + + def test_get_resource_value_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_resource_value_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_resource_value_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_resource_value_config ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_resource_value_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_resource_value_config(::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_resource_value_config_client_stub.call_count + end + end + end + + def test_list_resource_value_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_resource_value_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_value_configs_client_stub.call_count + end + end + end + + def test_update_resource_value_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource_value_config = {} + update_mask = {} + + update_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_resource_value_config ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_resource_value_config(::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_resource_value_config_client_stub.call_count + end + end + end + + def test_list_valued_resources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + + list_valued_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_valued_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_valued_resources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_valued_resources ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_valued_resources(::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_valued_resources_client_stub.call_count + end + end + end + + def test_list_attack_paths + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_attack_paths_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_attack_paths_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_attack_paths_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_attack_paths ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_attack_paths(::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_attack_paths_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb new file mode 100644 index 000000000000..f949190ff600 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb @@ -0,0 +1,4053 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycenter/v1/securitycenter_service_pb" +require "google/cloud/security_center/v1/security_center" + +class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_bulk_mute_findings + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + mute_annotation = "hello world" + mute_state = :MUTE_STATE_UNSPECIFIED + + bulk_mute_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_mute_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["mute_annotation"] + assert_equal :MUTE_STATE_UNSPECIFIED, request["mute_state"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_mute_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.bulk_mute_findings parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_mute_findings_client_stub.call_rpc_count + end + end + + def test_create_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + security_health_analytics_custom_module = {} + + create_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_create_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + create_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Source), request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_source({ parent: parent, source: source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_source parent: parent, source: source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_source ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_source({ parent: parent, source: source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_source(::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_source_client_stub.call_rpc_count + end + end + + def test_create_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + finding_id = "hello world" + finding = {} + + create_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_finding, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["finding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Finding), request["finding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_finding parent: parent, finding_id: finding_id, finding: finding do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_finding ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_finding(::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_finding_client_stub.call_rpc_count + end + end + + def test_create_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + mute_config = {} + mute_config_id = "hello world" + + create_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::MuteConfig), request["mute_config"] + assert_equal "hello world", request["mute_config_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_mute_config ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_mute_config(::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_mute_config_client_stub.call_rpc_count + end + end + + def test_create_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config_id = "hello world" + notification_config = {} + + create_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::NotificationConfig), request["notification_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_notification_config ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_notification_config(::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_notification_config_client_stub.call_rpc_count + end + end + + def test_delete_mute_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_mute_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_mute_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_mute_config ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_mute_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_mute_config(::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_mute_config_client_stub.call_rpc_count + end + end + + def test_delete_notification_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_notification_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_notification_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_notification_config ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_notification_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_notification_config(::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_notification_config_client_stub.call_rpc_count + end + end + + def test_delete_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_security_health_analytics_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_security_health_analytics_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_get_simulation + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Simulation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_simulation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_simulation, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_simulation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_simulation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_simulation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_simulation ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_simulation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_simulation(::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_simulation_client_stub.call_rpc_count + end + end + + def test_get_valued_resource + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ValuedResource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_valued_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_valued_resource, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_valued_resource_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_valued_resource({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_valued_resource name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_valued_resource ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_valued_resource({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_valued_resource(::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_valued_resource_client_stub.call_rpc_count + end + end + + def test_get_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_big_query_export({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_big_query_export name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_big_query_export ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_big_query_export({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_big_query_export(::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_big_query_export_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_mute_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_mute_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_mute_config ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_mute_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_mute_config(::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_mute_config_client_stub.call_rpc_count + end + end + + def test_get_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_notification_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_notification_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_notification_config ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_notification_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_notification_config(::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_notification_config_client_stub.call_rpc_count + end + end + + def test_get_organization_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_organization_settings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_organization_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_organization_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_organization_settings ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_organization_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_organization_settings(::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_organization_settings_client_stub.call_rpc_count + end + end + + def test_get_effective_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_effective_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_effective_security_health_analytics_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_effective_security_health_analytics_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_effective_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_get_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_security_health_analytics_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_security_health_analytics_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_get_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_source ::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_source(::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_source_client_stub.call_rpc_count + end + end + + def test_group_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + compare_duration = {} + read_time = {} + page_token = "hello world" + page_size = 42 + + group_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :group_assets, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["group_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, group_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.group_assets ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.group_assets(::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, group_assets_client_stub.call_rpc_count + end + end + + def test_group_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + read_time = {} + compare_duration = {} + page_token = "hello world" + page_size = 42 + + group_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :group_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["group_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, group_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.group_findings ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.group_findings(::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, group_findings_client_stub.call_rpc_count + end + end + + def test_list_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assets, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_assets ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_assets(::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_rpc_count + end + end + + def test_list_descendant_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_descendant_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_findings ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_findings(::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_rpc_count + end + end + + def test_list_mute_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_mute_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_mute_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_mute_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_mute_configs ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_mute_configs(::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_mute_configs_client_stub.call_rpc_count + end + end + + def test_list_notification_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_notification_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notification_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_notification_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_notification_configs ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_notification_configs(::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_notification_configs_client_stub.call_rpc_count + end + end + + def test_list_effective_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_effective_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sources, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_sources ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_sources(::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sources_client_stub.call_rpc_count + end + end + + def test_run_asset_discovery + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + run_asset_discovery_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_asset_discovery, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_asset_discovery_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.run_asset_discovery({ parent: parent }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.run_asset_discovery parent: parent do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.run_asset_discovery({ parent: parent }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_asset_discovery_client_stub.call_rpc_count + end + end + + def test_set_finding_state + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + state = :STATE_UNSPECIFIED + start_time = {} + + set_finding_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_finding_state, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, request + assert_equal "hello world", request["name"] + assert_equal :STATE_UNSPECIFIED, request["state"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_finding_state({ name: name, state: state, start_time: start_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_finding_state name: name, state: state, start_time: start_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state, start_time: start_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_finding_state(::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_finding_state_client_stub.call_rpc_count + end + end + + def test_set_mute + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mute = :MUTE_UNSPECIFIED + + set_mute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_mute, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SetMuteRequest, request + assert_equal "hello world", request["name"] + assert_equal :MUTE_UNSPECIFIED, request["mute"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_mute_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_mute({ name: name, mute: mute }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_mute name: name, mute: mute do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_mute ::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_mute({ name: name, mute: mute }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_mute(::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_mute_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_simulate_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_config = {} + resource = {} + + simulate_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :simulate_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::CustomConfig), request["custom_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource), request["resource"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_update_external_system + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + external_system = {} + update_mask = {} + + update_external_system_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_external_system, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::ExternalSystem), request["external_system"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_external_system_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_external_system external_system: external_system, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_external_system ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_external_system({ external_system: external_system, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_external_system(::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_external_system_client_stub.call_rpc_count + end + end + + def test_update_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + finding = {} + update_mask = {} + + update_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_finding, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Finding), request["finding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_finding({ finding: finding, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_finding finding: finding, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_finding ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_finding({ finding: finding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_finding(::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_finding_client_stub.call_rpc_count + end + end + + def test_update_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + mute_config = {} + update_mask = {} + + update_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::MuteConfig), request["mute_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_mute_config mute_config: mute_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_mute_config ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_mute_config(::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_mute_config_client_stub.call_rpc_count + end + end + + def test_update_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + notification_config = {} + update_mask = {} + + update_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::NotificationConfig), request["notification_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_notification_config notification_config: notification_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_notification_config ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_notification_config(::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_notification_config_client_stub.call_rpc_count + end + end + + def test_update_organization_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + organization_settings = {} + update_mask = {} + + update_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_organization_settings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::OrganizationSettings), request["organization_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_organization_settings ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_organization_settings(::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_organization_settings_client_stub.call_rpc_count + end + end + + def test_update_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + security_health_analytics_custom_module = {} + update_mask = {} + + update_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_security_health_analytics_custom_module security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_update_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + source = {} + update_mask = {} + + update_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Source), request["source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_source({ source: source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_source source: source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_source ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_source({ source: source, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_source(::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_source_client_stub.call_rpc_count + end + end + + def test_update_security_marks + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + start_time = {} + + update_security_marks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_marks, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityMarks), request["security_marks"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_security_marks(::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_marks_client_stub.call_rpc_count + end + end + + def test_create_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + big_query_export = {} + big_query_export_id = "hello world" + + create_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::BigQueryExport), request["big_query_export"] + assert_equal "hello world", request["big_query_export_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_big_query_export ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_big_query_export(::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_big_query_export_client_stub.call_rpc_count + end + end + + def test_delete_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_big_query_export({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_big_query_export name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_big_query_export ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_big_query_export({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_big_query_export(::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_big_query_export_client_stub.call_rpc_count + end + end + + def test_update_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + big_query_export = {} + update_mask = {} + + update_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::BigQueryExport), request["big_query_export"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_big_query_export ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_big_query_export(::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_big_query_export_client_stub.call_rpc_count + end + end + + def test_list_big_query_exports + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_big_query_exports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_big_query_exports, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_big_query_exports_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_big_query_exports ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_big_query_exports(::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_big_query_exports_client_stub.call_rpc_count + end + end + + def test_create_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + event_threat_detection_custom_module = {} + + create_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_delete_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_event_threat_detection_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_event_threat_detection_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_get_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_event_threat_detection_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_event_threat_detection_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_list_descendant_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_descendant_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_descendant_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_update_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + event_threat_detection_custom_module = {} + update_mask = {} + + update_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_event_threat_detection_custom_module event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_validate_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + raw_text = "hello world" + type = "hello world" + + validate_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :validate_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["raw_text"] + assert_equal "hello world", request["type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, validate_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_get_effective_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_effective_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_effective_event_threat_detection_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_effective_event_threat_detection_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_effective_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_list_effective_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_effective_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_effective_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_batch_create_resource_value_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_resource_value_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_create_resource_value_configs parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_create_resource_value_configs({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_resource_value_configs_client_stub.call_rpc_count + end + end + + def test_delete_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_resource_value_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_resource_value_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_resource_value_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_resource_value_config_client_stub.call_rpc_count + end + end + + def test_get_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_resource_value_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_resource_value_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_resource_value_config ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_resource_value_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_resource_value_config(::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_resource_value_config_client_stub.call_rpc_count + end + end + + def test_list_resource_value_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_value_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_resource_value_configs_client_stub.call_rpc_count + end + end + + def test_update_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource_value_config = {} + update_mask = {} + + update_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig), request["resource_value_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_resource_value_config ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_resource_value_config(::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_resource_value_config_client_stub.call_rpc_count + end + end + + def test_list_valued_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + + list_valued_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_valued_resources, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_valued_resources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_valued_resources ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_valued_resources(::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_valued_resources_client_stub.call_rpc_count + end + end + + def test_list_attack_paths + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_attack_paths_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_attack_paths, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_attack_paths_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_attack_paths ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_attack_paths(::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_attack_paths_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 3c6025e5315ac63f75fb57fae371fb0e50e22746 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 14 Jul 2026 00:02:46 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 6 + .../securitycenter/v1/agent_anomaly_pb.rb | 0 .../cloud/securitycenter/v1/agent_pb.rb | 0 .../securitycenter/v1/agent_session_pb.rb | 0 .../cloud/securitycenter/v1/finding_pb.rb | 5 +- .../google/cloud/securitycenter/v1/agent.rb | 0 .../cloud/securitycenter/v1/agent_anomaly.rb | 0 .../cloud/securitycenter/v1/agent_session.rb | 0 .../google/cloud/securitycenter/v1/finding.rb | 9 + .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-security_center-v1/.toys.rb | 28 - .../google-cloud-security_center-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-security_center-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../google-cloud-security_center-v1/README.md | 153 - .../google-cloud-security_center-v1/Rakefile | 169 - .../gapic_metadata.json | 333 - .../google-cloud-security_center-v1.gemspec | 29 - .../lib/google-cloud-security_center-v1.rb | 21 - .../lib/google/cloud/security_center/v1.rb | 45 - .../google/cloud/security_center/v1/rest.rb | 37 - .../security_center/v1/security_center.rb | 56 - .../v1/security_center/client.rb | 7460 ----------------- .../v1/security_center/credentials.rb | 51 - .../v1/security_center/operations.rb | 843 -- .../v1/security_center/paths.rb | 1127 --- .../v1/security_center/rest.rb | 53 - .../v1/security_center/rest/client.rb | 6970 --------------- .../v1/security_center/rest/operations.rb | 926 -- .../v1/security_center/rest/service_stub.rb | 4766 ----------- .../cloud/security_center/v1/version.rb | 28 - .../cloud/securitycenter/v1/access_pb.rb | 23 - .../cloud/securitycenter/v1/application_pb.rb | 21 - .../cloud/securitycenter/v1/asset_pb.rb | 29 - .../securitycenter/v1/attack_exposure_pb.rb | 24 - .../cloud/securitycenter/v1/attack_path_pb.rb | 28 - .../v1/backup_disaster_recovery_pb.rb | 23 - .../securitycenter/v1/bigquery_export_pb.rb | 25 - .../cloud/securitycenter/v1/chokepoint_pb.rb | 21 - .../cloud/securitycenter/v1/cloud_armor_pb.rb | 27 - .../v1/cloud_dlp_data_profile_pb.rb | 27 - .../v1/cloud_dlp_inspection_pb.rb | 23 - .../cloud/securitycenter/v1/compliance_pb.rb | 21 - .../cloud/securitycenter/v1/connection_pb.rb | 22 - .../securitycenter/v1/contact_details_pb.rb | 22 - .../cloud/securitycenter/v1/container_pb.rb | 24 - .../cloud/securitycenter/v1/database_pb.rb | 21 - ...event_threat_detection_custom_module_pb.rb | 26 - ...urity_health_analytics_custom_module_pb.rb | 26 - ...event_threat_detection_custom_module_pb.rb | 27 - ...tion_custom_module_validation_errors_pb.rb | 23 - .../securitycenter/v1/exfiltration_pb.rb | 22 - .../securitycenter/v1/external_exposure_pb.rb | 23 - .../securitycenter/v1/external_system_pb.rb | 25 - .../google/cloud/securitycenter/v1/file_pb.rb | 22 - .../cloud/securitycenter/v1/finding_pb.rb | 68 - .../cloud/securitycenter/v1/folder_pb.rb | 21 - .../securitycenter/v1/group_membership_pb.rb | 22 - .../cloud/securitycenter/v1/iam_binding_pb.rb | 22 - .../cloud/securitycenter/v1/indicator_pb.rb | 26 - .../securitycenter/v1/kernel_rootkit_pb.rb | 21 - .../cloud/securitycenter/v1/kubernetes_pb.rb | 34 - .../cloud/securitycenter/v1/label_pb.rb | 21 - .../securitycenter/v1/load_balancer_pb.rb | 21 - .../cloud/securitycenter/v1/log_entry_pb.rb | 24 - .../securitycenter/v1/mitre_attack_pb.rb | 23 - .../cloud/securitycenter/v1/mute_config_pb.rb | 26 - .../cloud/securitycenter/v1/notebook_pb.rb | 23 - .../v1/notification_config_pb.rb | 25 - .../v1/notification_message_pb.rb | 24 - .../cloud/securitycenter/v1/org_policy_pb.rb | 23 - .../v1/organization_settings_pb.rb | 25 - .../cloud/securitycenter/v1/process_pb.rb | 24 - .../cloud/securitycenter/v1/resource_pb.rb | 36 - .../v1/resource_value_config_pb.rb | 28 - .../v1/run_asset_discovery_response_pb.rb | 24 - ...urity_health_analytics_custom_config_pb.rb | 27 - ...urity_health_analytics_custom_module_pb.rb | 27 - .../securitycenter/v1/security_marks_pb.rb | 23 - .../securitycenter/v1/security_posture_pb.rb | 22 - .../v1/securitycenter_service_pb.rb | 147 - .../v1/securitycenter_service_services_pb.rb | 226 - .../cloud/securitycenter/v1/simulation_pb.rb | 27 - .../cloud/securitycenter/v1/source_pb.rb | 23 - .../securitycenter/v1/toxic_combination_pb.rb | 21 - .../securitycenter/v1/valued_resource_pb.rb | 25 - .../securitycenter/v1/vulnerability_pb.rb | 36 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/securitycenter/v1/access.rb | 120 - .../cloud/securitycenter/v1/application.rb | 40 - .../google/cloud/securitycenter/v1/asset.rb | 141 - .../securitycenter/v1/attack_exposure.rb | 73 - .../cloud/securitycenter/v1/attack_path.rb | 147 - .../v1/backup_disaster_recovery.rb | 90 - .../securitycenter/v1/bigquery_export.rb | 92 - .../cloud/securitycenter/v1/chokepoint.rb | 39 - .../cloud/securitycenter/v1/cloud_armor.rb | 128 - .../v1/cloud_dlp_data_profile.rb | 114 - .../securitycenter/v1/cloud_dlp_inspection.rb | 50 - .../cloud/securitycenter/v1/compliance.rb | 43 - .../cloud/securitycenter/v1/connection.rb | 70 - .../securitycenter/v1/contact_details.rb | 44 - .../cloud/securitycenter/v1/container.rb | 49 - .../cloud/securitycenter/v1/database.rb | 67 - ...ve_event_threat_detection_custom_module.rb | 77 - ...security_health_analytics_custom_module.rb | 73 - .../event_threat_detection_custom_module.rb | 88 - ...tection_custom_module_validation_errors.rb | 69 - .../cloud/securitycenter/v1/exfiltration.rb | 64 - .../securitycenter/v1/external_exposure.rb | 77 - .../securitycenter/v1/external_system.rb | 98 - .../google/cloud/securitycenter/v1/file.rb | 72 - .../google/cloud/securitycenter/v1/finding.rb | 486 -- .../google/cloud/securitycenter/v1/folder.rb | 40 - .../securitycenter/v1/group_membership.rb | 51 - .../cloud/securitycenter/v1/iam_binding.rb | 56 - .../cloud/securitycenter/v1/indicator.rb | 116 - .../cloud/securitycenter/v1/kernel_rootkit.rb | 66 - .../cloud/securitycenter/v1/kubernetes.rb | 241 - .../google/cloud/securitycenter/v1/label.rb | 41 - .../cloud/securitycenter/v1/load_balancer.rb | 36 - .../cloud/securitycenter/v1/log_entry.rb | 58 - .../cloud/securitycenter/v1/mitre_attack.rb | 303 - .../cloud/securitycenter/v1/mute_config.rb | 116 - .../cloud/securitycenter/v1/notebook.rb | 46 - .../securitycenter/v1/notification_config.rb | 87 - .../securitycenter/v1/notification_message.rb | 42 - .../cloud/securitycenter/v1/org_policy.rb | 37 - .../v1/organization_settings.rb | 86 - .../google/cloud/securitycenter/v1/process.rb | 79 - .../cloud/securitycenter/v1/resource.rb | 286 - .../v1/resource_value_config.rb | 125 - .../v1/run_asset_discovery_response.rb | 54 - ...security_health_analytics_custom_config.rb | 112 - ...security_health_analytics_custom_module.rb | 90 - .../cloud/securitycenter/v1/security_marks.rb | 71 - .../securitycenter/v1/security_posture.rb | 83 - .../v1/securitycenter_service.rb | 2146 ----- .../cloud/securitycenter/v1/simulation.rb | 46 - .../google/cloud/securitycenter/v1/source.rb | 65 - .../securitycenter/v1/toxic_combination.rb | 45 - .../securitycenter/v1/valued_resource.rb | 86 - .../cloud/securitycenter/v1/vulnerability.rb | 336 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../batch_create_resource_value_configs.rb | 47 - .../security_center/bulk_mute_findings.rb | 54 - .../create_big_query_export.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - .../security_center/create_finding.rb | 47 - .../security_center/create_mute_config.rb | 47 - .../create_notification_config.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../snippets/security_center/create_source.rb | 47 - .../delete_big_query_export.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - .../security_center/delete_mute_config.rb | 47 - .../delete_notification_config.rb | 47 - .../delete_resource_value_config.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../security_center/get_big_query_export.rb | 47 - ...ve_event_threat_detection_custom_module.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - ...et_event_threat_detection_custom_module.rb | 47 - .../security_center/get_iam_policy.rb | 47 - .../security_center/get_mute_config.rb | 47 - .../get_notification_config.rb | 47 - .../get_organization_settings.rb | 47 - .../get_resource_value_config.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../security_center/get_simulation.rb | 47 - .../snippets/security_center/get_source.rb | 47 - .../security_center/get_valued_resource.rb | 47 - .../snippets/security_center/group_assets.rb | 51 - .../security_center/group_findings.rb | 51 - .../snippets/security_center/list_assets.rb | 51 - .../security_center/list_attack_paths.rb | 51 - .../security_center/list_big_query_exports.rb | 51 - ...t_event_threat_detection_custom_modules.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - ...e_event_threat_detection_custom_modules.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - ...t_event_threat_detection_custom_modules.rb | 51 - .../snippets/security_center/list_findings.rb | 51 - .../security_center/list_mute_configs.rb | 51 - .../list_notification_configs.rb | 51 - .../list_resource_value_configs.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - .../snippets/security_center/list_sources.rb | 51 - .../security_center/list_valued_resources.rb | 51 - .../security_center/run_asset_discovery.rb | 54 - .../security_center/set_finding_state.rb | 47 - .../security_center/set_iam_policy.rb | 47 - .../snippets/security_center/set_mute.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../security_center/test_iam_permissions.rb | 47 - .../update_big_query_export.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - .../security_center/update_external_system.rb | 47 - .../security_center/update_finding.rb | 47 - .../security_center/update_mute_config.rb | 47 - .../update_notification_config.rb | 47 - .../update_organization_settings.rb | 47 - .../update_resource_value_config.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../security_center/update_security_marks.rb | 47 - .../snippets/security_center/update_source.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - ...tadata_google.cloud.securitycenter.v1.json | 2535 ------ .../v1/security_center_operations_test.rb | 400 - .../v1/security_center_paths_test.rb | 487 -- .../v1/security_center_rest_test.rb | 3594 -------- .../v1/security_center_test.rb | 4053 --------- .../test/helper.rb | 26 - 234 files changed, 19 insertions(+), 49573 deletions(-) rename {owl-bot-staging/google-cloud-security_center-v1 => google-cloud-security_center-v1}/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v1 => google-cloud-security_center-v1}/lib/google/cloud/securitycenter/v1/agent_pb.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v1 => google-cloud-security_center-v1}/lib/google/cloud/securitycenter/v1/agent_session_pb.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v1 => google-cloud-security_center-v1}/proto_docs/google/cloud/securitycenter/v1/agent.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v1 => google-cloud-security_center-v1}/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v1 => google-cloud-security_center-v1}/proto_docs/google/cloud/securitycenter/v1/agent_session.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_message_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/org_policy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/process_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/resource_value_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/run_asset_discovery_response_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_module_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_marks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_posture_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/helper.rb diff --git a/google-cloud-security_center-v1/.owlbot-manifest.json b/google-cloud-security_center-v1/.owlbot-manifest.json index 98c6bc860e6e..0bbeb6d8da13 100644 --- a/google-cloud-security_center-v1/.owlbot-manifest.json +++ b/google-cloud-security_center-v1/.owlbot-manifest.json @@ -27,6 +27,9 @@ "lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb", "lib/google/cloud/security_center/v1/version.rb", "lib/google/cloud/securitycenter/v1/access_pb.rb", + "lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb", + "lib/google/cloud/securitycenter/v1/agent_pb.rb", + "lib/google/cloud/securitycenter/v1/agent_session_pb.rb", "lib/google/cloud/securitycenter/v1/application_pb.rb", "lib/google/cloud/securitycenter/v1/asset_pb.rb", "lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb", @@ -89,6 +92,9 @@ "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", "proto_docs/google/cloud/securitycenter/v1/access.rb", + "proto_docs/google/cloud/securitycenter/v1/agent.rb", + "proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb", + "proto_docs/google/cloud/securitycenter/v1/agent_session.rb", "proto_docs/google/cloud/securitycenter/v1/application.rb", "proto_docs/google/cloud/securitycenter/v1/asset.rb", "proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb", diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb b/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb rename to google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb b/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb rename to google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb b/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb rename to google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb diff --git a/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb b/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb index 07d8c81a0ec8..d83c4821a3ab 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb @@ -7,6 +7,9 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/cloud/securitycenter/v1/access_pb' +require 'google/cloud/securitycenter/v1/agent_pb' +require 'google/cloud/securitycenter/v1/agent_anomaly_pb' +require 'google/cloud/securitycenter/v1/agent_session_pb' require 'google/cloud/securitycenter/v1/application_pb' require 'google/cloud/securitycenter/v1/attack_exposure_pb' require 'google/cloud/securitycenter/v1/backup_disaster_recovery_pb' @@ -42,7 +45,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/securitycenter/v1/finding.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/access.proto\x1a\x30google/cloud/securitycenter/v1/application.proto\x1a\x34google/cloud/securitycenter/v1/attack_exposure.proto\x1a=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v1/chokepoint.proto\x1a\x30google/cloud/securitycenter/v1/cloud_armor.proto\x1a;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v1/compliance.proto\x1a/google/cloud/securitycenter/v1/connection.proto\x1a\x34google/cloud/securitycenter/v1/contact_details.proto\x1a.google/cloud/securitycenter/v1/container.proto\x1a-google/cloud/securitycenter/v1/database.proto\x1a\x31google/cloud/securitycenter/v1/exfiltration.proto\x1a\x36google/cloud/securitycenter/v1/external_exposure.proto\x1a\x34google/cloud/securitycenter/v1/external_system.proto\x1a)google/cloud/securitycenter/v1/file.proto\x1a\x35google/cloud/securitycenter/v1/group_membership.proto\x1a\x30google/cloud/securitycenter/v1/iam_binding.proto\x1a.google/cloud/securitycenter/v1/indicator.proto\x1a\x33google/cloud/securitycenter/v1/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v1/kubernetes.proto\x1a\x32google/cloud/securitycenter/v1/load_balancer.proto\x1a.google/cloud/securitycenter/v1/log_entry.proto\x1a\x31google/cloud/securitycenter/v1/mitre_attack.proto\x1a-google/cloud/securitycenter/v1/notebook.proto\x1a/google/cloud/securitycenter/v1/org_policy.proto\x1a,google/cloud/securitycenter/v1/process.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x35google/cloud/securitycenter/v1/security_posture.proto\x1a\x36google/cloud/securitycenter/v1/toxic_combination.proto\x1a\x32google/cloud/securitycenter/v1/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\"\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.State\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x14\n\x0c\x65xternal_uri\x18\x06 \x01(\t\x12X\n\x11source_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x08severity\x18\x0c \x01(\x0e\x32\x30.google.cloud.securitycenter.v1.Finding.Severity\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12K\n\rfinding_class\x18\x11 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Finding.FindingClass\x12<\n\tindicator\x18\x12 \x01(\x0b\x32).google.cloud.securitycenter.v1.Indicator\x12\x44\n\rvulnerability\x18\x14 \x01(\x0b\x32-.google.cloud.securitycenter.v1.Vulnerability\x12\x39\n\x10mute_update_time\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x16 \x03(\x0b\x32<.google.cloud.securitycenter.v1.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x19 \x01(\x0b\x32+.google.cloud.securitycenter.v1.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x1a \x01(\x0b\x32&.google.cloud.securitycenter.v1.Access\x12?\n\x0b\x63onnections\x18\x1f \x03(\x0b\x32*.google.cloud.securitycenter.v1.Connection\x12\x16\n\x0emute_initiator\x18\x1c \x01(\t\x12H\n\tmute_info\x18= \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.Finding.MuteInfoB\x03\xe0\x41\x03\x12:\n\tprocesses\x18\x1e \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Process\x12L\n\x08\x63ontacts\x18! \x03(\x0b\x32\x35.google.cloud.securitycenter.v1.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\" \x03(\x0b\x32*.google.cloud.securitycenter.v1.Compliance\x12 \n\x13parent_display_name\x18$ \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18% \x01(\t\x12\x42\n\x0c\x65xfiltration\x18& \x01(\x0b\x32,.google.cloud.securitycenter.v1.Exfiltration\x12@\n\x0ciam_bindings\x18\' \x03(\x0b\x32*.google.cloud.securitycenter.v1.IamBinding\x12\x12\n\nnext_steps\x18( \x01(\t\x12\x13\n\x0bmodule_name\x18) \x01(\t\x12=\n\ncontainers\x18* \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x12>\n\nkubernetes\x18+ \x01(\x0b\x32*.google.cloud.securitycenter.v1.Kubernetes\x12:\n\x08\x64\x61tabase\x18, \x01(\x0b\x32(.google.cloud.securitycenter.v1.Database\x12G\n\x0f\x61ttack_exposure\x18- \x01(\x0b\x32..google.cloud.securitycenter.v1.AttackExposure\x12\x33\n\x05\x66iles\x18. \x03(\x0b\x32$.google.cloud.securitycenter.v1.File\x12P\n\x14\x63loud_dlp_inspection\x18\x30 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18\x31 \x01(\x0b\x32\x33.google.cloud.securitycenter.v1.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18\x32 \x01(\x0b\x32-.google.cloud.securitycenter.v1.KernelRootkit\x12?\n\x0corg_policies\x18\x33 \x03(\x0b\x32).google.cloud.securitycenter.v1.OrgPolicy\x12@\n\x0b\x61pplication\x18\x35 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Application\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18\x37 \x01(\x0b\x32\x36.google.cloud.securitycenter.v1.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x38 \x01(\x0b\x32/.google.cloud.securitycenter.v1.SecurityPosture\x12=\n\x0blog_entries\x18\x39 \x03(\x0b\x32(.google.cloud.securitycenter.v1.LogEntry\x12\x44\n\x0eload_balancers\x18: \x03(\x0b\x32,.google.cloud.securitycenter.v1.LoadBalancer\x12?\n\x0b\x63loud_armor\x18; \x01(\x0b\x32*.google.cloud.securitycenter.v1.CloudArmor\x12:\n\x08notebook\x18? \x01(\x0b\x32(.google.cloud.securitycenter.v1.Notebook\x12K\n\x11toxic_combination\x18@ \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ToxicCombination\x12J\n\x11group_memberships\x18\x41 \x03(\x0b\x32/.google.cloud.securitycenter.v1.GroupMembership\x12>\n\nchokepoint\x18M \x01(\x0b\x32*.google.cloud.securitycenter.v1.Chokepoint\x12K\n\x11\x65xternal_exposure\x18T \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ExternalExposure\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x04\"\xf0\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t\x12\x15\n\x11\x45XTERNAL_EXPOSURE\x10\n:\xee\x01\xea\x41\xea\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" +descriptor_data = "\n,google/cloud/securitycenter/v1/finding.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/access.proto\x1a*google/cloud/securitycenter/v1/agent.proto\x1a\x32google/cloud/securitycenter/v1/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v1/agent_session.proto\x1a\x30google/cloud/securitycenter/v1/application.proto\x1a\x34google/cloud/securitycenter/v1/attack_exposure.proto\x1a=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v1/chokepoint.proto\x1a\x30google/cloud/securitycenter/v1/cloud_armor.proto\x1a;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v1/compliance.proto\x1a/google/cloud/securitycenter/v1/connection.proto\x1a\x34google/cloud/securitycenter/v1/contact_details.proto\x1a.google/cloud/securitycenter/v1/container.proto\x1a-google/cloud/securitycenter/v1/database.proto\x1a\x31google/cloud/securitycenter/v1/exfiltration.proto\x1a\x36google/cloud/securitycenter/v1/external_exposure.proto\x1a\x34google/cloud/securitycenter/v1/external_system.proto\x1a)google/cloud/securitycenter/v1/file.proto\x1a\x35google/cloud/securitycenter/v1/group_membership.proto\x1a\x30google/cloud/securitycenter/v1/iam_binding.proto\x1a.google/cloud/securitycenter/v1/indicator.proto\x1a\x33google/cloud/securitycenter/v1/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v1/kubernetes.proto\x1a\x32google/cloud/securitycenter/v1/load_balancer.proto\x1a.google/cloud/securitycenter/v1/log_entry.proto\x1a\x31google/cloud/securitycenter/v1/mitre_attack.proto\x1a-google/cloud/securitycenter/v1/notebook.proto\x1a/google/cloud/securitycenter/v1/org_policy.proto\x1a,google/cloud/securitycenter/v1/process.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x35google/cloud/securitycenter/v1/security_posture.proto\x1a\x36google/cloud/securitycenter/v1/toxic_combination.proto\x1a\x32google/cloud/securitycenter/v1/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99$\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.State\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x14\n\x0c\x65xternal_uri\x18\x06 \x01(\t\x12X\n\x11source_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x08severity\x18\x0c \x01(\x0e\x32\x30.google.cloud.securitycenter.v1.Finding.Severity\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12K\n\rfinding_class\x18\x11 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Finding.FindingClass\x12<\n\tindicator\x18\x12 \x01(\x0b\x32).google.cloud.securitycenter.v1.Indicator\x12\x44\n\rvulnerability\x18\x14 \x01(\x0b\x32-.google.cloud.securitycenter.v1.Vulnerability\x12\x39\n\x10mute_update_time\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x16 \x03(\x0b\x32<.google.cloud.securitycenter.v1.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x19 \x01(\x0b\x32+.google.cloud.securitycenter.v1.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x1a \x01(\x0b\x32&.google.cloud.securitycenter.v1.Access\x12?\n\x0b\x63onnections\x18\x1f \x03(\x0b\x32*.google.cloud.securitycenter.v1.Connection\x12\x16\n\x0emute_initiator\x18\x1c \x01(\t\x12H\n\tmute_info\x18= \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.Finding.MuteInfoB\x03\xe0\x41\x03\x12:\n\tprocesses\x18\x1e \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Process\x12L\n\x08\x63ontacts\x18! \x03(\x0b\x32\x35.google.cloud.securitycenter.v1.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\" \x03(\x0b\x32*.google.cloud.securitycenter.v1.Compliance\x12 \n\x13parent_display_name\x18$ \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18% \x01(\t\x12\x42\n\x0c\x65xfiltration\x18& \x01(\x0b\x32,.google.cloud.securitycenter.v1.Exfiltration\x12@\n\x0ciam_bindings\x18\' \x03(\x0b\x32*.google.cloud.securitycenter.v1.IamBinding\x12\x12\n\nnext_steps\x18( \x01(\t\x12\x13\n\x0bmodule_name\x18) \x01(\t\x12=\n\ncontainers\x18* \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x12>\n\nkubernetes\x18+ \x01(\x0b\x32*.google.cloud.securitycenter.v1.Kubernetes\x12:\n\x08\x64\x61tabase\x18, \x01(\x0b\x32(.google.cloud.securitycenter.v1.Database\x12G\n\x0f\x61ttack_exposure\x18- \x01(\x0b\x32..google.cloud.securitycenter.v1.AttackExposure\x12\x33\n\x05\x66iles\x18. \x03(\x0b\x32$.google.cloud.securitycenter.v1.File\x12P\n\x14\x63loud_dlp_inspection\x18\x30 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18\x31 \x01(\x0b\x32\x33.google.cloud.securitycenter.v1.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18\x32 \x01(\x0b\x32-.google.cloud.securitycenter.v1.KernelRootkit\x12?\n\x0corg_policies\x18\x33 \x03(\x0b\x32).google.cloud.securitycenter.v1.OrgPolicy\x12@\n\x0b\x61pplication\x18\x35 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Application\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18\x37 \x01(\x0b\x32\x36.google.cloud.securitycenter.v1.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x38 \x01(\x0b\x32/.google.cloud.securitycenter.v1.SecurityPosture\x12=\n\x0blog_entries\x18\x39 \x03(\x0b\x32(.google.cloud.securitycenter.v1.LogEntry\x12\x44\n\x0eload_balancers\x18: \x03(\x0b\x32,.google.cloud.securitycenter.v1.LoadBalancer\x12?\n\x0b\x63loud_armor\x18; \x01(\x0b\x32*.google.cloud.securitycenter.v1.CloudArmor\x12:\n\x08notebook\x18? \x01(\x0b\x32(.google.cloud.securitycenter.v1.Notebook\x12K\n\x11toxic_combination\x18@ \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ToxicCombination\x12J\n\x11group_memberships\x18\x41 \x03(\x0b\x32/.google.cloud.securitycenter.v1.GroupMembership\x12>\n\nchokepoint\x18M \x01(\x0b\x32*.google.cloud.securitycenter.v1.Chokepoint\x12K\n\x11\x65xternal_exposure\x18T \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ExternalExposure\x12\x34\n\x05\x61gent\x18X \x01(\x0b\x32%.google.cloud.securitycenter.v1.Agent\x12\x44\n\x0e\x61gent_sessions\x18Y \x03(\x0b\x32,.google.cloud.securitycenter.v1.AgentSession\x12\x43\n\ragent_anomaly\x18Z \x01(\x0b\x32,.google.cloud.securitycenter.v1.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x04\"\xf0\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t\x12\x15\n\x11\x45XTERNAL_EXPOSURE\x10\n:\xee\x01\xea\x41\xea\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb rename to google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb rename to google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb rename to google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb diff --git a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb index 02be3aedb9b3..0c3d564b323b 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb @@ -263,6 +263,15 @@ module V1 # @!attribute [rw] external_exposure # @return [::Google::Cloud::SecurityCenter::V1::ExternalExposure] # External exposure associated with the finding. + # @!attribute [rw] agent + # @return [::Google::Cloud::SecurityCenter::V1::Agent] + # Primary Agent that the specified finding was flagged for + # @!attribute [rw] agent_sessions + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AgentSession>] + # Conversational session(s) where the finding occurred. + # @!attribute [rw] agent_anomaly + # @return [::Google::Cloud::SecurityCenter::V1::AgentAnomaly] + # Details about behavior anomalies detected in AI agents. class Finding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/owl-bot-staging/google-cloud-security_center-v1/.gitignore b/owl-bot-staging/google-cloud-security_center-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json deleted file mode 100644 index 1db7926905f8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "securitycenter.googleapis.com", - "api_shortname": "securitycenter", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest", - "distribution_name": "google-cloud-security_center-v1", - "is_cloud": true, - "language": "ruby", - "name": "securitycenter", - "name_pretty": "Cloud Security Command Center V1 API", - "product_documentation": "https://cloud.google.com/security-command-center", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Security Command Center API provides access to temporal views of assets and findings within an organization. Note that google-cloud-security_center-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SECURITY_CENTER", - "ruby-cloud-product-url": "https://cloud.google.com/security-command-center", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml deleted file mode 100644 index cd91eea56b45..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security_center-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-security_center-v1.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v1/.toys.rb b/owl-bot-staging/google-cloud-security_center-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/.yardopts b/owl-bot-staging/google-cloud-security_center-v1/.yardopts deleted file mode 100644 index 1a401945abab..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Security Command Center V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md deleted file mode 100644 index ba9af184f351..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security_center-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-security_center-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/security_center/v1" - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/security_center/v1" - -::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-security_center-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/security_center/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security_center-v1/Gemfile b/owl-bot-staging/google-cloud-security_center-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-security_center-v1/README.md b/owl-bot-staging/google-cloud-security_center-v1/README.md deleted file mode 100644 index cfc90100104f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Security Command Center V1 API - -Security Command Center API provides access to temporal views of assets and findings within an organization. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Security Command Center V1 API. Most users should consider using -the main client gem, -[google-cloud-security_center](https://rubygems.org/gems/google-cloud-security_center). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-security_center-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/security_center/v1" - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new -request = ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new # (request fields as keyword arguments...) -response = client.bulk_mute_findings request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/security-command-center) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/security_center/v1" -require "logger" - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-security_center`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-security_center-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-security_center`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-security_center-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-security_center-v1/Rakefile b/owl-bot-staging/google-cloud-security_center-v1/Rakefile deleted file mode 100644 index 11860dec5013..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-security_center-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SECURITY_CENTER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SECURITY_CENTER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SECURITY_CENTER_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or SECURITY_CENTER_TEST_PROJECT=test123 SECURITY_CENTER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/security_center/v1/security_center/credentials" - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SECURITY_CENTER_PROJECT"] = project - ENV["SECURITY_CENTER_TEST_PROJECT"] = project - ENV["SECURITY_CENTER_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-security_center-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security_center-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security_center-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-security_center-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security_center-v1" - header "google-cloud-security_center-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security_center-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security_center-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-security_center-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-security_center-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json deleted file mode 100644 index 2a9d62ebb4ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json +++ /dev/null @@ -1,333 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.securitycenter.v1", - "libraryPackage": "::Google::Cloud::SecurityCenter::V1", - "services": { - "SecurityCenter": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client", - "rpcs": { - "BulkMuteFindings": { - "methods": [ - "bulk_mute_findings" - ] - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "create_security_health_analytics_custom_module" - ] - }, - "CreateSource": { - "methods": [ - "create_source" - ] - }, - "CreateFinding": { - "methods": [ - "create_finding" - ] - }, - "CreateMuteConfig": { - "methods": [ - "create_mute_config" - ] - }, - "CreateNotificationConfig": { - "methods": [ - "create_notification_config" - ] - }, - "DeleteMuteConfig": { - "methods": [ - "delete_mute_config" - ] - }, - "DeleteNotificationConfig": { - "methods": [ - "delete_notification_config" - ] - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "methods": [ - "delete_security_health_analytics_custom_module" - ] - }, - "GetSimulation": { - "methods": [ - "get_simulation" - ] - }, - "GetValuedResource": { - "methods": [ - "get_valued_resource" - ] - }, - "GetBigQueryExport": { - "methods": [ - "get_big_query_export" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "GetMuteConfig": { - "methods": [ - "get_mute_config" - ] - }, - "GetNotificationConfig": { - "methods": [ - "get_notification_config" - ] - }, - "GetOrganizationSettings": { - "methods": [ - "get_organization_settings" - ] - }, - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "methods": [ - "get_effective_security_health_analytics_custom_module" - ] - }, - "GetSecurityHealthAnalyticsCustomModule": { - "methods": [ - "get_security_health_analytics_custom_module" - ] - }, - "GetSource": { - "methods": [ - "get_source" - ] - }, - "GroupAssets": { - "methods": [ - "group_assets" - ] - }, - "GroupFindings": { - "methods": [ - "group_findings" - ] - }, - "ListAssets": { - "methods": [ - "list_assets" - ] - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_descendant_security_health_analytics_custom_modules" - ] - }, - "ListFindings": { - "methods": [ - "list_findings" - ] - }, - "ListMuteConfigs": { - "methods": [ - "list_mute_configs" - ] - }, - "ListNotificationConfigs": { - "methods": [ - "list_notification_configs" - ] - }, - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_effective_security_health_analytics_custom_modules" - ] - }, - "ListSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_security_health_analytics_custom_modules" - ] - }, - "ListSources": { - "methods": [ - "list_sources" - ] - }, - "RunAssetDiscovery": { - "methods": [ - "run_asset_discovery" - ] - }, - "SetFindingState": { - "methods": [ - "set_finding_state" - ] - }, - "SetMute": { - "methods": [ - "set_mute" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "simulate_security_health_analytics_custom_module" - ] - }, - "UpdateExternalSystem": { - "methods": [ - "update_external_system" - ] - }, - "UpdateFinding": { - "methods": [ - "update_finding" - ] - }, - "UpdateMuteConfig": { - "methods": [ - "update_mute_config" - ] - }, - "UpdateNotificationConfig": { - "methods": [ - "update_notification_config" - ] - }, - "UpdateOrganizationSettings": { - "methods": [ - "update_organization_settings" - ] - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "update_security_health_analytics_custom_module" - ] - }, - "UpdateSource": { - "methods": [ - "update_source" - ] - }, - "UpdateSecurityMarks": { - "methods": [ - "update_security_marks" - ] - }, - "CreateBigQueryExport": { - "methods": [ - "create_big_query_export" - ] - }, - "DeleteBigQueryExport": { - "methods": [ - "delete_big_query_export" - ] - }, - "UpdateBigQueryExport": { - "methods": [ - "update_big_query_export" - ] - }, - "ListBigQueryExports": { - "methods": [ - "list_big_query_exports" - ] - }, - "CreateEventThreatDetectionCustomModule": { - "methods": [ - "create_event_threat_detection_custom_module" - ] - }, - "DeleteEventThreatDetectionCustomModule": { - "methods": [ - "delete_event_threat_detection_custom_module" - ] - }, - "GetEventThreatDetectionCustomModule": { - "methods": [ - "get_event_threat_detection_custom_module" - ] - }, - "ListDescendantEventThreatDetectionCustomModules": { - "methods": [ - "list_descendant_event_threat_detection_custom_modules" - ] - }, - "ListEventThreatDetectionCustomModules": { - "methods": [ - "list_event_threat_detection_custom_modules" - ] - }, - "UpdateEventThreatDetectionCustomModule": { - "methods": [ - "update_event_threat_detection_custom_module" - ] - }, - "ValidateEventThreatDetectionCustomModule": { - "methods": [ - "validate_event_threat_detection_custom_module" - ] - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "methods": [ - "get_effective_event_threat_detection_custom_module" - ] - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "methods": [ - "list_effective_event_threat_detection_custom_modules" - ] - }, - "BatchCreateResourceValueConfigs": { - "methods": [ - "batch_create_resource_value_configs" - ] - }, - "DeleteResourceValueConfig": { - "methods": [ - "delete_resource_value_config" - ] - }, - "GetResourceValueConfig": { - "methods": [ - "get_resource_value_config" - ] - }, - "ListResourceValueConfigs": { - "methods": [ - "list_resource_value_configs" - ] - }, - "UpdateResourceValueConfig": { - "methods": [ - "update_resource_value_config" - ] - }, - "ListValuedResources": { - "methods": [ - "list_valued_resources" - ] - }, - "ListAttackPaths": { - "methods": [ - "list_attack_paths" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec b/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec deleted file mode 100644 index 2ea96cde071b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security_center/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security_center-v1" - gem.version = Google::Cloud::SecurityCenter::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Security Command Center API provides access to temporal views of assets and findings within an organization. Note that google-cloud-security_center-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details." - gem.summary = "Security Command Center API provides access to temporal views of assets and findings within an organization." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb deleted file mode 100644 index b1f8c90a70d9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/security_center/v1" diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb deleted file mode 100644 index 64e25fbd3ded..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center/v1/security_center" -require "google/cloud/security_center/v1/version" - -module Google - module Cloud - module SecurityCenter - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/security_center/v1" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/security_center/v1" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/security_center/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb deleted file mode 100644 index c11148195761..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center/v1/security_center/rest" -require "google/cloud/security_center/v1/version" - -module Google - module Cloud - module SecurityCenter - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/security_center/v1/rest" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb deleted file mode 100644 index 20883d6fbc43..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center/v1/version" - -require "google/cloud/security_center/v1/security_center/credentials" -require "google/cloud/security_center/v1/security_center/paths" -require "google/cloud/security_center/v1/security_center/operations" -require "google/cloud/security_center/v1/security_center/client" -require "google/cloud/security_center/v1/security_center/rest" - -module Google - module Cloud - module SecurityCenter - module V1 - ## - # V1 APIs for Security Center service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/security_center/v1/security_center" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/security_center/v1/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - module SecurityCenter - end - end - end - end -end - -helper_path = ::File.join __dir__, "security_center", "helpers.rb" -require "google/cloud/security_center/v1/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb deleted file mode 100644 index 23fb68a1046e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb +++ /dev/null @@ -1,7460 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycenter/v1/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - ## - # Client for the SecurityCenter service. - # - # V1 APIs for Security Center service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_stub - - ## - # Configure the SecurityCenter Client class. - # - # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenter", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.create_source.timeout = 60.0 - - default_config.rpcs.create_finding.timeout = 60.0 - - default_config.rpcs.create_notification_config.timeout = 60.0 - - default_config.rpcs.delete_notification_config.timeout = 60.0 - - default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_notification_config.timeout = 60.0 - default_config.rpcs.get_notification_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_organization_settings.timeout = 60.0 - default_config.rpcs.get_organization_settings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_source.timeout = 60.0 - default_config.rpcs.get_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_assets.timeout = 480.0 - default_config.rpcs.group_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_findings.timeout = 480.0 - default_config.rpcs.group_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_assets.timeout = 480.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 480.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_notification_configs.timeout = 60.0 - default_config.rpcs.list_notification_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_sources.timeout = 60.0 - default_config.rpcs.list_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_asset_discovery.timeout = 60.0 - - default_config.rpcs.set_finding_state.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_finding.timeout = 60.0 - - default_config.rpcs.update_notification_config.timeout = 60.0 - - default_config.rpcs.update_organization_settings.timeout = 60.0 - - default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.update_source.timeout = 60.0 - - default_config.rpcs.update_security_marks.timeout = 480.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_stub.universe_domain - end - - ## - # Create a new SecurityCenter client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenter client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/securitycenter/v1/securitycenter_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @security_center_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @security_center_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_stub.logger - end - - # Service calls - - ## - # Kicks off an LRO to bulk mute findings for a parent based on a filter. The - # parent can be either an organization, folder or project. The findings - # matched by the filter will be muted after the LRO is done. - # - # @overload bulk_mute_findings(request, options = nil) - # Pass arguments to `bulk_mute_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil) - # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, at which bulk action needs to be applied. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param filter [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @param mute_annotation [::String] - # This can be a mute configuration name or any identifier for mute/unmute - # of findings based on the filter. - # @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new - # - # # Call the bulk_mute_findings method. - # result = client.bulk_mute_findings request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def bulk_mute_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.bulk_mute_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_mute_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :bulk_mute_findings, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - # given CRM parent, and also creates inherited - # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - # parent. These modules are enabled by default. - # - # @overload create_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil) - # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new custom module's parent. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. SecurityHealthAnalytics custom module to create. The provided - # name is ignored and reset with provided parent information and - # server-generated ID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the create_security_health_analytics_custom_module method. - # result = client.create_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def create_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_source(parent: nil, source: nil) - # Pass arguments to `create_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def create_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a finding. The corresponding source must exist for finding creation - # to succeed. - # - # @overload create_finding(request, options = nil) - # Pass arguments to `create_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_finding(parent: nil, finding_id: nil, finding: nil) - # Pass arguments to `create_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new finding's parent. Its format should be - # `organizations/[organization_id]/sources/[source_id]`. - # @param finding_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def create_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a mute config. - # - # @overload create_mute_config(request, options = nil) - # Pass arguments to `create_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) - # Pass arguments to `create_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] - # Required. The mute config being created. - # @param mute_config_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new - # - # # Call the create_mute_config method. - # result = client.create_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def create_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification config. - # - # @overload create_notification_config(request, options = nil) - # Pass arguments to `create_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) - # Pass arguments to `create_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param config_id [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def create_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing mute config. - # - # @overload delete_mute_config(request, options = nil) - # Pass arguments to `delete_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_mute_config(name: nil) - # Pass arguments to `delete_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to delete. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new - # - # # Call the delete_mute_config method. - # result = client.delete_mute_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification config. - # - # @overload delete_notification_config(request, options = nil) - # Pass arguments to `delete_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_notification_config(name: nil) - # Pass arguments to `delete_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to delete. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new - # - # # Call the delete_notification_config method. - # result = client.delete_notification_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - # descendants in the CRM hierarchy. This method is only supported for - # resident custom modules. - # - # @overload delete_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_security_health_analytics_custom_module(name: nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to delete. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the delete_security_health_analytics_custom_module method. - # result = client.delete_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the simulation by name or the latest simulation for the given - # organization. - # - # @overload get_simulation(request, options = nil) - # Pass arguments to `get_simulation` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_simulation(name: nil) - # Pass arguments to `get_simulation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Simulation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Simulation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new - # - # # Call the get_simulation method. - # result = client.get_simulation request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. - # p result - # - def get_simulation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_simulation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_simulation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_simulation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the valued resource by name - # - # @overload get_valued_resource(request, options = nil) - # Pass arguments to `get_valued_resource` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_valued_resource(name: nil) - # Pass arguments to `get_valued_resource` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new - # - # # Call the get_valued_resource method. - # result = client.get_valued_resource request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. - # p result - # - def get_valued_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_valued_resource.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_valued_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_valued_resource, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a BigQuery export. - # - # @overload get_big_query_export(request, options = nil) - # Pass arguments to `get_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_big_query_export(name: nil) - # Pass arguments to `get_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the BigQuery export to retrieve. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new - # - # # Call the get_big_query_export method. - # result = client.get_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def get_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy on the specified Source. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a mute config. - # - # @overload get_mute_config(request, options = nil) - # Pass arguments to `get_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_mute_config(name: nil) - # Pass arguments to `get_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to retrieve. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new - # - # # Call the get_mute_config method. - # result = client.get_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def get_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a notification config. - # - # @overload get_notification_config(request, options = nil) - # Pass arguments to `get_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_notification_config(name: nil) - # Pass arguments to `get_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to get. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def get_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the settings for an organization. - # - # @overload get_organization_settings(request, options = nil) - # Pass arguments to `get_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_organization_settings(name: nil) - # Pass arguments to `get_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the organization to get organization settings for. Its - # format is `organizations/[organization_id]/organizationSettings`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new - # - # # Call the get_organization_settings method. - # result = client.get_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - # p result - # - def get_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_organization_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. - # - # @overload get_effective_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_effective_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the effective custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_effective_security_health_analytics_custom_module method. - # result = client.get_effective_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p result - # - def get_effective_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_effective_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a SecurityHealthAnalyticsCustomModule. - # - # @overload get_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_security_health_analytics_custom_module method. - # result = client.get_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def get_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_source(name: nil) - # Pass arguments to `get_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def get_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization's assets and groups them by their specified - # properties. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload group_assets(request, options = nil) - # Pass arguments to `group_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent to group the assets by. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param page_token [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new - # - # # Call the group_assets method. - # result = client.group_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - # p item - # end - # - def group_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.group_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.group_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.group_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :group_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings, - # /v1/folders/\\{folder_id}/sources/-/findings, - # /v1/projects/\\{project_id}/sources/-/findings - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source to groupBy. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, - # or `projects/{project_id}/sources/-` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping - # (including `state_change`). The string value should follow SQL syntax: - # comma separated list of fields. For example: "parent,resource_name". - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param page_token [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new - # - # # Call the group_findings method. - # result = client.group_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - # p item - # end - # - def group_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.group_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.group_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.group_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :group_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization's assets. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource that contains the assets. The - # value that you can specify on parent depends on the method in which you - # specify parent. You can specify one of the following values: - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all resident SecurityHealthAnalyticsCustomModules under - # the given CRM parent and all of the parent’s CRM descendants. - # - # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list descendant custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_descendant_security_health_analytics_custom_modules method. - # result = client.list_descendant_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_descendant_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_descendant_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source the findings belong to. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To list across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-`, - # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists mute configs. - # - # @overload list_mute_configs(request, options = nil) - # Pass arguments to `list_mute_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mute_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new - # - # # Call the list_mute_configs method. - # result = client.list_mute_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. - # p item - # end - # - def list_mute_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_mute_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_mute_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_mute_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_mute_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists notification configs. - # - # @overload list_notification_configs(request, options = nil) - # Pass arguments to `list_notification_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_notification_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is "organizations/[organization_id]", - # "folders/[folder_id]", or "projects/[project_id]". - # @param page_token [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new - # - # # Call the list_notification_configs method. - # result = client.list_notification_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p item - # end - # - def list_notification_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_notification_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_notification_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_notification_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - # given parent. This includes resident modules defined at the scope of the - # parent, and inherited modules, inherited from CRM ancestors. - # - # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list effective custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_effective_security_health_analytics_custom_modules method. - # result = client.list_effective_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_effective_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_effective_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all SecurityHealthAnalyticsCustomModules for the given - # parent. This includes resident modules defined at the scope of the parent, - # and inherited modules, inherited from CRM ancestors. - # - # @overload list_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_security_health_analytics_custom_modules method. - # result = client.list_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sources belonging to an organization. - # - # @overload list_sources(request, options = nil) - # Pass arguments to `list_sources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param page_token [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new - # - # # Call the list_sources method. - # result = client.list_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. - # p item - # end - # - def list_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload run_asset_discovery(request, options = nil) - # Pass arguments to `run_asset_discovery` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_asset_discovery(parent: nil) - # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to run asset discovery for. Its format - # is `organizations/[organization_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new - # - # # Call the run_asset_discovery method. - # result = client.run_asset_discovery request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_asset_discovery request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_asset_discovery.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_asset_discovery.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the state of a finding. - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_finding_state(name: nil, state: nil, start_time: nil) - # Pass arguments to `set_finding_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State] - # Required. The desired State of the finding. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The time at which the updated state takes effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def set_finding_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_finding_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_finding_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the mute state of a finding. - # - # @overload set_mute(request, options = nil) - # Pass arguments to `set_mute` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_mute(name: nil, mute: nil) - # Pass arguments to `set_mute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # Required. The desired state of the Mute. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new - # - # # Call the set_mute method. - # result = client.set_mute request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def set_mute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_mute.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_mute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_mute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_mute, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified Source. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has on the specified source. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. - # - # @overload simulate_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [Relative - # Resource - # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # Example: `organizations/{organization_id}` - # @param custom_config [::Google::Cloud::SecurityCenter::V1::CustomConfig, ::Hash] - # Required. The custom configuration that you need to test. - # @param resource [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] - # Required. Resource data to simulate custom module against. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the simulate_security_health_analytics_custom_module method. - # result = client.simulate_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - # p result - # - def simulate_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :simulate_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates external system. This is for a given finding. - # - # @overload update_external_system(request, options = nil) - # Pass arguments to `update_external_system` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_external_system(external_system: nil, update_mask: nil) - # Pass arguments to `update_external_system` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash] - # Required. The external system resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new - # - # # Call the update_external_system method. - # result = client.update_external_system request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. - # p result - # - def update_external_system request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_external_system.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.external_system&.name - header_params["external_system.name"] = request.external_system.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_external_system.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_external_system, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - # - # @overload update_finding(request, options = nil) - # Pass arguments to `update_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_finding(finding: nil, update_mask: nil) - # Pass arguments to `update_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def update_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.finding&.name - header_params["finding.name"] = request.finding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a mute config. - # - # @overload update_mute_config(request, options = nil) - # Pass arguments to `update_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_mute_config(mute_config: nil, update_mask: nil) - # Pass arguments to `update_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] - # Required. The mute config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new - # - # # Call the update_mute_config method. - # result = client.update_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def update_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.mute_config&.name - header_params["mute_config.name"] = request.mute_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - # - # @overload update_notification_config(request, options = nil) - # Pass arguments to `update_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_notification_config(notification_config: nil, update_mask: nil) - # Pass arguments to `update_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] - # Required. The notification config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def update_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.notification_config&.name - header_params["notification_config.name"] = request.notification_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an organization's settings. - # - # @overload update_organization_settings(request, options = nil) - # Pass arguments to `update_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_organization_settings(organization_settings: nil, update_mask: nil) - # Pass arguments to `update_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash] - # Required. The organization settings resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new - # - # # Call the update_organization_settings method. - # result = client.update_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - # p result - # - def update_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.organization_settings&.name - header_params["organization_settings.name"] = request.organization_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_organization_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the SecurityHealthAnalyticsCustomModule under the given name based - # on the given update mask. Updating the enablement state is supported on - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name and custom - # config of a module is supported on resident modules only. - # - # @overload update_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil) - # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. The SecurityHealthAnalytics custom module to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. The only fields that can be updated are - # `enablement_state` and `custom_config`. If empty or set to the wildcard - # value `*`, both `enablement_state` and `custom_config` are updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the update_security_health_analytics_custom_module method. - # result = client.update_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def update_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.security_health_analytics_custom_module&.name - header_params["security_health_analytics_custom_module.name"] = request.security_health_analytics_custom_module.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_source(source: nil, update_mask: nil) - # Pass arguments to `update_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] - # Required. The source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def update_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.source&.name - header_params["source.name"] = request.source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates security marks. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) - # Pass arguments to `update_security_marks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash] - # Required. The security marks resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. Must be - # earlier or equal to the server time. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. - # p result - # - def update_security_marks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_security_marks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.security_marks&.name - header_params["security_marks.name"] = request.security_marks.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_marks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a BigQuery export. - # - # @overload create_big_query_export(request, options = nil) - # Pass arguments to `create_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) - # Pass arguments to `create_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] - # Required. The BigQuery export being created. - # @param big_query_export_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new - # - # # Call the create_big_query_export method. - # result = client.create_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def create_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing BigQuery export. - # - # @overload delete_big_query_export(request, options = nil) - # Pass arguments to `delete_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_big_query_export(name: nil) - # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the BigQuery export to delete. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new - # - # # Call the delete_big_query_export method. - # result = client.delete_big_query_export request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a BigQuery export. - # - # @overload update_big_query_export(request, options = nil) - # Pass arguments to `update_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_big_query_export(big_query_export: nil, update_mask: nil) - # Pass arguments to `update_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] - # Required. The BigQuery export being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new - # - # # Call the update_big_query_export method. - # result = client.update_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def update_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.big_query_export&.name - header_params["big_query_export.name"] = request.big_query_export.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - # - # @overload list_big_query_exports(request, options = nil) - # Pass arguments to `list_big_query_exports` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new - # - # # Call the list_big_query_exports method. - # result = client.list_big_query_exports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p item - # end - # - def list_big_query_exports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_big_query_exports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_big_query_exports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident Event Threat Detection custom module at the scope of the - # given Resource Manager parent, and also creates inherited custom modules - # for all descendants of the given parent. These modules are enabled by - # default. - # - # @overload create_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil) - # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The new custom module's parent. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module to create. The - # event_threat_detection_custom_module.name will be ignored and server - # generated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new - # - # # Call the create_event_threat_detection_custom_module method. - # result = client.create_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def create_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified Event Threat Detection custom module and all of its - # descendants in the Resource Manager hierarchy. This method is only - # supported for resident custom modules. - # - # @overload delete_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_event_threat_detection_custom_module(name: nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to delete. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new - # - # # Call the delete_event_threat_detection_custom_module method. - # result = client.delete_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Event Threat Detection custom module. - # - # @overload get_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to get. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_event_threat_detection_custom_module method. - # result = client.get_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def get_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all resident Event Threat Detection custom modules under the - # given Resource Manager parent and its descendants. - # - # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDescendantEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_descendant_event_threat_detection_custom_modules method. - # result = client.list_descendant_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_descendant_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_descendant_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Event Threat Detection custom modules for the given - # Resource Manager parent. This includes resident modules defined at the - # scope of the parent along with modules inherited from ancestors. - # - # @overload list_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListEventThreatDetectionCustomModules` must match the call that provided - # the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_event_threat_detection_custom_modules method. - # result = client.list_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Event Threat Detection custom module with the given name based - # on the given update mask. Updating the enablement state is supported for - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name or - # configuration of a module is supported for resident modules only. The type - # of a module cannot be changed. - # - # @overload update_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil) - # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new - # - # # Call the update_event_threat_detection_custom_module method. - # result = client.update_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def update_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.event_threat_detection_custom_module&.name - header_params["event_threat_detection_custom_module.name"] = request.event_threat_detection_custom_module.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Validates the given Event Threat Detection custom module. - # - # @overload validate_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent to validate the Custom Module under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param raw_text [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @param type [::String] - # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new - # - # # Call the validate_event_threat_detection_custom_module method. - # result = client.validate_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. - # p result - # - def validate_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :validate_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an effective Event Threat Detection custom module at the given level. - # - # @overload get_effective_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_effective_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the effective Event Threat Detection custom - # module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_effective_event_threat_detection_custom_module method. - # result = client.get_effective_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - # p result - # - def get_effective_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_effective_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all effective Event Threat Detection custom modules for the - # given parent. This includes resident modules defined at the scope of the - # parent along with modules inherited from its ancestors. - # - # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules for. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListEffectiveEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_effective_event_threat_detection_custom_modules method. - # result = client.list_effective_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - # p item - # end - # - def list_effective_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_effective_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - # - # @overload batch_create_resource_value_configs(request, options = nil) - # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_create_resource_value_configs(parent: nil, requests: nil) - # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>] - # Required. The resource value configs to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new - # - # # Call the batch_create_resource_value_configs method. - # result = client.batch_create_resource_value_configs request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. - # p result - # - def batch_create_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :batch_create_resource_value_configs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a ResourceValueConfig. - # - # @overload delete_resource_value_config(request, options = nil) - # Pass arguments to `delete_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_resource_value_config(name: nil) - # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the ResourceValueConfig to delete - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new - # - # # Call the delete_resource_value_config method. - # result = client.delete_resource_value_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ResourceValueConfig. - # - # @overload get_resource_value_config(request, options = nil) - # Pass arguments to `get_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_resource_value_config(name: nil) - # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource value config to retrieve. Its format is - # `organizations/{organization}/resourceValueConfigs/{config_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new - # - # # Call the get_resource_value_config method. - # result = client.get_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p result - # - def get_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all ResourceValueConfigs. - # - # @overload list_resource_value_configs(request, options = nil) - # Pass arguments to `list_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @param page_size [::Integer] - # The number of results to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new - # - # # Call the list_resource_value_configs method. - # result = client.list_resource_value_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p item - # end - # - def list_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_resource_value_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing ResourceValueConfigs with new rules. - # - # @overload update_resource_value_config(request, options = nil) - # Pass arguments to `update_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) - # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash] - # Required. The resource value config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new - # - # # Call the update_resource_value_config method. - # result = client.update_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p result - # - def update_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource_value_config&.name - header_params["resource_value_config.name"] = request.resource_value_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the valued resources for a set of simulation results and filter. - # - # @overload list_valued_resources(request, options = nil) - # Pass arguments to `list_valued_resources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) - # Pass arguments to `list_valued_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list valued resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @param filter [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @param page_token [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param order_by [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # * `resource` - # - # * `display_name` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for - # example: `exposed_score DESC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new - # - # # Call the list_valued_resources method. - # result = client.list_valued_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. - # p item - # end - # - def list_valued_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_valued_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_valued_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_valued_resources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_valued_resources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - # - # @overload list_attack_paths(request, options = nil) - # Pass arguments to `list_attack_paths` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_attack_paths` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @param filter [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @param page_token [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new - # - # # Call the list_attack_paths method. - # result = client.list_attack_paths request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. - # p item - # end - # - def list_attack_paths request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_attack_paths.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_attack_paths.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_attack_paths, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_attack_paths, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenter API. - # - # This class represents the configuration for SecurityCenter, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # bulk_mute_findings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.bulk_mute_findings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.bulk_mute_findings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SecurityCenter API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `bulk_mute_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_mute_findings - ## - # RPC-specific configuration for `create_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_security_health_analytics_custom_module - ## - # RPC-specific configuration for `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `create_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_finding - ## - # RPC-specific configuration for `create_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mute_config - ## - # RPC-specific configuration for `create_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_config - ## - # RPC-specific configuration for `delete_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mute_config - ## - # RPC-specific configuration for `delete_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_config - ## - # RPC-specific configuration for `delete_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_simulation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_simulation - ## - # RPC-specific configuration for `get_valued_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :get_valued_resource - ## - # RPC-specific configuration for `get_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :get_big_query_export - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `get_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mute_config - ## - # RPC-specific configuration for `get_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_config - ## - # RPC-specific configuration for `get_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_settings - ## - # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :group_assets - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_mute_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mute_configs - ## - # RPC-specific configuration for `list_notification_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_configs - ## - # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `run_asset_discovery` - # @return [::Gapic::Config::Method] - # - attr_reader :run_asset_discovery - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_mute` - # @return [::Gapic::Config::Method] - # - attr_reader :set_mute - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `simulate_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :simulate_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_external_system` - # @return [::Gapic::Config::Method] - # - attr_reader :update_external_system - ## - # RPC-specific configuration for `update_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_finding - ## - # RPC-specific configuration for `update_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mute_config - ## - # RPC-specific configuration for `update_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_config - ## - # RPC-specific configuration for `update_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_organization_settings - ## - # RPC-specific configuration for `update_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - ## - # RPC-specific configuration for `create_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :create_big_query_export - ## - # RPC-specific configuration for `delete_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_big_query_export - ## - # RPC-specific configuration for `update_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :update_big_query_export - ## - # RPC-specific configuration for `list_big_query_exports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_big_query_exports - ## - # RPC-specific configuration for `create_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_event_threat_detection_custom_module - ## - # RPC-specific configuration for `delete_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `list_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `update_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_event_threat_detection_custom_module - ## - # RPC-specific configuration for `validate_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :validate_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `batch_create_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_resource_value_configs - ## - # RPC-specific configuration for `delete_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_resource_value_config - ## - # RPC-specific configuration for `get_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_value_config - ## - # RPC-specific configuration for `list_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_value_configs - ## - # RPC-specific configuration for `update_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_resource_value_config - ## - # RPC-specific configuration for `list_valued_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_valued_resources - ## - # RPC-specific configuration for `list_attack_paths` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attack_paths - - # @private - def initialize parent_rpcs = nil - bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings - @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config - create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module - @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_config - create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding - @create_finding = ::Gapic::Config::Method.new create_finding_config - create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config - @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config - create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config - @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config - delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config - @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config - delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config - @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config - delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module - @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config - get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation - @get_simulation = ::Gapic::Config::Method.new get_simulation_config - get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource - @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config - get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export - @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config - @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config - get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config - @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config - get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings - @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config - get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module - @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config - get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module - @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_config - group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets - @group_assets = ::Gapic::Config::Method.new group_assets_config - group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings - @group_findings = ::Gapic::Config::Method.new group_findings_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules - @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs - @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config - list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs - @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config - list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules - @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config - list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules - @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_config - run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery - @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config - set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state - @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config - set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute - @set_mute = ::Gapic::Config::Method.new set_mute_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module - @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config - update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system - @update_external_system = ::Gapic::Config::Method.new update_external_system_config - update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding - @update_finding = ::Gapic::Config::Method.new update_finding_config - update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config - @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config - update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config - @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config - update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings - @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config - update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module - @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_config - update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks - @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config - create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export - @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config - delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export - @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config - update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export - @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config - list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports - @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config - create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module - @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config - delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module - @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config - get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module - @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config - list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules - @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config - list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules - @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config - update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module - @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config - validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module - @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config - get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module - @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config - list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules - @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config - batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs - @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config - delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config - @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config - get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config - @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config - list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs - @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config - update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config - @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config - list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources - @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config - list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths - @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb deleted file mode 100644 index 4bb0187caca1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - # Credentials for the SecurityCenter API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SECURITY_CENTER_CREDENTIALS", - "SECURITY_CENTER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SECURITY_CENTER_CREDENTIALS_JSON", - "SECURITY_CENTER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb deleted file mode 100644 index 178841746c30..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecurityCenter Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb deleted file mode 100644 index 74f6066a7b65..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb +++ /dev/null @@ -1,1127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - # Path helper methods for the SecurityCenter API. - module Paths - ## - # Create a fully-qualified BigQueryExport resource string. - # - # @overload big_query_export_path(organization:, export:) - # The resource will be in the following format: - # - # `organizations/{organization}/bigQueryExports/{export}` - # - # @param organization [String] - # @param export [String] - # - # @overload big_query_export_path(folder:, export:) - # The resource will be in the following format: - # - # `folders/{folder}/bigQueryExports/{export}` - # - # @param folder [String] - # @param export [String] - # - # @overload big_query_export_path(project:, export:) - # The resource will be in the following format: - # - # `projects/{project}/bigQueryExports/{export}` - # - # @param project [String] - # @param export [String] - # - # @return [::String] - def big_query_export_path **args - resources = { - "export:organization" => (proc do |organization:, export:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/bigQueryExports/#{export}" - end), - "export:folder" => (proc do |folder:, export:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/bigQueryExports/#{export}" - end), - "export:project" => (proc do |project:, export:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/bigQueryExports/#{export}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified DlpJob resource string. - # - # @overload dlp_job_path(project:, dlp_job:) - # The resource will be in the following format: - # - # `projects/{project}/dlpJobs/{dlp_job}` - # - # @param project [String] - # @param dlp_job [String] - # - # @overload dlp_job_path(project:, location:, dlp_job:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dlpJobs/{dlp_job}` - # - # @param project [String] - # @param location [String] - # @param dlp_job [String] - # - # @return [::String] - def dlp_job_path **args - resources = { - "dlp_job:project" => (proc do |project:, dlp_job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/dlpJobs/#{dlp_job}" - end), - "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EffectiveEventThreatDetectionCustomModule resource string. - # - # @overload effective_event_threat_detection_custom_module_path(organization:, module:) - # The resource will be in the following format: - # - # `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}` - # - # @param organization [String] - # @param module [String] - # - # @overload effective_event_threat_detection_custom_module_path(folder:, module:) - # The resource will be in the following format: - # - # `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}` - # - # @param folder [String] - # @param module [String] - # - # @overload effective_event_threat_detection_custom_module_path(project:, module:) - # The resource will be in the following format: - # - # `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}` - # - # @param project [String] - # @param module [String] - # - # @return [::String] - def effective_event_threat_detection_custom_module_path **args - resources = { - "module:organization" => (proc do |organization:, module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" - end), - "folder:module" => (proc do |folder:, module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" - end), - "module:project" => (proc do |project:, module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EffectiveSecurityHealthAnalyticsCustomModule resource string. - # - # @overload effective_security_health_analytics_custom_module_path(organization:, effective_custom_module:) - # The resource will be in the following format: - # - # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` - # - # @param organization [String] - # @param effective_custom_module [String] - # - # @overload effective_security_health_analytics_custom_module_path(folder:, effective_custom_module:) - # The resource will be in the following format: - # - # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` - # - # @param folder [String] - # @param effective_custom_module [String] - # - # @overload effective_security_health_analytics_custom_module_path(project:, effective_custom_module:) - # The resource will be in the following format: - # - # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` - # - # @param project [String] - # @param effective_custom_module [String] - # - # @return [::String] - def effective_security_health_analytics_custom_module_path **args - resources = { - "effective_custom_module:organization" => (proc do |organization:, effective_custom_module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" - end), - "effective_custom_module:folder" => (proc do |folder:, effective_custom_module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" - end), - "effective_custom_module:project" => (proc do |project:, effective_custom_module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EventThreatDetectionCustomModule resource string. - # - # @overload event_threat_detection_custom_module_path(organization:, module:) - # The resource will be in the following format: - # - # `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}` - # - # @param organization [String] - # @param module [String] - # - # @overload event_threat_detection_custom_module_path(folder:, module:) - # The resource will be in the following format: - # - # `folders/{folder}/eventThreatDetectionSettings/customModules/{module}` - # - # @param folder [String] - # @param module [String] - # - # @overload event_threat_detection_custom_module_path(project:, module:) - # The resource will be in the following format: - # - # `projects/{project}/eventThreatDetectionSettings/customModules/{module}` - # - # @param project [String] - # @param module [String] - # - # @return [::String] - def event_threat_detection_custom_module_path **args - resources = { - "module:organization" => (proc do |organization:, module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" - end), - "folder:module" => (proc do |folder:, module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" - end), - "module:project" => (proc do |project:, module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EventThreatDetectionSettings resource string. - # - # @overload event_threat_detection_settings_path(organization:) - # The resource will be in the following format: - # - # `organizations/{organization}/eventThreatDetectionSettings` - # - # @param organization [String] - # - # @overload event_threat_detection_settings_path(folder:) - # The resource will be in the following format: - # - # `folders/{folder}/eventThreatDetectionSettings` - # - # @param folder [String] - # - # @overload event_threat_detection_settings_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/eventThreatDetectionSettings` - # - # @param project [String] - # - # @return [::String] - def event_threat_detection_settings_path **args - resources = { - "organization" => (proc do |organization:| - "organizations/#{organization}/eventThreatDetectionSettings" - end), - "folder" => (proc do |folder:| - "folders/#{folder}/eventThreatDetectionSettings" - end), - "project" => (proc do |project:| - "projects/#{project}/eventThreatDetectionSettings" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified ExternalSystem resource string. - # - # @overload external_system_path(organization:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(folder:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(project:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @return [::String] - def external_system_path **args - resources = { - "externalsystem:finding:organization:source" => (proc do |organization:, source:, finding:, externalsystem:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:folder:source" => (proc do |folder:, source:, finding:, externalsystem:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:project:source" => (proc do |project:, source:, finding:, externalsystem:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Finding resource string. - # - # @overload finding_path(organization:, source:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(folder:, source:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(project:, source:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # - # @return [::String] - def finding_path **args - resources = { - "finding:organization:source" => (proc do |organization:, source:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}" - end), - "finding:folder:source" => (proc do |folder:, source:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}" - end), - "finding:project:source" => (proc do |project:, source:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Folder resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}` - # - # @param folder [String] - # - # @return [::String] - def folder_path folder: - "folders/#{folder}" - end - - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified MuteConfig resource string. - # - # @overload mute_config_path(organization:, mute_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/muteConfigs/{mute_config}` - # - # @param organization [String] - # @param mute_config [String] - # - # @overload mute_config_path(folder:, mute_config:) - # The resource will be in the following format: - # - # `folders/{folder}/muteConfigs/{mute_config}` - # - # @param folder [String] - # @param mute_config [String] - # - # @overload mute_config_path(project:, mute_config:) - # The resource will be in the following format: - # - # `projects/{project}/muteConfigs/{mute_config}` - # - # @param project [String] - # @param mute_config [String] - # - # @overload mute_config_path(organization:, location:, mute_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/muteConfigs/{mute_config}` - # - # @param organization [String] - # @param location [String] - # @param mute_config [String] - # - # @overload mute_config_path(folder:, location:, mute_config:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` - # - # @param folder [String] - # @param location [String] - # @param mute_config [String] - # - # @overload mute_config_path(project:, location:, mute_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/muteConfigs/{mute_config}` - # - # @param project [String] - # @param location [String] - # @param mute_config [String] - # - # @return [::String] - def mute_config_path **args - resources = { - "mute_config:organization" => (proc do |organization:, mute_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/muteConfigs/#{mute_config}" - end), - "folder:mute_config" => (proc do |folder:, mute_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/muteConfigs/#{mute_config}" - end), - "mute_config:project" => (proc do |project:, mute_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/muteConfigs/#{mute_config}" - end), - "location:mute_config:organization" => (proc do |organization:, location:, mute_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/muteConfigs/#{mute_config}" - end), - "folder:location:mute_config" => (proc do |folder:, location:, mute_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/muteConfigs/#{mute_config}" - end), - "location:mute_config:project" => (proc do |project:, location:, mute_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/muteConfigs/#{mute_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified NotificationConfig resource string. - # - # @overload notification_config_path(organization:, notification_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/notificationConfigs/{notification_config}` - # - # @param organization [String] - # @param notification_config [String] - # - # @overload notification_config_path(folder:, notification_config:) - # The resource will be in the following format: - # - # `folders/{folder}/notificationConfigs/{notification_config}` - # - # @param folder [String] - # @param notification_config [String] - # - # @overload notification_config_path(project:, notification_config:) - # The resource will be in the following format: - # - # `projects/{project}/notificationConfigs/{notification_config}` - # - # @param project [String] - # @param notification_config [String] - # - # @return [::String] - def notification_config_path **args - resources = { - "notification_config:organization" => (proc do |organization:, notification_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/notificationConfigs/#{notification_config}" - end), - "folder:notification_config" => (proc do |folder:, notification_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/notificationConfigs/#{notification_config}" - end), - "notification_config:project" => (proc do |project:, notification_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/notificationConfigs/#{notification_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationSettings resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/organizationSettings` - # - # @param organization [String] - # - # @return [::String] - def organization_settings_path organization: - "organizations/#{organization}/organizationSettings" - end - - ## - # Create a fully-qualified OrganizationSimulation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}` - # - # @param organization [String] - # @param simulation [String] - # - # @return [::String] - def organization_simulation_path organization:, simulation: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}" - end - - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(organization:, constraint_name:) - # The resource will be in the following format: - # - # `organizations/{organization}/policies/{constraint_name}` - # - # @param organization [String] - # @param constraint_name [String] - # - # @overload policy_path(folder:, constraint_name:) - # The resource will be in the following format: - # - # `folders/{folder}/policies/{constraint_name}` - # - # @param folder [String] - # @param constraint_name [String] - # - # @overload policy_path(project:, constraint_name:) - # The resource will be in the following format: - # - # `projects/{project}/policies/{constraint_name}` - # - # @param project [String] - # @param constraint_name [String] - # - # @return [::String] - def policy_path **args - resources = { - "constraint_name:organization" => (proc do |organization:, constraint_name:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/policies/#{constraint_name}" - end), - "constraint_name:folder" => (proc do |folder:, constraint_name:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/policies/#{constraint_name}" - end), - "constraint_name:project" => (proc do |project:, constraint_name:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/policies/#{constraint_name}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified ResourceValueConfig resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/resourceValueConfigs/{resource_value_config}` - # - # @param organization [String] - # @param resource_value_config [String] - # - # @return [::String] - def resource_value_config_path organization:, resource_value_config: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" - end - - ## - # Create a fully-qualified SecurityHealthAnalyticsCustomModule resource string. - # - # @overload security_health_analytics_custom_module_path(organization:, custom_module:) - # The resource will be in the following format: - # - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{custom_module}` - # - # @param organization [String] - # @param custom_module [String] - # - # @overload security_health_analytics_custom_module_path(folder:, custom_module:) - # The resource will be in the following format: - # - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{custom_module}` - # - # @param folder [String] - # @param custom_module [String] - # - # @overload security_health_analytics_custom_module_path(project:, custom_module:) - # The resource will be in the following format: - # - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{custom_module}` - # - # @param project [String] - # @param custom_module [String] - # - # @return [::String] - def security_health_analytics_custom_module_path **args - resources = { - "custom_module:organization" => (proc do |organization:, custom_module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/securityHealthAnalyticsSettings/customModules/#{custom_module}" - end), - "custom_module:folder" => (proc do |folder:, custom_module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/securityHealthAnalyticsSettings/customModules/#{custom_module}" - end), - "custom_module:project" => (proc do |project:, custom_module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/securityHealthAnalyticsSettings/customModules/#{custom_module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified SecurityHealthAnalyticsSettings resource string. - # - # @overload security_health_analytics_settings_path(organization:) - # The resource will be in the following format: - # - # `organizations/{organization}/securityHealthAnalyticsSettings` - # - # @param organization [String] - # - # @overload security_health_analytics_settings_path(folder:) - # The resource will be in the following format: - # - # `folders/{folder}/securityHealthAnalyticsSettings` - # - # @param folder [String] - # - # @overload security_health_analytics_settings_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/securityHealthAnalyticsSettings` - # - # @param project [String] - # - # @return [::String] - def security_health_analytics_settings_path **args - resources = { - "organization" => (proc do |organization:| - "organizations/#{organization}/securityHealthAnalyticsSettings" - end), - "folder" => (proc do |folder:| - "folders/#{folder}/securityHealthAnalyticsSettings" - end), - "project" => (proc do |project:| - "projects/#{project}/securityHealthAnalyticsSettings" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified SecurityMarks resource string. - # - # @overload security_marks_path(organization:, asset:) - # The resource will be in the following format: - # - # `organizations/{organization}/assets/{asset}/securityMarks` - # - # @param organization [String] - # @param asset [String] - # - # @overload security_marks_path(organization:, source:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(folder:, asset:) - # The resource will be in the following format: - # - # `folders/{folder}/assets/{asset}/securityMarks` - # - # @param folder [String] - # @param asset [String] - # - # @overload security_marks_path(project:, asset:) - # The resource will be in the following format: - # - # `projects/{project}/assets/{asset}/securityMarks` - # - # @param project [String] - # @param asset [String] - # - # @overload security_marks_path(folder:, source:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}/securityMarks` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(project:, source:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}/securityMarks` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # - # @return [::String] - def security_marks_path **args - resources = { - "asset:organization" => (proc do |organization:, asset:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/assets/#{asset}/securityMarks" - end), - "finding:organization:source" => (proc do |organization:, source:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "asset:folder" => (proc do |folder:, asset:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/assets/#{asset}/securityMarks" - end), - "asset:project" => (proc do |project:, asset:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/assets/#{asset}/securityMarks" - end), - "finding:folder:source" => (proc do |folder:, source:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "finding:project:source" => (proc do |project:, source:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Simulation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}` - # - # @param organization [String] - # @param simulation [String] - # - # @return [::String] - def simulation_path organization:, simulation: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}" - end - - ## - # Create a fully-qualified Source resource string. - # - # @overload source_path(organization:, source:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}` - # - # @param organization [String] - # @param source [String] - # - # @overload source_path(folder:, source:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}` - # - # @param folder [String] - # @param source [String] - # - # @overload source_path(project:, source:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}` - # - # @param project [String] - # @param source [String] - # - # @return [::String] - def source_path **args - resources = { - "organization:source" => (proc do |organization:, source:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}" - end), - "folder:source" => (proc do |folder:, source:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/sources/#{source}" - end), - "project:source" => (proc do |project:, source:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/sources/#{source}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified TableDataProfile resource string. - # - # @overload table_data_profile_path(project:, table_profile:) - # The resource will be in the following format: - # - # `projects/{project}/tableProfiles/{table_profile}` - # - # @param project [String] - # @param table_profile [String] - # - # @overload table_data_profile_path(project:, location:, table_profile:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tableProfiles/{table_profile}` - # - # @param project [String] - # @param location [String] - # @param table_profile [String] - # - # @return [::String] - def table_data_profile_path **args - resources = { - "project:table_profile" => (proc do |project:, table_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/tableProfiles/#{table_profile}" - end), - "location:project:table_profile" => (proc do |project:, location:, table_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tableProfiles/#{table_profile}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - ## - # Create a fully-qualified ValuedResource resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # - # @param organization [String] - # @param simulation [String] - # @param valued_resource [String] - # - # @return [::String] - def valued_resource_path organization:, simulation:, valued_resource: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}/valuedResources/#{valued_resource}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb deleted file mode 100644 index 9148bffe706d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center/v1/version" - -require "google/cloud/security_center/v1/security_center/credentials" -require "google/cloud/security_center/v1/security_center/paths" -require "google/cloud/security_center/v1/security_center/rest/operations" -require "google/cloud/security_center/v1/security_center/rest/client" - -module Google - module Cloud - module SecurityCenter - module V1 - ## - # V1 APIs for Security Center service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/security_center/v1/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - module SecurityCenter - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/security_center/v1/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb deleted file mode 100644 index f6a0a8b930bb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb +++ /dev/null @@ -1,6970 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycenter/v1/securitycenter_service_pb" -require "google/cloud/security_center/v1/security_center/rest/service_stub" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - module Rest - ## - # REST client for the SecurityCenter service. - # - # V1 APIs for Security Center service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_stub - - ## - # Configure the SecurityCenter Client class. - # - # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenter", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.create_source.timeout = 60.0 - - default_config.rpcs.create_finding.timeout = 60.0 - - default_config.rpcs.create_notification_config.timeout = 60.0 - - default_config.rpcs.delete_notification_config.timeout = 60.0 - - default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_notification_config.timeout = 60.0 - default_config.rpcs.get_notification_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_organization_settings.timeout = 60.0 - default_config.rpcs.get_organization_settings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_source.timeout = 60.0 - default_config.rpcs.get_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_assets.timeout = 480.0 - default_config.rpcs.group_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_findings.timeout = 480.0 - default_config.rpcs.group_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_assets.timeout = 480.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 480.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_notification_configs.timeout = 60.0 - default_config.rpcs.list_notification_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_sources.timeout = 60.0 - default_config.rpcs.list_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_asset_discovery.timeout = 60.0 - - default_config.rpcs.set_finding_state.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_finding.timeout = 60.0 - - default_config.rpcs.update_notification_config.timeout = 60.0 - - default_config.rpcs.update_organization_settings.timeout = 60.0 - - default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.update_source.timeout = 60.0 - - default_config.rpcs.update_security_marks.timeout = 480.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_stub.universe_domain - end - - ## - # Create a new SecurityCenter REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenter client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @security_center_stub = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @security_center_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_stub.logger - end - - # Service calls - - ## - # Kicks off an LRO to bulk mute findings for a parent based on a filter. The - # parent can be either an organization, folder or project. The findings - # matched by the filter will be muted after the LRO is done. - # - # @overload bulk_mute_findings(request, options = nil) - # Pass arguments to `bulk_mute_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil) - # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, at which bulk action needs to be applied. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param filter [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @param mute_annotation [::String] - # This can be a mute configuration name or any identifier for mute/unmute - # of findings based on the filter. - # @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new - # - # # Call the bulk_mute_findings method. - # result = client.bulk_mute_findings request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def bulk_mute_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.bulk_mute_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_mute_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.bulk_mute_findings request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - # given CRM parent, and also creates inherited - # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - # parent. These modules are enabled by default. - # - # @overload create_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil) - # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new custom module's parent. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. SecurityHealthAnalytics custom module to create. The provided - # name is ignored and reset with provided parent information and - # server-generated ID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the create_security_health_analytics_custom_module method. - # result = client.create_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def create_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_source(parent: nil, source: nil) - # Pass arguments to `create_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def create_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a finding. The corresponding source must exist for finding creation - # to succeed. - # - # @overload create_finding(request, options = nil) - # Pass arguments to `create_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_finding(parent: nil, finding_id: nil, finding: nil) - # Pass arguments to `create_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new finding's parent. Its format should be - # `organizations/[organization_id]/sources/[source_id]`. - # @param finding_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def create_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a mute config. - # - # @overload create_mute_config(request, options = nil) - # Pass arguments to `create_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) - # Pass arguments to `create_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] - # Required. The mute config being created. - # @param mute_config_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new - # - # # Call the create_mute_config method. - # result = client.create_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def create_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification config. - # - # @overload create_notification_config(request, options = nil) - # Pass arguments to `create_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) - # Pass arguments to `create_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param config_id [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def create_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing mute config. - # - # @overload delete_mute_config(request, options = nil) - # Pass arguments to `delete_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_mute_config(name: nil) - # Pass arguments to `delete_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to delete. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new - # - # # Call the delete_mute_config method. - # result = client.delete_mute_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification config. - # - # @overload delete_notification_config(request, options = nil) - # Pass arguments to `delete_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_notification_config(name: nil) - # Pass arguments to `delete_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to delete. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new - # - # # Call the delete_notification_config method. - # result = client.delete_notification_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - # descendants in the CRM hierarchy. This method is only supported for - # resident custom modules. - # - # @overload delete_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_security_health_analytics_custom_module(name: nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to delete. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the delete_security_health_analytics_custom_module method. - # result = client.delete_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the simulation by name or the latest simulation for the given - # organization. - # - # @overload get_simulation(request, options = nil) - # Pass arguments to `get_simulation` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_simulation(name: nil) - # Pass arguments to `get_simulation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Simulation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new - # - # # Call the get_simulation method. - # result = client.get_simulation request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. - # p result - # - def get_simulation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_simulation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_simulation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_simulation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the valued resource by name - # - # @overload get_valued_resource(request, options = nil) - # Pass arguments to `get_valued_resource` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_valued_resource(name: nil) - # Pass arguments to `get_valued_resource` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new - # - # # Call the get_valued_resource method. - # result = client.get_valued_resource request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. - # p result - # - def get_valued_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_valued_resource.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_valued_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_valued_resource request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a BigQuery export. - # - # @overload get_big_query_export(request, options = nil) - # Pass arguments to `get_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_big_query_export(name: nil) - # Pass arguments to `get_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the BigQuery export to retrieve. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new - # - # # Call the get_big_query_export method. - # result = client.get_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def get_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy on the specified Source. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a mute config. - # - # @overload get_mute_config(request, options = nil) - # Pass arguments to `get_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_mute_config(name: nil) - # Pass arguments to `get_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to retrieve. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new - # - # # Call the get_mute_config method. - # result = client.get_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def get_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a notification config. - # - # @overload get_notification_config(request, options = nil) - # Pass arguments to `get_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_notification_config(name: nil) - # Pass arguments to `get_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to get. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def get_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the settings for an organization. - # - # @overload get_organization_settings(request, options = nil) - # Pass arguments to `get_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_organization_settings(name: nil) - # Pass arguments to `get_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the organization to get organization settings for. Its - # format is `organizations/[organization_id]/organizationSettings`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new - # - # # Call the get_organization_settings method. - # result = client.get_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - # p result - # - def get_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_organization_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. - # - # @overload get_effective_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_effective_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the effective custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_effective_security_health_analytics_custom_module method. - # result = client.get_effective_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p result - # - def get_effective_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a SecurityHealthAnalyticsCustomModule. - # - # @overload get_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_security_health_analytics_custom_module method. - # result = client.get_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def get_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_source(name: nil) - # Pass arguments to `get_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def get_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization's assets and groups them by their specified - # properties. - # - # @overload group_assets(request, options = nil) - # Pass arguments to `group_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent to group the assets by. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param page_token [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new - # - # # Call the group_assets method. - # result = client.group_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - # p item - # end - # - def group_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.group_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.group_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.group_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.group_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_assets, "group_by_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings, - # /v1/folders/\\{folder_id}/sources/-/findings, - # /v1/projects/\\{project_id}/sources/-/findings - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source to groupBy. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, - # or `projects/{project_id}/sources/-` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping - # (including `state_change`). The string value should follow SQL syntax: - # comma separated list of fields. For example: "parent,resource_name". - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param page_token [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new - # - # # Call the group_findings method. - # result = client.group_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - # p item - # end - # - def group_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.group_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.group_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.group_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.group_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization's assets. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource that contains the assets. The - # value that you can specify on parent depends on the method in which you - # specify parent. You can specify one of the following values: - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_assets, "list_assets_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all resident SecurityHealthAnalyticsCustomModules under - # the given CRM parent and all of the parent’s CRM descendants. - # - # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list descendant custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_descendant_security_health_analytics_custom_modules method. - # result = client.list_descendant_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_descendant_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source the findings belong to. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To list across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-`, - # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists mute configs. - # - # @overload list_mute_configs(request, options = nil) - # Pass arguments to `list_mute_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mute_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new - # - # # Call the list_mute_configs method. - # result = client.list_mute_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. - # p item - # end - # - def list_mute_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_mute_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_mute_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_mute_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists notification configs. - # - # @overload list_notification_configs(request, options = nil) - # Pass arguments to `list_notification_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_notification_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is "organizations/[organization_id]", - # "folders/[folder_id]", or "projects/[project_id]". - # @param page_token [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new - # - # # Call the list_notification_configs method. - # result = client.list_notification_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p item - # end - # - def list_notification_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_notification_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_notification_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_notification_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - # given parent. This includes resident modules defined at the scope of the - # parent, and inherited modules, inherited from CRM ancestors. - # - # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list effective custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_effective_security_health_analytics_custom_modules method. - # result = client.list_effective_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_effective_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all SecurityHealthAnalyticsCustomModules for the given - # parent. This includes resident modules defined at the scope of the parent, - # and inherited modules, inherited from CRM ancestors. - # - # @overload list_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_security_health_analytics_custom_modules method. - # result = client.list_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sources belonging to an organization. - # - # @overload list_sources(request, options = nil) - # Pass arguments to `list_sources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param page_token [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new - # - # # Call the list_sources method. - # result = client.list_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. - # p item - # end - # - def list_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - # - # @overload run_asset_discovery(request, options = nil) - # Pass arguments to `run_asset_discovery` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_asset_discovery(parent: nil) - # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to run asset discovery for. Its format - # is `organizations/[organization_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new - # - # # Call the run_asset_discovery method. - # result = client.run_asset_discovery request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_asset_discovery request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_asset_discovery.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_asset_discovery.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.run_asset_discovery request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the state of a finding. - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_finding_state(name: nil, state: nil, start_time: nil) - # Pass arguments to `set_finding_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State] - # Required. The desired State of the finding. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The time at which the updated state takes effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def set_finding_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_finding_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_finding_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_finding_state request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the mute state of a finding. - # - # @overload set_mute(request, options = nil) - # Pass arguments to `set_mute` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_mute(name: nil, mute: nil) - # Pass arguments to `set_mute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # Required. The desired state of the Mute. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new - # - # # Call the set_mute method. - # result = client.set_mute request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def set_mute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_mute.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_mute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_mute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_mute request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified Source. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has on the specified source. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. - # - # @overload simulate_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [Relative - # Resource - # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # Example: `organizations/{organization_id}` - # @param custom_config [::Google::Cloud::SecurityCenter::V1::CustomConfig, ::Hash] - # Required. The custom configuration that you need to test. - # @param resource [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] - # Required. Resource data to simulate custom module against. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the simulate_security_health_analytics_custom_module method. - # result = client.simulate_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - # p result - # - def simulate_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.simulate_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates external system. This is for a given finding. - # - # @overload update_external_system(request, options = nil) - # Pass arguments to `update_external_system` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_external_system(external_system: nil, update_mask: nil) - # Pass arguments to `update_external_system` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash] - # Required. The external system resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new - # - # # Call the update_external_system method. - # result = client.update_external_system request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. - # p result - # - def update_external_system request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_external_system.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_external_system.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_external_system request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - # - # @overload update_finding(request, options = nil) - # Pass arguments to `update_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_finding(finding: nil, update_mask: nil) - # Pass arguments to `update_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def update_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a mute config. - # - # @overload update_mute_config(request, options = nil) - # Pass arguments to `update_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_mute_config(mute_config: nil, update_mask: nil) - # Pass arguments to `update_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] - # Required. The mute config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new - # - # # Call the update_mute_config method. - # result = client.update_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def update_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - # - # @overload update_notification_config(request, options = nil) - # Pass arguments to `update_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_notification_config(notification_config: nil, update_mask: nil) - # Pass arguments to `update_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] - # Required. The notification config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def update_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an organization's settings. - # - # @overload update_organization_settings(request, options = nil) - # Pass arguments to `update_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_organization_settings(organization_settings: nil, update_mask: nil) - # Pass arguments to `update_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash] - # Required. The organization settings resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new - # - # # Call the update_organization_settings method. - # result = client.update_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - # p result - # - def update_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_organization_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the SecurityHealthAnalyticsCustomModule under the given name based - # on the given update mask. Updating the enablement state is supported on - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name and custom - # config of a module is supported on resident modules only. - # - # @overload update_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil) - # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. The SecurityHealthAnalytics custom module to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. The only fields that can be updated are - # `enablement_state` and `custom_config`. If empty or set to the wildcard - # value `*`, both `enablement_state` and `custom_config` are updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the update_security_health_analytics_custom_module method. - # result = client.update_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def update_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_source(source: nil, update_mask: nil) - # Pass arguments to `update_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] - # Required. The source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def update_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates security marks. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) - # Pass arguments to `update_security_marks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash] - # Required. The security marks resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. Must be - # earlier or equal to the server time. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. - # p result - # - def update_security_marks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_security_marks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_marks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_security_marks request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a BigQuery export. - # - # @overload create_big_query_export(request, options = nil) - # Pass arguments to `create_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) - # Pass arguments to `create_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] - # Required. The BigQuery export being created. - # @param big_query_export_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new - # - # # Call the create_big_query_export method. - # result = client.create_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def create_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing BigQuery export. - # - # @overload delete_big_query_export(request, options = nil) - # Pass arguments to `delete_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_big_query_export(name: nil) - # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the BigQuery export to delete. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new - # - # # Call the delete_big_query_export method. - # result = client.delete_big_query_export request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a BigQuery export. - # - # @overload update_big_query_export(request, options = nil) - # Pass arguments to `update_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_big_query_export(big_query_export: nil, update_mask: nil) - # Pass arguments to `update_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] - # Required. The BigQuery export being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new - # - # # Call the update_big_query_export method. - # result = client.update_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def update_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - # - # @overload list_big_query_exports(request, options = nil) - # Pass arguments to `list_big_query_exports` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new - # - # # Call the list_big_query_exports method. - # result = client.list_big_query_exports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p item - # end - # - def list_big_query_exports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_big_query_exports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_big_query_exports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_big_query_exports request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident Event Threat Detection custom module at the scope of the - # given Resource Manager parent, and also creates inherited custom modules - # for all descendants of the given parent. These modules are enabled by - # default. - # - # @overload create_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil) - # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The new custom module's parent. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module to create. The - # event_threat_detection_custom_module.name will be ignored and server - # generated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new - # - # # Call the create_event_threat_detection_custom_module method. - # result = client.create_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def create_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified Event Threat Detection custom module and all of its - # descendants in the Resource Manager hierarchy. This method is only - # supported for resident custom modules. - # - # @overload delete_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_event_threat_detection_custom_module(name: nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to delete. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new - # - # # Call the delete_event_threat_detection_custom_module method. - # result = client.delete_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Event Threat Detection custom module. - # - # @overload get_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to get. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_event_threat_detection_custom_module method. - # result = client.get_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def get_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all resident Event Threat Detection custom modules under the - # given Resource Manager parent and its descendants. - # - # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDescendantEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_descendant_event_threat_detection_custom_modules method. - # result = client.list_descendant_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_descendant_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Event Threat Detection custom modules for the given - # Resource Manager parent. This includes resident modules defined at the - # scope of the parent along with modules inherited from ancestors. - # - # @overload list_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListEventThreatDetectionCustomModules` must match the call that provided - # the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_event_threat_detection_custom_modules method. - # result = client.list_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Event Threat Detection custom module with the given name based - # on the given update mask. Updating the enablement state is supported for - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name or - # configuration of a module is supported for resident modules only. The type - # of a module cannot be changed. - # - # @overload update_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil) - # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new - # - # # Call the update_event_threat_detection_custom_module method. - # result = client.update_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def update_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Validates the given Event Threat Detection custom module. - # - # @overload validate_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent to validate the Custom Module under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param raw_text [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @param type [::String] - # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new - # - # # Call the validate_event_threat_detection_custom_module method. - # result = client.validate_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. - # p result - # - def validate_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.validate_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an effective Event Threat Detection custom module at the given level. - # - # @overload get_effective_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_effective_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the effective Event Threat Detection custom - # module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_effective_event_threat_detection_custom_module method. - # result = client.get_effective_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - # p result - # - def get_effective_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all effective Event Threat Detection custom modules for the - # given parent. This includes resident modules defined at the scope of the - # parent along with modules inherited from its ancestors. - # - # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules for. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListEffectiveEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_effective_event_threat_detection_custom_modules method. - # result = client.list_effective_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - # p item - # end - # - def list_effective_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - # - # @overload batch_create_resource_value_configs(request, options = nil) - # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_create_resource_value_configs(parent: nil, requests: nil) - # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>] - # Required. The resource value configs to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new - # - # # Call the batch_create_resource_value_configs method. - # result = client.batch_create_resource_value_configs request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. - # p result - # - def batch_create_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.batch_create_resource_value_configs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a ResourceValueConfig. - # - # @overload delete_resource_value_config(request, options = nil) - # Pass arguments to `delete_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_resource_value_config(name: nil) - # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the ResourceValueConfig to delete - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new - # - # # Call the delete_resource_value_config method. - # result = client.delete_resource_value_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ResourceValueConfig. - # - # @overload get_resource_value_config(request, options = nil) - # Pass arguments to `get_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_resource_value_config(name: nil) - # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource value config to retrieve. Its format is - # `organizations/{organization}/resourceValueConfigs/{config_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new - # - # # Call the get_resource_value_config method. - # result = client.get_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p result - # - def get_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all ResourceValueConfigs. - # - # @overload list_resource_value_configs(request, options = nil) - # Pass arguments to `list_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @param page_size [::Integer] - # The number of results to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new - # - # # Call the list_resource_value_configs method. - # result = client.list_resource_value_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p item - # end - # - def list_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_resource_value_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing ResourceValueConfigs with new rules. - # - # @overload update_resource_value_config(request, options = nil) - # Pass arguments to `update_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) - # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash] - # Required. The resource value config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new - # - # # Call the update_resource_value_config method. - # result = client.update_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p result - # - def update_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the valued resources for a set of simulation results and filter. - # - # @overload list_valued_resources(request, options = nil) - # Pass arguments to `list_valued_resources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) - # Pass arguments to `list_valued_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list valued resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @param filter [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @param page_token [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param order_by [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # * `resource` - # - # * `display_name` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for - # example: `exposed_score DESC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new - # - # # Call the list_valued_resources method. - # result = client.list_valued_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. - # p item - # end - # - def list_valued_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_valued_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_valued_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_valued_resources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - # - # @overload list_attack_paths(request, options = nil) - # Pass arguments to `list_attack_paths` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_attack_paths` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @param filter [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @param page_token [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new - # - # # Call the list_attack_paths method. - # result = client.list_attack_paths request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. - # p item - # end - # - def list_attack_paths request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_attack_paths.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_attack_paths.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_attack_paths request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenter REST API. - # - # This class represents the configuration for SecurityCenter REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # bulk_mute_findings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.bulk_mute_findings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.bulk_mute_findings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SecurityCenter API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `bulk_mute_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_mute_findings - ## - # RPC-specific configuration for `create_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_security_health_analytics_custom_module - ## - # RPC-specific configuration for `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `create_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_finding - ## - # RPC-specific configuration for `create_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mute_config - ## - # RPC-specific configuration for `create_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_config - ## - # RPC-specific configuration for `delete_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mute_config - ## - # RPC-specific configuration for `delete_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_config - ## - # RPC-specific configuration for `delete_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_simulation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_simulation - ## - # RPC-specific configuration for `get_valued_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :get_valued_resource - ## - # RPC-specific configuration for `get_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :get_big_query_export - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `get_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mute_config - ## - # RPC-specific configuration for `get_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_config - ## - # RPC-specific configuration for `get_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_settings - ## - # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :group_assets - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_mute_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mute_configs - ## - # RPC-specific configuration for `list_notification_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_configs - ## - # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `run_asset_discovery` - # @return [::Gapic::Config::Method] - # - attr_reader :run_asset_discovery - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_mute` - # @return [::Gapic::Config::Method] - # - attr_reader :set_mute - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `simulate_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :simulate_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_external_system` - # @return [::Gapic::Config::Method] - # - attr_reader :update_external_system - ## - # RPC-specific configuration for `update_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_finding - ## - # RPC-specific configuration for `update_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mute_config - ## - # RPC-specific configuration for `update_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_config - ## - # RPC-specific configuration for `update_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_organization_settings - ## - # RPC-specific configuration for `update_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - ## - # RPC-specific configuration for `create_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :create_big_query_export - ## - # RPC-specific configuration for `delete_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_big_query_export - ## - # RPC-specific configuration for `update_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :update_big_query_export - ## - # RPC-specific configuration for `list_big_query_exports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_big_query_exports - ## - # RPC-specific configuration for `create_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_event_threat_detection_custom_module - ## - # RPC-specific configuration for `delete_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `list_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `update_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_event_threat_detection_custom_module - ## - # RPC-specific configuration for `validate_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :validate_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `batch_create_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_resource_value_configs - ## - # RPC-specific configuration for `delete_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_resource_value_config - ## - # RPC-specific configuration for `get_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_value_config - ## - # RPC-specific configuration for `list_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_value_configs - ## - # RPC-specific configuration for `update_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_resource_value_config - ## - # RPC-specific configuration for `list_valued_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_valued_resources - ## - # RPC-specific configuration for `list_attack_paths` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attack_paths - - # @private - def initialize parent_rpcs = nil - bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings - @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config - create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module - @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_config - create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding - @create_finding = ::Gapic::Config::Method.new create_finding_config - create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config - @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config - create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config - @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config - delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config - @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config - delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config - @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config - delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module - @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config - get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation - @get_simulation = ::Gapic::Config::Method.new get_simulation_config - get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource - @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config - get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export - @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config - @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config - get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config - @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config - get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings - @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config - get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module - @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config - get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module - @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_config - group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets - @group_assets = ::Gapic::Config::Method.new group_assets_config - group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings - @group_findings = ::Gapic::Config::Method.new group_findings_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules - @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs - @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config - list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs - @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config - list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules - @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config - list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules - @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_config - run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery - @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config - set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state - @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config - set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute - @set_mute = ::Gapic::Config::Method.new set_mute_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module - @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config - update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system - @update_external_system = ::Gapic::Config::Method.new update_external_system_config - update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding - @update_finding = ::Gapic::Config::Method.new update_finding_config - update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config - @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config - update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config - @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config - update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings - @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config - update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module - @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_config - update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks - @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config - create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export - @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config - delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export - @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config - update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export - @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config - list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports - @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config - create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module - @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config - delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module - @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config - get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module - @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config - list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules - @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config - list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules - @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config - update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module - @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config - validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module - @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config - get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module - @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config - list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules - @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config - batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs - @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config - delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config - @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config - get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config - @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config - list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs - @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config - update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config - @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config - list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources - @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config - list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths - @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb deleted file mode 100644 index dd74065d2724..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb +++ /dev/null @@ -1,926 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecurityCenter Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb deleted file mode 100644 index 6b84754bb951..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb +++ /dev/null @@ -1,4766 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/securitycenter/v1/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - module Rest - ## - # REST service stub for the SecurityCenter service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the bulk_mute_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def bulk_mute_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_mute_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "bulk_mute_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def create_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # A result object deserialized from the server's reply - def create_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # A result object deserialized from the server's reply - def create_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # A result object deserialized from the server's reply - def create_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # A result object deserialized from the server's reply - def create_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_simulation REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Simulation] - # A result object deserialized from the server's reply - def get_simulation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_simulation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_simulation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Simulation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_valued_resource REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # A result object deserialized from the server's reply - def get_valued_resource request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_valued_resource_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_valued_resource", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ValuedResource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # A result object deserialized from the server's reply - def get_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # A result object deserialized from the server's reply - def get_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # A result object deserialized from the server's reply - def get_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # A result object deserialized from the server's reply - def get_organization_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_organization_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_effective_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def get_effective_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_effective_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def get_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # A result object deserialized from the server's reply - def get_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the group_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse] - # A result object deserialized from the server's reply - def group_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_group_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "group_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse] - # A result object deserialized from the server's reply - def group_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "group_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse] - # A result object deserialized from the server's reply - def list_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_descendant_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_descendant_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_descendant_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse] - # A result object deserialized from the server's reply - def list_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_mute_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse] - # A result object deserialized from the server's reply - def list_mute_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_mute_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_mute_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse] - # A result object deserialized from the server's reply - def list_notification_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_notification_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_effective_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_effective_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_effective_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListSourcesResponse] - # A result object deserialized from the server's reply - def list_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the run_asset_discovery REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def run_asset_discovery request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_asset_discovery_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_asset_discovery", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # A result object deserialized from the server's reply - def set_finding_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_finding_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_mute REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetMuteRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # A result object deserialized from the server's reply - def set_mute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_mute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_mute", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the simulate_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # A result object deserialized from the server's reply - def simulate_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_simulate_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "simulate_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_external_system REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # A result object deserialized from the server's reply - def update_external_system request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_external_system_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_external_system", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # A result object deserialized from the server's reply - def update_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # A result object deserialized from the server's reply - def update_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # A result object deserialized from the server's reply - def update_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # A result object deserialized from the server's reply - def update_organization_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_organization_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_organization_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def update_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # A result object deserialized from the server's reply - def update_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # A result object deserialized from the server's reply - def update_security_marks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_security_marks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # A result object deserialized from the server's reply - def create_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # A result object deserialized from the server's reply - def update_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_big_query_exports REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse] - # A result object deserialized from the server's reply - def list_big_query_exports request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_big_query_exports_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_big_query_exports", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def create_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def get_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_descendant_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_descendant_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_descendant_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def update_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the validate_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # A result object deserialized from the server's reply - def validate_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_validate_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "validate_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_effective_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def get_effective_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_effective_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_effective_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_effective_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_effective_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_create_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # A result object deserialized from the server's reply - def batch_create_resource_value_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_resource_value_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_create_resource_value_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # A result object deserialized from the server's reply - def get_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse] - # A result object deserialized from the server's reply - def list_resource_value_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_value_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_resource_value_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # A result object deserialized from the server's reply - def update_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_valued_resources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse] - # A result object deserialized from the server's reply - def list_valued_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_valued_resources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_valued_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_attack_paths REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse] - # A result object deserialized from the server's reply - def list_attack_paths request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_attack_paths_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_attack_paths", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_mute_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_mute_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/sources", - body: "source", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings", - body: "finding", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_simulation REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_simulation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_valued_resource REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_valued_resource_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_organization_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/organizationSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_effective_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_effective_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the group_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_group_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_group_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_descendant_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findings", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findings", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_mute_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_mute_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/muteConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/muteConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/muteConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_notification_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_effective_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_effective_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/sources", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/sources", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/sources", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_asset_discovery REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_asset_discovery_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets:runDiscovery", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_finding_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_mute REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetMuteRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_mute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the simulate_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_simulate_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules:simulate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules:simulate", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules:simulate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_external_system REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_external_system_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_organization_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{organization_settings.name}", - body: "organization_settings", - matches: [ - ["organization_settings.name", %r{^organizations/[^/]+/organizationSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{source.name}", - body: "source", - matches: [ - ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_security_marks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_big_query_exports REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_big_query_exports_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_descendant_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the validate_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_validate_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:validateCustomModule", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:validateCustomModule", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:validateCustomModule", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_effective_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_effective_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_effective_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_effective_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_create_resource_value_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/resourceValueConfigs:batchCreate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_resource_value_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/resourceValueConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{resource_value_config.name}", - body: "resource_value_config", - matches: [ - ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_valued_resources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_valued_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attack_paths REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_attack_paths_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb deleted file mode 100644 index 1c19ab7f4c05..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb deleted file mode 100644 index 65cfc17f9bbb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/access.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/securitycenter/v1/access.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x89\x03\n\x06\x41\x63\x63\x65ss\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x11\n\tcaller_ip\x18\x02 \x01(\t\x12\x42\n\rcaller_ip_geo\x18\x03 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Geolocation\x12\x19\n\x11user_agent_family\x18\x04 \x01(\t\x12\x12\n\nuser_agent\x18\x0c \x01(\t\x12\x14\n\x0cservice_name\x18\x05 \x01(\t\x12\x13\n\x0bmethod_name\x18\x06 \x01(\t\x12\x19\n\x11principal_subject\x18\x07 \x01(\t\x12 \n\x18service_account_key_name\x18\x08 \x01(\t\x12\x65\n\x1fservice_account_delegation_info\x18\t \x03(\x0b\x32<.google.cloud.securitycenter.v1.ServiceAccountDelegationInfo\x12\x11\n\tuser_name\x18\x0b \x01(\t\"R\n\x1cServiceAccountDelegationInfo\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x19\n\x11principal_subject\x18\x02 \x01(\t\"\"\n\x0bGeolocation\x12\x13\n\x0bregion_code\x18\x01 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v1B\x0b\x41\x63\x63\x65ssProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Access").msgclass - ServiceAccountDelegationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ServiceAccountDelegationInfo").msgclass - Geolocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Geolocation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb deleted file mode 100644 index 716a87e5400a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/application.proto - -require 'google/protobuf' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/application.proto\x12\x1egoogle.cloud.securitycenter.v1\"1\n\x0b\x41pplication\x12\x10\n\x08\x62\x61se_uri\x18\x01 \x01(\t\x12\x10\n\x08\x66ull_uri\x18\x02 \x01(\tB\xea\x01\n\"com.google.cloud.securitycenter.v1B\x10\x41pplicationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Application").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb deleted file mode 100644 index 7bbe0a82baf9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/asset.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1/folder_pb' -require 'google/cloud/securitycenter/v1/security_marks_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/securitycenter/v1/asset.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/folder.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb8\x08\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x62\n\x1asecurity_center_properties\x18\x02 \x01(\x0b\x32>.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties\x12Z\n\x13resource_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Asset.ResourcePropertiesEntry\x12\x45\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarks\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\niam_policy\x18\x0b \x01(\x0b\x32/.google.cloud.securitycenter.v1.Asset.IamPolicy\x12\x16\n\x0e\x63\x61nonical_name\x18\r \x01(\t\x1a\xb9\x02\n\x18SecurityCenterProperties\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x17\n\x0fresource_parent\x18\x03 \x01(\t\x12\x18\n\x10resource_project\x18\x04 \x01(\t\x12\x17\n\x0fresource_owners\x18\x05 \x03(\t\x12\x1d\n\x15resource_display_name\x18\x06 \x01(\t\x12$\n\x1cresource_parent_display_name\x18\x07 \x01(\t\x12%\n\x1dresource_project_display_name\x18\x08 \x01(\t\x12\x37\n\x07\x66olders\x18\n \x03(\x0b\x32&.google.cloud.securitycenter.v1.Folder\x1a \n\tIamPolicy\x12\x13\n\x0bpolicy_blob\x18\x01 \x01(\t\x1aQ\n\x17ResourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01:\xa9\x01\xea\x41\xa5\x01\n#securitycenter.googleapis.com/Asset\x12+organizations/{organization}/assets/{asset}\x12\x1f\x66olders/{folder}/assets/{asset}\x12!projects/{project}/assets/{asset}*\x06\x61ssets2\x05\x61ssetB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset").msgclass - Asset::SecurityCenterProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.SecurityCenterProperties").msgclass - Asset::IamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.IamPolicy").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb deleted file mode 100644 index 874c9ce74d43..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/attack_exposure.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/attack_exposure.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8a\x03\n\x0e\x41ttackExposure\x12\r\n\x05score\x18\x01 \x01(\x01\x12;\n\x17latest_calculation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16\x61ttack_exposure_result\x18\x03 \x01(\t\x12\x43\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.AttackExposure.State\x12*\n\"exposed_high_value_resources_count\x18\x05 \x01(\x05\x12,\n$exposed_medium_value_resources_count\x18\x06 \x01(\x05\x12)\n!exposed_low_value_resources_count\x18\x07 \x01(\x05\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCALCULATED\x10\x01\x12\x12\n\x0eNOT_CALCULATED\x10\x02\x42\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x41ttackExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - AttackExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackExposure").msgclass - AttackExposure::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackExposure.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb deleted file mode 100644 index 9a0cc9065451..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/attack_path.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/attack_path.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xe7\t\n\nAttackPath\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\npath_nodes\x18\x02 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1.AttackPath.AttackPathNode\x12H\n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge\x1a\xbd\x06\n\x0e\x41ttackPathNode\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12p\n\x13\x61ssociated_findings\x18\x04 \x03(\x0b\x32S.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding\x12\x0c\n\x04uuid\x18\x05 \x01(\t\x12^\n\x0c\x61ttack_steps\x18\x06 \x03(\x0b\x32H.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode\x1a^\n\x19PathNodeAssociatedFinding\x12\x19\n\x11\x63\x61nonical_finding\x18\x01 \x01(\t\x12\x18\n\x10\x66inding_category\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x1a\xb0\x02\n\x0e\x41ttackStepNode\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12P\n\x04type\x18\x02 \x01(\x0e\x32\x42.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x64\n\x06labels\x18\x04 \x03(\x0b\x32T.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rNODE_TYPE_AND\x10\x01\x12\x10\n\x0cNODE_TYPE_OR\x10\x02\x12\x15\n\x11NODE_TYPE_DEFENSE\x10\x03\x12\x16\n\x12NODE_TYPE_ATTACKER\x10\x04\x1a\x35\n\x0e\x41ttackPathEdge\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t:\xba\x01\xea\x41\xb6\x01\n(securitycenter.googleapis.com/AttackPath\x12qorganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}*\x0b\x61ttackPaths2\nattackPathB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x41ttackPathProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - AttackPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath").msgclass - AttackPath::AttackPathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode").msgclass - AttackPath::AttackPathNode::PathNodeAssociatedFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding").msgclass - AttackPath::AttackPathNode::AttackStepNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode").msgclass - AttackPath::AttackPathNode::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType").enummodule - AttackPath::AttackPathEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathEdge").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb deleted file mode 100644 index 0e004d7fc559..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/backup_disaster_recovery.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x86\x02\n\x16\x42\x61\x63kupDisasterRecovery\x12\x17\n\x0f\x62\x61\x63kup_template\x18\x01 \x01(\t\x12\x10\n\x08policies\x18\x02 \x03(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x14\n\x0c\x61pplications\x18\x04 \x03(\t\x12\x14\n\x0cstorage_pool\x18\x05 \x01(\t\x12\x16\n\x0epolicy_options\x18\x06 \x03(\t\x12\x0f\n\x07profile\x18\x07 \x01(\t\x12\x11\n\tappliance\x18\x08 \x01(\t\x12\x13\n\x0b\x62\x61\x63kup_type\x18\t \x01(\t\x12\x36\n\x12\x62\x61\x63kup_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xf5\x01\n\"com.google.cloud.securitycenter.v1B\x1b\x42\x61\x63kupDisasterRecoveryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - BackupDisasterRecovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BackupDisasterRecovery").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb deleted file mode 100644 index dd2586de3962..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/bigquery_export.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/bigquery_export.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xde\x03\n\x0e\x42igQueryExport\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x04 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tprincipal\x18\x08 \x01(\tB\x03\xe0\x41\x03:\xe2\x01\xea\x41\xde\x01\n,securitycenter.googleapis.com/BigQueryExport\x12\x35organizations/{organization}/bigQueryExports/{export}\x12)folders/{folder}/bigQueryExports/{export}\x12+projects/{project}/bigQueryExports/{export}*\x0f\x62igQueryExports2\x0e\x62igQueryExportB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x42igQueryExportProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BigQueryExport").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb deleted file mode 100644 index bcdd9d0754f3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/chokepoint.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v1\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Chokepoint").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb deleted file mode 100644 index 5d2aca35a2a8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/cloud_armor.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/cloud_armor.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1egoogle/protobuf/duration.proto\"\xde\x02\n\nCloudArmor\x12G\n\x0fsecurity_policy\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.SecurityPolicy\x12:\n\x08requests\x18\x02 \x01(\x0b\x32(.google.cloud.securitycenter.v1.Requests\x12O\n\x13\x61\x64\x61ptive_protection\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.AdaptiveProtection\x12\x36\n\x06\x61ttack\x18\x04 \x01(\x0b\x32&.google.cloud.securitycenter.v1.Attack\x12\x15\n\rthreat_vector\x18\x05 \x01(\t\x12+\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"=\n\x0eSecurityPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07preview\x18\x03 \x01(\x08\"j\n\x08Requests\x12\r\n\x05ratio\x18\x01 \x01(\x01\x12\x1a\n\x12short_term_allowed\x18\x02 \x01(\x05\x12\x19\n\x11long_term_allowed\x18\x03 \x01(\x05\x12\x18\n\x10long_term_denied\x18\x04 \x01(\x05\"(\n\x12\x41\x64\x61ptiveProtection\x12\x12\n\nconfidence\x18\x01 \x01(\x01\"H\n\x06\x41ttack\x12\x12\n\nvolume_pps\x18\x01 \x01(\x05\x12\x12\n\nvolume_bps\x18\x02 \x01(\x05\x12\x16\n\x0e\x63lassification\x18\x03 \x01(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43loudArmorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - CloudArmor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudArmor").msgclass - SecurityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SecurityPolicy").msgclass - Requests = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Requests").msgclass - AdaptiveProtection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AdaptiveProtection").msgclass - Attack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Attack").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb deleted file mode 100644 index 96dd00769215..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xb2\x02\n\x13\x43loudDlpDataProfile\x12>\n\x0c\x64\x61ta_profile\x18\x01 \x01(\tB(\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\x12S\n\x0bparent_type\x18\x02 \x01(\x0e\x32>.google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType\x12<\n\ninfo_types\x18\x03 \x03(\x0b\x32(.google.cloud.securitycenter.v1.InfoType\"H\n\nParentType\x12\x1b\n\x17PARENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\"v\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12K\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.SensitivityScore\"\x8a\x02\n\x10SensitivityScore\x12U\n\x05score\x18\x01 \x01(\x0e\x32\x46.google.cloud.securitycenter.v1.SensitivityScore.SensitivityScoreLevel\"\x9e\x01\n\x15SensitivityScoreLevel\x12\'\n#SENSITIVITY_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x13\n\x0fSENSITIVITY_LOW\x10\n\x12\x17\n\x13SENSITIVITY_UNKNOWN\x10\x0c\x12\x18\n\x14SENSITIVITY_MODERATE\x10\x14\x12\x14\n\x10SENSITIVITY_HIGH\x10\x1e\x42\x94\x03\n\"com.google.cloud.securitycenter.v1B\x18\x43loudDlpDataProfileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41\x9e\x01\n#dlp.googleapis.com/TableDataProfile\x12\x30projects/{project}/tableProfiles/{table_profile}\x12\x45projects/{project}/locations/{location}/tableProfiles/{table_profile}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - CloudDlpDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpDataProfile").msgclass - CloudDlpDataProfile::ParentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType").enummodule - InfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.InfoType").msgclass - SensitivityScore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SensitivityScore").msgclass - SensitivityScore::SensitivityScoreLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SensitivityScore.SensitivityScoreLevel").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb deleted file mode 100644 index 6908abf33a2c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/cloud_dlp_inspection.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n9google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\x88\x01\n\x12\x43loudDlpInspection\x12\x33\n\x0binspect_job\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x11\n\tinfo_type\x18\x02 \x01(\t\x12\x17\n\x0finfo_type_count\x18\x03 \x01(\x03\x12\x11\n\tfull_scan\x18\x04 \x01(\x08\x42\xf0\x02\n\"com.google.cloud.securitycenter.v1B\x17\x43loudDlpInspectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - CloudDlpInspection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpInspection").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb deleted file mode 100644 index db60def7251c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/compliance.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/compliance.proto\x12\x1egoogle.cloud.securitycenter.v1\"<\n\nCompliance\x12\x10\n\x08standard\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0b\n\x03ids\x18\x03 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43omplianceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Compliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Compliance").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb deleted file mode 100644 index eb0b9ee52115..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/connection.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/connection.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x81\x02\n\nConnection\x12\x16\n\x0e\x64\x65stination_ip\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_port\x18\x02 \x01(\x05\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x45\n\x08protocol\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v1.Connection.Protocol\"R\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x08\n\x04ICMP\x10\x01\x12\x07\n\x03TCP\x10\x06\x12\x07\n\x03UDP\x10\x11\x12\x07\n\x03GRE\x10/\x12\x07\n\x03\x45SP\x10\x32\x42\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43onnectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Connection").msgclass - Connection::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Connection.Protocol").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb deleted file mode 100644 index 82b5fea649e6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/contact_details.proto - -require 'google/protobuf' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/contact_details.proto\x12\x1egoogle.cloud.securitycenter.v1\"K\n\x0e\x43ontactDetails\x12\x39\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Contact\"\x18\n\x07\x43ontact\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x43ontactDetailsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ContactDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ContactDetails").msgclass - Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Contact").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb deleted file mode 100644 index 114721a06e25..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/container.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v1/label_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/securitycenter/v1/container.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a*google/cloud/securitycenter/v1/label.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x01\n\tContainer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08image_id\x18\x03 \x01(\t\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.securitycenter.v1.Label\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe8\x01\n\"com.google.cloud.securitycenter.v1B\x0e\x43ontainerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Container").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb deleted file mode 100644 index 14a2d4b30426..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/database.proto - -require 'google/protobuf' - - -descriptor_data = "\n-google/cloud/securitycenter/v1/database.proto\x12\x1egoogle.cloud.securitycenter.v1\"s\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x11\n\tuser_name\x18\x03 \x01(\t\x12\r\n\x05query\x18\x04 \x01(\t\x12\x10\n\x08grantees\x18\x05 \x03(\t\x12\x0f\n\x07version\x18\x06 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rDatabaseProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Database").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb deleted file mode 100644 index b7cff88c9276..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\nSgoogle/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xc9\x05\n)EffectiveEventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12,\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12x\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32Y.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\xc8\x02\xea\x41\xc4\x02\nGsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12Yorganizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\x12Mfolders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\x12Oprojects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}B\x88\x02\n\"com.google.cloud.securitycenter.v1B.EffectiveEventThreatDetectionCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - EffectiveEventThreatDetectionCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule").msgclass - EffectiveEventThreatDetectionCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb deleted file mode 100644 index 398d13b78b09..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb' - - -descriptor_data = "\nVgoogle/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aLgoogle/cloud/securitycenter/v1/security_health_analytics_custom_config.proto\"\xfd\x05\n,EffectiveSecurityHealthAnalyticsCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12H\n\rcustom_config\x18\x02 \x01(\x0b\x32,.google.cloud.securitycenter.v1.CustomConfigB\x03\xe0\x41\x03\x12{\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32\\.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\x87\x03\xea\x41\x83\x03\nJsecuritycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\x12morganizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}\x12\x61\x66olders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}\x12\x63projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}B\x8b\x02\n\"com.google.cloud.securitycenter.v1B1EffectiveSecurityHealthAnalyticsCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - EffectiveSecurityHealthAnalyticsCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule").msgclass - EffectiveSecurityHealthAnalyticsCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb deleted file mode 100644 index 2b24bf1f56c4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nIgoogle/cloud/securitycenter/v1/event_threat_detection_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x06\n EventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\'\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12_\n\x0f\x61ncestor_module\x18\x03 \x01(\tBF\xe0\x41\x03\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12j\n\x10\x65nablement_state\x18\x04 \x01(\x0e\x32P.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState\x12\x0c\n\x04type\x18\x05 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\t \x01(\tB\x03\xe0\x41\x03\"]\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tINHERITED\x10\x03:\xa4\x02\xea\x41\xa0\x02\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12Porganizations/{organization}/eventThreatDetectionSettings/customModules/{module}\x12\x44\x66olders/{folder}/eventThreatDetectionSettings/customModules/{module}\x12\x46projects/{project}/eventThreatDetectionSettings/customModules/{module}B\xff\x01\n\"com.google.cloud.securitycenter.v1B%EventThreatDetectionCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - EventThreatDetectionCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EventThreatDetectionCustomModule").msgclass - EventThreatDetectionCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb deleted file mode 100644 index d900e952525b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto - -require 'google/protobuf' - - -descriptor_data = "\n[google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto\x12\x1egoogle.cloud.securitycenter.v1\"k\n\x1c\x43ustomModuleValidationErrors\x12K\n\x06\x65rrors\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v1.CustomModuleValidationError\"\xd2\x01\n\x1b\x43ustomModuleValidationError\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12<\n\x05start\x18\x03 \x01(\x0b\x32(.google.cloud.securitycenter.v1.PositionH\x00\x88\x01\x01\x12:\n\x03\x65nd\x18\x04 \x01(\x0b\x32(.google.cloud.securitycenter.v1.PositionH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"6\n\x08Position\x12\x13\n\x0bline_number\x18\x01 \x01(\x05\x12\x15\n\rcolumn_number\x18\x02 \x01(\x05\x42\x8f\x02\n\"com.google.cloud.securitycenter.v1B5EventThreatDetectionCustomModuleValidationErrorsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - CustomModuleValidationErrors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CustomModuleValidationErrors").msgclass - CustomModuleValidationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CustomModuleValidationError").msgclass - Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Position").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb deleted file mode 100644 index f444b911b8fd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/exfiltration.proto - -require 'google/protobuf' - - -descriptor_data = "\n1google/cloud/securitycenter/v1/exfiltration.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xaf\x01\n\x0c\x45xfiltration\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v1.ExfilResource\x12>\n\x07targets\x18\x02 \x03(\x0b\x32-.google.cloud.securitycenter.v1.ExfilResource\x12\x1f\n\x17total_exfiltrated_bytes\x18\x03 \x01(\x03\"1\n\rExfilResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ncomponents\x18\x02 \x03(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x45xfiltrationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Exfiltration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Exfiltration").msgclass - ExfilResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExfilResource").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb deleted file mode 100644 index 637251a7df01..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/external_exposure.proto - -require 'google/protobuf' - -require 'google/api/field_info_pb' - - -descriptor_data = "\n6google/cloud/securitycenter/v1/external_exposure.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1bgoogle/api/field_info.proto\"\xed\x02\n\x10\x45xternalExposure\x12$\n\x12private_ip_address\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x14\n\x0cprivate_port\x18\x02 \x01(\t\x12\x17\n\x0f\x65xposed_service\x18\x03 \x01(\t\x12#\n\x11public_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x13\n\x0bpublic_port\x18\x05 \x01(\t\x12\x18\n\x10\x65xposed_endpoint\x18\x06 \x01(\t\x12%\n\x1dload_balancer_firewall_policy\x18\x07 \x01(\t\x12\x1f\n\x17service_firewall_policy\x18\x08 \x01(\t\x12\x17\n\x0f\x66orwarding_rule\x18\t \x01(\t\x12\x17\n\x0f\x62\x61\x63kend_service\x18\n \x01(\t\x12\x16\n\x0einstance_group\x18\x0b \x01(\t\x12\x1e\n\x16network_endpoint_group\x18\x0c \x01(\tB\xef\x01\n\"com.google.cloud.securitycenter.v1B\x15\x45xternalExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ExternalExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalExposure").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb deleted file mode 100644 index 6b43636594f3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/external_system.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/external_system.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x07\n\x0e\x45xternalSystem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tassignees\x18\x02 \x03(\t\x12\x14\n\x0c\x65xternal_uid\x18\x03 \x01(\t\x12\x0e\n\x06status\x18\x04 \x01(\t\x12?\n\x1b\x65xternal_system_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x63\x61se_uri\x18\x06 \x01(\t\x12\x15\n\rcase_priority\x18\x07 \x01(\t\x12,\n\x08\x63\x61se_sla\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10\x63\x61se_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63\x61se_close_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x0bticket_info\x18\x08 \x01(\x0b\x32\x39.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo\x1a\x8d\x01\n\nTicketInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0b\n\x03uri\x18\x04 \x01(\t\x12\x0e\n\x06status\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xe6\x02\xea\x41\xe2\x02\n,securitycenter.googleapis.com/ExternalSystem\x12\x61organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}*\x0f\x65xternalSystems2\x0e\x65xternalSystemB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x45xternalSystemProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ExternalSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalSystem").msgclass - ExternalSystem::TicketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalSystem.TicketInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb deleted file mode 100644 index 1b28cd79a63b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/file.proto - -require 'google/protobuf' - - -descriptor_data = "\n)google/cloud/securitycenter/v1/file.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xf0\x01\n\x04\x46ile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12\x0e\n\x06sha256\x18\x03 \x01(\t\x12\x13\n\x0bhashed_size\x18\x04 \x01(\x03\x12\x18\n\x10partially_hashed\x18\x05 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x06 \x01(\t\x12@\n\tdisk_path\x18\x07 \x01(\x0b\x32-.google.cloud.securitycenter.v1.File.DiskPath\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v1B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.File").msgclass - File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.File.DiskPath").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb deleted file mode 100644 index d83c4821a3ab..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/finding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1/access_pb' -require 'google/cloud/securitycenter/v1/agent_pb' -require 'google/cloud/securitycenter/v1/agent_anomaly_pb' -require 'google/cloud/securitycenter/v1/agent_session_pb' -require 'google/cloud/securitycenter/v1/application_pb' -require 'google/cloud/securitycenter/v1/attack_exposure_pb' -require 'google/cloud/securitycenter/v1/backup_disaster_recovery_pb' -require 'google/cloud/securitycenter/v1/chokepoint_pb' -require 'google/cloud/securitycenter/v1/cloud_armor_pb' -require 'google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb' -require 'google/cloud/securitycenter/v1/cloud_dlp_inspection_pb' -require 'google/cloud/securitycenter/v1/compliance_pb' -require 'google/cloud/securitycenter/v1/connection_pb' -require 'google/cloud/securitycenter/v1/contact_details_pb' -require 'google/cloud/securitycenter/v1/container_pb' -require 'google/cloud/securitycenter/v1/database_pb' -require 'google/cloud/securitycenter/v1/exfiltration_pb' -require 'google/cloud/securitycenter/v1/external_exposure_pb' -require 'google/cloud/securitycenter/v1/external_system_pb' -require 'google/cloud/securitycenter/v1/file_pb' -require 'google/cloud/securitycenter/v1/group_membership_pb' -require 'google/cloud/securitycenter/v1/iam_binding_pb' -require 'google/cloud/securitycenter/v1/indicator_pb' -require 'google/cloud/securitycenter/v1/kernel_rootkit_pb' -require 'google/cloud/securitycenter/v1/kubernetes_pb' -require 'google/cloud/securitycenter/v1/load_balancer_pb' -require 'google/cloud/securitycenter/v1/log_entry_pb' -require 'google/cloud/securitycenter/v1/mitre_attack_pb' -require 'google/cloud/securitycenter/v1/notebook_pb' -require 'google/cloud/securitycenter/v1/org_policy_pb' -require 'google/cloud/securitycenter/v1/process_pb' -require 'google/cloud/securitycenter/v1/security_marks_pb' -require 'google/cloud/securitycenter/v1/security_posture_pb' -require 'google/cloud/securitycenter/v1/toxic_combination_pb' -require 'google/cloud/securitycenter/v1/vulnerability_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/securitycenter/v1/finding.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/access.proto\x1a*google/cloud/securitycenter/v1/agent.proto\x1a\x32google/cloud/securitycenter/v1/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v1/agent_session.proto\x1a\x30google/cloud/securitycenter/v1/application.proto\x1a\x34google/cloud/securitycenter/v1/attack_exposure.proto\x1a=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v1/chokepoint.proto\x1a\x30google/cloud/securitycenter/v1/cloud_armor.proto\x1a;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v1/compliance.proto\x1a/google/cloud/securitycenter/v1/connection.proto\x1a\x34google/cloud/securitycenter/v1/contact_details.proto\x1a.google/cloud/securitycenter/v1/container.proto\x1a-google/cloud/securitycenter/v1/database.proto\x1a\x31google/cloud/securitycenter/v1/exfiltration.proto\x1a\x36google/cloud/securitycenter/v1/external_exposure.proto\x1a\x34google/cloud/securitycenter/v1/external_system.proto\x1a)google/cloud/securitycenter/v1/file.proto\x1a\x35google/cloud/securitycenter/v1/group_membership.proto\x1a\x30google/cloud/securitycenter/v1/iam_binding.proto\x1a.google/cloud/securitycenter/v1/indicator.proto\x1a\x33google/cloud/securitycenter/v1/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v1/kubernetes.proto\x1a\x32google/cloud/securitycenter/v1/load_balancer.proto\x1a.google/cloud/securitycenter/v1/log_entry.proto\x1a\x31google/cloud/securitycenter/v1/mitre_attack.proto\x1a-google/cloud/securitycenter/v1/notebook.proto\x1a/google/cloud/securitycenter/v1/org_policy.proto\x1a,google/cloud/securitycenter/v1/process.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x35google/cloud/securitycenter/v1/security_posture.proto\x1a\x36google/cloud/securitycenter/v1/toxic_combination.proto\x1a\x32google/cloud/securitycenter/v1/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99$\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.State\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x14\n\x0c\x65xternal_uri\x18\x06 \x01(\t\x12X\n\x11source_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x08severity\x18\x0c \x01(\x0e\x32\x30.google.cloud.securitycenter.v1.Finding.Severity\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12K\n\rfinding_class\x18\x11 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Finding.FindingClass\x12<\n\tindicator\x18\x12 \x01(\x0b\x32).google.cloud.securitycenter.v1.Indicator\x12\x44\n\rvulnerability\x18\x14 \x01(\x0b\x32-.google.cloud.securitycenter.v1.Vulnerability\x12\x39\n\x10mute_update_time\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x16 \x03(\x0b\x32<.google.cloud.securitycenter.v1.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x19 \x01(\x0b\x32+.google.cloud.securitycenter.v1.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x1a \x01(\x0b\x32&.google.cloud.securitycenter.v1.Access\x12?\n\x0b\x63onnections\x18\x1f \x03(\x0b\x32*.google.cloud.securitycenter.v1.Connection\x12\x16\n\x0emute_initiator\x18\x1c \x01(\t\x12H\n\tmute_info\x18= \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.Finding.MuteInfoB\x03\xe0\x41\x03\x12:\n\tprocesses\x18\x1e \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Process\x12L\n\x08\x63ontacts\x18! \x03(\x0b\x32\x35.google.cloud.securitycenter.v1.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\" \x03(\x0b\x32*.google.cloud.securitycenter.v1.Compliance\x12 \n\x13parent_display_name\x18$ \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18% \x01(\t\x12\x42\n\x0c\x65xfiltration\x18& \x01(\x0b\x32,.google.cloud.securitycenter.v1.Exfiltration\x12@\n\x0ciam_bindings\x18\' \x03(\x0b\x32*.google.cloud.securitycenter.v1.IamBinding\x12\x12\n\nnext_steps\x18( \x01(\t\x12\x13\n\x0bmodule_name\x18) \x01(\t\x12=\n\ncontainers\x18* \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x12>\n\nkubernetes\x18+ \x01(\x0b\x32*.google.cloud.securitycenter.v1.Kubernetes\x12:\n\x08\x64\x61tabase\x18, \x01(\x0b\x32(.google.cloud.securitycenter.v1.Database\x12G\n\x0f\x61ttack_exposure\x18- \x01(\x0b\x32..google.cloud.securitycenter.v1.AttackExposure\x12\x33\n\x05\x66iles\x18. \x03(\x0b\x32$.google.cloud.securitycenter.v1.File\x12P\n\x14\x63loud_dlp_inspection\x18\x30 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18\x31 \x01(\x0b\x32\x33.google.cloud.securitycenter.v1.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18\x32 \x01(\x0b\x32-.google.cloud.securitycenter.v1.KernelRootkit\x12?\n\x0corg_policies\x18\x33 \x03(\x0b\x32).google.cloud.securitycenter.v1.OrgPolicy\x12@\n\x0b\x61pplication\x18\x35 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Application\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18\x37 \x01(\x0b\x32\x36.google.cloud.securitycenter.v1.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x38 \x01(\x0b\x32/.google.cloud.securitycenter.v1.SecurityPosture\x12=\n\x0blog_entries\x18\x39 \x03(\x0b\x32(.google.cloud.securitycenter.v1.LogEntry\x12\x44\n\x0eload_balancers\x18: \x03(\x0b\x32,.google.cloud.securitycenter.v1.LoadBalancer\x12?\n\x0b\x63loud_armor\x18; \x01(\x0b\x32*.google.cloud.securitycenter.v1.CloudArmor\x12:\n\x08notebook\x18? \x01(\x0b\x32(.google.cloud.securitycenter.v1.Notebook\x12K\n\x11toxic_combination\x18@ \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ToxicCombination\x12J\n\x11group_memberships\x18\x41 \x03(\x0b\x32/.google.cloud.securitycenter.v1.GroupMembership\x12>\n\nchokepoint\x18M \x01(\x0b\x32*.google.cloud.securitycenter.v1.Chokepoint\x12K\n\x11\x65xternal_exposure\x18T \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ExternalExposure\x12\x34\n\x05\x61gent\x18X \x01(\x0b\x32%.google.cloud.securitycenter.v1.Agent\x12\x44\n\x0e\x61gent_sessions\x18Y \x03(\x0b\x32,.google.cloud.securitycenter.v1.AgentSession\x12\x43\n\ragent_anomaly\x18Z \x01(\x0b\x32,.google.cloud.securitycenter.v1.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x04\"\xf0\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t\x12\x15\n\x11\x45XTERNAL_EXPOSURE\x10\n:\xee\x01\xea\x41\xea\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding").msgclass - Finding::MuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo").msgclass - Finding::MuteInfo::StaticMute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute").msgclass - Finding::MuteInfo::DynamicMuteRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord").msgclass - Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.State").enummodule - Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.Severity").enummodule - Finding::Mute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.Mute").enummodule - Finding::FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.FindingClass").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb deleted file mode 100644 index e25a1821948f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/folder.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/securitycenter/v1/folder.proto\x12\x1egoogle.cloud.securitycenter.v1\"G\n\x06\x46older\x12\x17\n\x0fresource_folder\x18\x01 \x01(\t\x12$\n\x1cresource_folder_display_name\x18\x02 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v1B\x0b\x46olderProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Folder").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb deleted file mode 100644 index 1f47d17f32d9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/group_membership.proto - -require 'google/protobuf' - - -descriptor_data = "\n5google/cloud/securitycenter/v1/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.GroupMembership.GroupType\x12\x10\n\x08group_id\x18\x02 \x01(\t\"d\n\tGroupType\x12\x1a\n\x16GROUP_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cGROUP_TYPE_TOXIC_COMBINATION\x10\x01\x12\x19\n\x15GROUP_TYPE_CHOKEPOINT\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v1B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - GroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupMembership").msgclass - GroupMembership::GroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupMembership.GroupType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb deleted file mode 100644 index 7a11d5d9ab1f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/iam_binding.proto - -require 'google/protobuf' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/iam_binding.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xa4\x01\n\nIamBinding\x12\x41\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v1.IamBinding.Action\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x0e\n\x06member\x18\x03 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x42\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fIamBindingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - IamBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.IamBinding").msgclass - IamBinding::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.IamBinding.Action").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb deleted file mode 100644 index 6fd4289eea6b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/indicator.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/securitycenter/v1/indicator.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd9\x06\n\tIndicator\x12\x14\n\x0cip_addresses\x18\x01 \x03(\t\x12\x0f\n\x07\x64omains\x18\x02 \x03(\t\x12N\n\nsignatures\x18\x03 \x03(\x0b\x32:.google.cloud.securitycenter.v1.Indicator.ProcessSignature\x12\x0c\n\x04uris\x18\x04 \x03(\t\x1a\xc6\x05\n\x10ProcessSignature\x12o\n\x15memory_hash_signature\x18\x06 \x01(\x0b\x32N.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureH\x00\x12k\n\x13yara_rule_signature\x18\x07 \x01(\x0b\x32L.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureH\x00\x12`\n\x0esignature_type\x18\x08 \x01(\x0e\x32H.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType\x1a\xd6\x01\n\x13MemoryHashSignature\x12\x15\n\rbinary_family\x18\x01 \x01(\t\x12l\n\ndetections\x18\x04 \x03(\x0b\x32X.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection\x1a:\n\tDetection\x12\x0e\n\x06\x62inary\x18\x02 \x01(\t\x12\x1d\n\x15percent_pages_matched\x18\x03 \x01(\x01\x1a&\n\x11YaraRuleSignature\x12\x11\n\tyara_rule\x18\x05 \x01(\t\"d\n\rSignatureType\x12\x1e\n\x1aSIGNATURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SIGNATURE_TYPE_PROCESS\x10\x01\x12\x17\n\x13SIGNATURE_TYPE_FILE\x10\x02\x42\x0b\n\tsignatureB\xe8\x01\n\"com.google.cloud.securitycenter.v1B\x0eIndicatorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Indicator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator").msgclass - Indicator::ProcessSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature").msgclass - Indicator::ProcessSignature::MemoryHashSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature").msgclass - Indicator::ProcessSignature::MemoryHashSignature::Detection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection").msgclass - Indicator::ProcessSignature::YaraRuleSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature").msgclass - Indicator::ProcessSignature::SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb deleted file mode 100644 index 20e8cb2e66b9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/kernel_rootkit.proto - -require 'google/protobuf' - - -descriptor_data = "\n3google/cloud/securitycenter/v1/kernel_rootkit.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd7\x02\n\rKernelRootkit\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x1cunexpected_code_modification\x18\x02 \x01(\x08\x12.\n&unexpected_read_only_data_modification\x18\x03 \x01(\x08\x12!\n\x19unexpected_ftrace_handler\x18\x04 \x01(\x08\x12!\n\x19unexpected_kprobe_handler\x18\x05 \x01(\x08\x12$\n\x1cunexpected_kernel_code_pages\x18\x06 \x01(\x08\x12&\n\x1eunexpected_system_call_handler\x18\x07 \x01(\x08\x12$\n\x1cunexpected_interrupt_handler\x18\x08 \x01(\x08\x12(\n unexpected_processes_in_runqueue\x18\t \x01(\x08\x42\xec\x01\n\"com.google.cloud.securitycenter.v1B\x12KernelRootkitProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - KernelRootkit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.KernelRootkit").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb deleted file mode 100644 index 469575235393..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/kubernetes.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v1/container_pb' -require 'google/cloud/securitycenter/v1/label_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/kubernetes.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a.google/cloud/securitycenter/v1/container.proto\x1a*google/cloud/securitycenter/v1/label.proto\"\x82\x0c\n\nKubernetes\x12<\n\x04pods\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.Kubernetes.Pod\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Node\x12G\n\nnode_pools\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v1.Kubernetes.NodePool\x12>\n\x05roles\x18\x04 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Role\x12\x44\n\x08\x62indings\x18\x05 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.Kubernetes.Binding\x12O\n\x0e\x61\x63\x63\x65ss_reviews\x18\x06 \x03(\x0b\x32\x37.google.cloud.securitycenter.v1.Kubernetes.AccessReview\x12\x42\n\x07objects\x18\x07 \x03(\x0b\x32\x31.google.cloud.securitycenter.v1.Kubernetes.Object\x1a\x95\x01\n\x03Pod\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x35\n\x06labels\x18\x03 \x03(\x0b\x32%.google.cloud.securitycenter.v1.Label\x12=\n\ncontainers\x18\x04 \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x1a\x14\n\x04Node\x12\x0c\n\x04name\x18\x01 \x01(\t\x1aX\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Node\x1a\x9e\x01\n\x04Role\x12\x42\n\x04kind\x18\x01 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Kubernetes.Role.Kind\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"8\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x08\n\x04ROLE\x10\x01\x12\x10\n\x0c\x43LUSTER_ROLE\x10\x02\x1a\xa8\x01\n\x07\x42inding\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12=\n\x04role\x18\x03 \x01(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Role\x12\x44\n\x08subjects\x18\x04 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.Kubernetes.Subject\x1a\xbe\x01\n\x07Subject\x12I\n\x04kind\x18\x01 \x01(\x0e\x32;.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"N\n\x08\x41uthType\x12\x19\n\x15\x41UTH_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x12\n\x0eSERVICEACCOUNT\x10\x02\x12\t\n\x05GROUP\x10\x03\x1a}\n\x0c\x41\x63\x63\x65ssReview\x12\r\n\x05group\x18\x01 \x01(\t\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x13\n\x0bsubresource\x18\x05 \x01(\t\x12\x0c\n\x04verb\x18\x06 \x01(\t\x12\x0f\n\x07version\x18\x07 \x01(\t\x1a~\n\x06Object\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\n\n\x02ns\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12=\n\ncontainers\x18\x05 \x03(\x0b\x32).google.cloud.securitycenter.v1.ContainerB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fKubernetesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Kubernetes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes").msgclass - Kubernetes::Pod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Pod").msgclass - Kubernetes::Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Node").msgclass - Kubernetes::NodePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.NodePool").msgclass - Kubernetes::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Role").msgclass - Kubernetes::Role::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Role.Kind").enummodule - Kubernetes::Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Binding").msgclass - Kubernetes::Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Subject").msgclass - Kubernetes::Subject::AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType").enummodule - Kubernetes::AccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.AccessReview").msgclass - Kubernetes::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Object").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb deleted file mode 100644 index 814fe4dfd80b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/label.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/securitycenter/v1/label.proto\x12\x1egoogle.cloud.securitycenter.v1\"$\n\x05Label\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v1B\nLabelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Label").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb deleted file mode 100644 index 486b320844ef..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/load_balancer.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v1/load_balancer.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x1c\n\x0cLoadBalancer\x12\x0c\n\x04name\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11LoadBalancerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - LoadBalancer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.LoadBalancer").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb deleted file mode 100644 index edec9da51f37..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/log_entry.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/securitycenter/v1/log_entry.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x08LogEntry\x12P\n\x13\x63loud_logging_entry\x18\x01 \x01(\x0b\x32\x31.google.cloud.securitycenter.v1.CloudLoggingEntryH\x00\x42\x0b\n\tlog_entry\"\x81\x01\n\x11\x43loudLoggingEntry\x12\x11\n\tinsert_id\x18\x01 \x01(\t\x12\x0e\n\x06log_id\x18\x02 \x01(\t\x12\x1a\n\x12resource_container\x18\x03 \x01(\t\x12-\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rLogEntryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.LogEntry").msgclass - CloudLoggingEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudLoggingEntry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb deleted file mode 100644 index 76a147892b01..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/mitre_attack.proto - -require 'google/protobuf' - - -descriptor_data = "\n1google/cloud/securitycenter/v1/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xbc\x13\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v1.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v1.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v1.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v1.MitreAttack.Technique\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xb4\x02\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x12\n\x0eRECONNAISSANCE\x10\x01\x12\x18\n\x14RESOURCE_DEVELOPMENT\x10\x02\x12\x12\n\x0eINITIAL_ACCESS\x10\x05\x12\r\n\tEXECUTION\x10\x03\x12\x0f\n\x0bPERSISTENCE\x10\x06\x12\x18\n\x14PRIVILEGE_ESCALATION\x10\x08\x12\x13\n\x0f\x44\x45\x46\x45NSE_EVASION\x10\x07\x12\x15\n\x11\x43REDENTIAL_ACCESS\x10\t\x12\r\n\tDISCOVERY\x10\n\x12\x14\n\x10LATERAL_MOVEMENT\x10\x0b\x12\x0e\n\nCOLLECTION\x10\x0c\x12\x17\n\x13\x43OMMAND_AND_CONTROL\x10\x04\x12\x10\n\x0c\x45XFILTRATION\x10\r\x12\n\n\x06IMPACT\x10\x0e\"\x9f\x0e\n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMASQUERADING\x10\x31\x12%\n!MATCH_LEGITIMATE_NAME_OR_LOCATION\x10\x32\x12(\n$BOOT_OR_LOGON_INITIALIZATION_SCRIPTS\x10%\x12\x11\n\rSTARTUP_ITEMS\x10&\x12\x1d\n\x19NETWORK_SERVICE_DISCOVERY\x10 \x12\x15\n\x11PROCESS_DISCOVERY\x10\x38\x12%\n!COMMAND_AND_SCRIPTING_INTERPRETER\x10\x06\x12\x0e\n\nUNIX_SHELL\x10\x07\x12\n\n\x06PYTHON\x10;\x12)\n%EXPLOITATION_FOR_PRIVILEGE_ESCALATION\x10?\x12\x1f\n\x1bPERMISSION_GROUPS_DISCOVERY\x10\x12\x12\x10\n\x0c\x43LOUD_GROUPS\x10\x13\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12\x1e\n\x1a\x41PPLICATION_LAYER_PROTOCOL\x10-\x12\x07\n\x03\x44NS\x10.\x12\x1d\n\x19SOFTWARE_DEPLOYMENT_TOOLS\x10/\x12\x12\n\x0eVALID_ACCOUNTS\x10\x0e\x12\x14\n\x10\x44\x45\x46\x41ULT_ACCOUNTS\x10#\x12\x12\n\x0eLOCAL_ACCOUNTS\x10\x0f\x12\x12\n\x0e\x43LOUD_ACCOUNTS\x10\x10\x12\t\n\x05PROXY\x10\t\x12\x12\n\x0e\x45XTERNAL_PROXY\x10\n\x12\x13\n\x0fMULTI_HOP_PROXY\x10\x0b\x12\x18\n\x14\x41\x43\x43OUNT_MANIPULATION\x10\x16\x12 \n\x1c\x41\x44\x44ITIONAL_CLOUD_CREDENTIALS\x10(\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x16\n\x12RESOURCE_HIJACKING\x10\x08\x12\x1d\n\x19NETWORK_DENIAL_OF_SERVICE\x10\x11\x12\x1b\n\x17\x43LOUD_SERVICE_DISCOVERY\x10\x30\x12\"\n\x1eSTEAL_APPLICATION_ACCESS_TOKEN\x10*\x12\x1a\n\x16\x41\x43\x43OUNT_ACCESS_REMOVAL\x10\x33\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12!\n\x1d\x45XFILTRATION_OVER_WEB_SERVICE\x10\x14\x12!\n\x1d\x45XFILTRATION_TO_CLOUD_STORAGE\x10\x15\x12\x16\n\x12\x44YNAMIC_RESOLUTION\x10\x0c\x12\x19\n\x15LATERAL_TOOL_TRANSFER\x10)\x12\'\n#MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE\x10\x1a\x12\x13\n\x0f\x43REATE_SNAPSHOT\x10\x36\x12\"\n\x1e\x43LOUD_INFRASTRUCTURE_DISCOVERY\x10\x35\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>B\xea\x01\n\"com.google.cloud.securitycenter.v1B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - MitreAttack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack").msgclass - MitreAttack::Tactic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack.Tactic").enummodule - MitreAttack::Technique = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack.Technique").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb deleted file mode 100644 index 6f270729b563..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/mute_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/mute_config.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x06\n\nMuteConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x02\x18\x01\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12L\n\x04type\x18\x08 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.MuteConfig.MuteConfigTypeB\x03\xe0\x41\x01\x12\x34\n\x0b\x65xpiry_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"K\n\x0eMuteConfigType\x12 \n\x1cMUTE_CONFIG_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STATIC\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02:\xaa\x03\xea\x41\xa6\x03\n(securitycenter.googleapis.com/MuteConfig\x12\x36organizations/{organization}/muteConfigs/{mute_config}\x12*folders/{folder}/muteConfigs/{mute_config}\x12,projects/{project}/muteConfigs/{mute_config}\x12Korganizations/{organization}/locations/{location}/muteConfigs/{mute_config}\x12?folders/{folder}/locations/{location}/muteConfigs/{mute_config}\x12\x41projects/{project}/locations/{location}/muteConfigs/{mute_config}*\x0bmuteConfigs2\nmuteConfigB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fMuteConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - MuteConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MuteConfig").msgclass - MuteConfig::MuteConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MuteConfig.MuteConfigType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb deleted file mode 100644 index f8cc3f85eb77..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/notebook.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/securitycenter/v1/notebook.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"x\n\x08Notebook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x13\n\x0blast_author\x18\x03 \x01(\t\x12\x38\n\x14notebook_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rNotebookProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Notebook").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb deleted file mode 100644 index df0bb0cecc79..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/notification_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n8google/cloud/securitycenter/v1/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc5\x04\n\x12NotificationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x36\n\x0cpubsub_topic\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x10streaming_config\x18\x05 \x01(\x0b\x32\x42.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfigH\x00\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xa1\x02\xea\x41\x9d\x02\n0securitycenter.googleapis.com/NotificationConfig\x12\x46organizations/{organization}/notificationConfigs/{notification_config}\x12:folders/{folder}/notificationConfigs/{notification_config}\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"\x8b\x01\n0DeleteSecurityHealthAnalyticsCustomModuleRequest\x12W\n\x04name\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\nAsecuritycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\"^\n\x18GetBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"V\n\x14GetMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"j\n\x1eGetOrganizationSettingsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2securitycenter.googleapis.com/OrganizationSettings\"\x9a\x01\n6GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x12`\n\x04name\x18\x01 \x01(\tBR\xe0\x41\x02\xfa\x41L\nJsecuritycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\"\x88\x01\n-GetSecurityHealthAnalyticsCustomModuleRequest\x12W\n\x04name\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\nAsecuritycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\x83\x02\n\x12GroupAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x10\x63ompare_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xb8\x01\n\x13GroupAssetsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\x86\x02\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xba\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xb8\x01\n\x0bGroupResult\x12O\n\nproperties\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v1.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\xbd\x01\n9ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xcc\x01\n:ListDescendantSecurityHealthAnalyticsCustomModulesResponse\x12u\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb0\x01\n\x1aListValuedResourcesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/ValuedResource\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x1bListValuedResourcesResponse\x12H\n\x10valued_resources\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x91\x01\n\x16ListAttackPathsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/AttackPath\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"t\n\x17ListAttackPathsResponse\x12@\n\x0c\x61ttack_paths\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v1.AttackPath\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetSimulationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/Simulation\"^\n\x18GetValuedResourceRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/ValuedResource\"\x81\x01\n\x16ListMuteConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListMuteConfigsResponse\x12@\n\x0cmute_configs\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v1.MuteConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8c\x01\n\x1fListNotificationConfigsResponse\x12P\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbc\x01\n8ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xdf\x01\n9ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\x12\x88\x01\n2effective_security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32L.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n/ListSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xc2\x01\n0ListSecurityHealthAnalyticsCustomModulesResponse\x12u\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"g\n\x13ListSourcesResponse\x12\x37\n\x07sources\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v1.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x02\n\x11ListAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xc3\x03\n\x12ListAssetsResponse\x12`\n\x13list_assets_results\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xee\x01\n\x10ListAssetsResult\x12\x34\n\x05\x61sset\x18\x01 \x01(\x0b\x32%.google.cloud.securitycenter.v1.Asset\x12\x65\n\x0cstate_change\x18\x02 \x01(\x0e\x32O.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange\"=\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07REMOVED\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\"\xb0\x02\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xb8\t\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xdb\x07\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Finding\x12i\n\x0cstate_change\x18\x02 \x01(\x0e\x32S.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xe7\x04\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x08 \x01(\t\x12\x0c\n\x04type\x18\x06 \x01(\t\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1c\n\x14project_display_name\x18\x03 \x01(\t\x12\x13\n\x0bparent_name\x18\x04 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x05 \x01(\t\x12\x37\n\x07\x66olders\x18\x07 \x03(\x0b\x32&.google.cloud.securitycenter.v1.Folder\x12\x45\n\x0e\x63loud_provider\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v1.CloudProvider\x12\x14\n\x0corganization\x18\n \x01(\t\x12\x0f\n\x07service\x18\x0b \x01(\t\x12\x10\n\x08location\x18\x0c \x01(\t\x12\x43\n\x0c\x61ws_metadata\x18\x10 \x01(\x0b\x32+.google.cloud.securitycenter.v1.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\x11 \x01(\x0b\x32-.google.cloud.securitycenter.v1.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\x12 \x01(\x0b\x32,.google.cloud.securitycenter.v1.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x13 \x01(\tB\x19\n\x17\x63loud_provider_metadata\"M\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\x0b\n\x07\x43HANGED\x10\x01\x12\r\n\tUNCHANGED\x10\x02\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x03\x12\x0b\n\x07REMOVED\x10\x04\"\xcd\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.StateB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\x8e\x01\n\x0eSetMuteRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12?\n\x04mute\x18\x02 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.MuteB\x03\xe0\x41\x02\"d\n\x18RunAssetDiscoveryRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\"\xac\x03\n2SimulateSecurityHealthAnalyticsCustomModuleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\rcustom_config\x18\x02 \x01(\x0b\x32,.google.cloud.securitycenter.v1.CustomConfigB\x03\xe0\x41\x02\x12{\n\x08resource\x18\x03 \x01(\x0b\x32\x64.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResourceB\x03\xe0\x41\x02\x1a\x99\x01\n\x11SimulatedResource\x12\x1a\n\rresource_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\rresource_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x33\n\x0fiam_policy_data\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\x03\xe0\x41\x01\"\xd9\x02\n3SimulateSecurityHealthAnalyticsCustomModuleResponse\x12s\n\x06result\x18\x01 \x01(\x0b\x32\x63.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult\x1a\xac\x01\n\x0fSimulatedResult\x12:\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.FindingH\x00\x12.\n\x0cno_violation\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystemB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x86\x01\n\x14UpdateFindingRequest\x12=\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x90\x01\n\x17UpdateMuteConfigRequest\x12\x44\n\x0bmute_config\x18\x01 \x01(\x0b\x32*.google.cloud.securitycenter.v1.MuteConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa8\x01\n\x1fUpdateNotificationConfigRequest\x12T\n\x13notification_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xae\x01\n!UpdateOrganizationSettingsRequest\x12X\n\x15organization_settings\x18\x01 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1.OrganizationSettingsB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xde\x01\n0UpdateSecurityHealthAnalyticsCustomModuleRequest\x12y\n\'security_health_analytics_custom_module\x18\x01 \x01(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x83\x01\n\x13UpdateSourceRequest\x12;\n\x06source\x18\x01 \x01(\x0b\x32&.google.cloud.securitycenter.v1.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xc9\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd4\x01\n\x1b\x43reateBigQueryExportRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12M\n\x10\x62ig_query_export\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x89\x01\n\x1aListBigQueryExportsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListBigQueryExportsResponse\x12I\n\x11\x62ig_query_exports\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"\xfc\x01\n-CreateEventThreatDetectionCustomModuleRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12s\n$event_threat_detection_custom_module\x18\x02 \x01(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\"\xb3\x01\n/ValidateEventThreatDetectionCustomModuleRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x15\n\x08raw_text\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x80\x01\n0ValidateEventThreatDetectionCustomModuleResponse\x12L\n\x06\x65rrors\x18\x02 \x01(\x0b\x32<.google.cloud.securitycenter.v1.CustomModuleValidationErrors\"\x85\x01\n-DeleteEventThreatDetectionCustomModuleRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\"\x82\x01\n*GetEventThreatDetectionCustomModuleRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\"\xb7\x01\n6ListDescendantEventThreatDetectionCustomModulesRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xc3\x01\n7ListDescendantEventThreatDetectionCustomModulesResponse\x12o\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n,ListEventThreatDetectionCustomModulesRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xb9\x01\n-ListEventThreatDetectionCustomModulesResponse\x12o\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd5\x01\n-UpdateEventThreatDetectionCustomModuleRequest\x12s\n$event_threat_detection_custom_module\x18\x01 \x01(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n3GetEffectiveEventThreatDetectionCustomModuleRequest\x12]\n\x04name\x18\x01 \x01(\tBO\xe0\x41\x02\xfa\x41I\nGsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\"\xbf\x01\n5ListEffectiveEventThreatDetectionCustomModulesRequest\x12_\n\x06parent\x18\x01 \x01(\tBO\xe0\x41\x02\xfa\x41I\x12Gsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xd6\x01\n6ListEffectiveEventThreatDetectionCustomModulesResponse\x12\x82\x01\n/effective_event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32I.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\xb2\x01\n\x0eSecurityCenter\x12\xe2\x02\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v1.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41P\n7google.cloud.securitycenter.v1.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x92\x01\"./v1/{parent=organizations/*}/findings:bulkMute:\x01*Z-\"(/v1/{parent=folders/*}/findings:bulkMute:\x01*Z.\")/v1/{parent=projects/*}/findings:bulkMute:\x01*\x12\xd5\x04\n)CreateSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\x90\x03\xda\x41.parent,security_health_analytics_custom_module\x82\xd3\xe4\x93\x02\xd8\x02\"J/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_moduleZo\"D/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_moduleZp\"E/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_module\x12\xb1\x01\n\x0c\x43reateSource\x12\x33.google.cloud.securitycenter.v1.CreateSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"D\xda\x41\rparent,source\x82\xd3\xe4\x93\x02.\"$/v1/{parent=organizations/*}/sources:\x06source\x12\xcc\x01\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v1.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\\\xda\x41\x19parent,finding_id,finding\x82\xd3\xe4\x93\x02:\"//v1/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x9c\x04\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v1.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xa2\x03\xda\x41\x12parent,mute_config\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"(/v1/{parent=organizations/*}/muteConfigs:\x0bmute_configZC\"4/v1/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ1\"\"/v1/{parent=folders/*}/muteConfigs:\x0bmute_configZ=\"./v1/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ2\"#/v1/{parent=projects/*}/muteConfigs:\x0bmute_configZ>\"//v1/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_config\x12\xab\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v1.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\x99\x02\xda\x41$parent,config_id,notification_config\xda\x41\x1aparent,notification_config\x82\xd3\xe4\x93\x02\xce\x01\"0/v1/{parent=organizations/*}/notificationConfigs:\x13notification_configZA\"*/v1/{parent=folders/*}/notificationConfigs:\x13notification_configZB\"+/v1/{parent=projects/*}/notificationConfigs:\x13notification_config\x12\x88\x03\n\x10\x44\x65leteMuteConfig\x12\x37.google.cloud.securitycenter.v1.DeleteMuteConfigRequest\x1a\x16.google.protobuf.Empty\"\xa2\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x02*(/v1/{name=organizations/*/muteConfigs/*}Z$*\"/v1/{name=folders/*/muteConfigs/*}Z%*#/v1/{name=projects/*/muteConfigs/*}Z6*4/v1/{name=organizations/*/locations/*/muteConfigs/*}Z0*./v1/{name=folders/*/locations/*/muteConfigs/*}Z1*//v1/{name=projects/*/locations/*/muteConfigs/*}\x12\x93\x02\n\x18\x44\x65leteNotificationConfig\x12?.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest\x1a\x16.google.protobuf.Empty\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01*0/v1/{name=organizations/*/notificationConfigs/*}Z,**/v1/{name=folders/*/notificationConfigs/*}Z-*+/v1/{name=projects/*/notificationConfigs/*}\x12\x83\x03\n)DeleteSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01*J/v1/{name=organizations/*/securityHealthAnalyticsSettings/customModules/*}ZF*D/v1/{name=folders/*/securityHealthAnalyticsSettings/customModules/*}ZG*E/v1/{name=projects/*/securityHealthAnalyticsSettings/customModules/*}\x12\xaa\x01\n\rGetSimulation\x12\x34.google.cloud.securitycenter.v1.GetSimulationRequest\x1a*.google.cloud.securitycenter.v1.Simulation\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=organizations/*/simulations/*}\x12\xc8\x01\n\x11GetValuedResource\x12\x38.google.cloud.securitycenter.v1.GetValuedResourceRequest\x1a..google.cloud.securitycenter.v1.ValuedResource\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=organizations/*/simulations/*/valuedResources/*}\x12\x91\x02\n\x11GetBigQueryExport\x12\x38.google.cloud.securitycenter.v1.GetBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\x91\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x83\x01\x12,/v1/{name=organizations/*/bigQueryExports/*}Z(\x12&/v1/{name=folders/*/bigQueryExports/*}Z)\x12\'/v1/{name=projects/*/bigQueryExports/*}\x12\x96\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"K\xda\x41\x08resource\x82\xd3\xe4\x93\x02:\"5/v1/{resource=organizations/*/sources/*}:getIamPolicy:\x01*\x12\x96\x03\n\rGetMuteConfig\x12\x34.google.cloud.securitycenter.v1.GetMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xa2\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x02\x12(/v1/{name=organizations/*/muteConfigs/*}Z$\x12\"/v1/{name=folders/*/muteConfigs/*}Z%\x12#/v1/{name=projects/*/muteConfigs/*}Z6\x12\x34/v1/{name=organizations/*/locations/*/muteConfigs/*}Z0\x12./v1/{name=folders/*/locations/*/muteConfigs/*}Z1\x12//v1/{name=projects/*/locations/*/muteConfigs/*}\x12\xa9\x02\n\x15GetNotificationConfig\x12<.google.cloud.securitycenter.v1.GetNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12\x30/v1/{name=organizations/*/notificationConfigs/*}Z,\x12*/v1/{name=folders/*/notificationConfigs/*}Z-\x12+/v1/{name=projects/*/notificationConfigs/*}\x12\xcf\x01\n\x17GetOrganizationSettings\x12>.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest\x1a\x34.google.cloud.securitycenter.v1.OrganizationSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=organizations/*/organizationSettings}\x12\xe0\x03\n/GetEffectiveSecurityHealthAnalyticsCustomModule\x12V.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x1aL.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule\"\x86\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf8\x01\x12S/v1/{name=organizations/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}ZO\x12M/v1/{name=folders/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}ZP\x12N/v1/{name=projects/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}\x12\xaa\x03\n&GetSecurityHealthAnalyticsCustomModule\x12M.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01\x12J/v1/{name=organizations/*/securityHealthAnalyticsSettings/customModules/*}ZF\x12\x44/v1/{name=folders/*/securityHealthAnalyticsSettings/customModules/*}ZG\x12\x45/v1/{name=projects/*/securityHealthAnalyticsSettings/customModules/*}\x12\x9a\x01\n\tGetSource\x12\x30.google.cloud.securitycenter.v1.GetSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=organizations/*/sources/*}\x12\x86\x02\n\x0bGroupAssets\x12\x32.google.cloud.securitycenter.v1.GroupAssetsRequest\x1a\x33.google.cloud.securitycenter.v1.GroupAssetsResponse\"\x8d\x01\x88\x02\x01\x82\xd3\xe4\x93\x02\x83\x01\")/v1/{parent=organizations/*}/assets:group:\x01*Z(\"#/v1/{parent=folders/*}/assets:group:\x01*Z)\"$/v1/{parent=projects/*}/assets:group:\x01*\x12\xbf\x02\n\rGroupFindings\x12\x34.google.cloud.securitycenter.v1.GroupFindingsRequest\x1a\x35.google.cloud.securitycenter.v1.GroupFindingsResponse\"\xc0\x01\xda\x41\x0fparent,group_by\x82\xd3\xe4\x93\x02\xa7\x01\"5/v1/{parent=organizations/*/sources/*}/findings:group:\x01*Z4\"//v1/{parent=folders/*/sources/*}/findings:group:\x01*Z5\"0/v1/{parent=projects/*/sources/*}/findings:group:\x01*\x12\xe6\x01\n\nListAssets\x12\x31.google.cloud.securitycenter.v1.ListAssetsRequest\x1a\x32.google.cloud.securitycenter.v1.ListAssetsResponse\"q\x88\x02\x01\x82\xd3\xe4\x93\x02h\x12#/v1/{parent=organizations/*}/assetsZ\x1f\x12\x1d/v1/{parent=folders/*}/assetsZ \x12\x1e/v1/{parent=projects/*}/assets\x12\x88\x04\n2ListDescendantSecurityHealthAnalyticsCustomModules\x12Y.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x1aZ.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse\"\x9a\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8a\x02\x12Y/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:listDescendantZU\x12S/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:listDescendantZV\x12T/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:listDescendant\x12\x8f\x02\n\x0cListFindings\x12\x33.google.cloud.securitycenter.v1.ListFindingsRequest\x1a\x34.google.cloud.securitycenter.v1.ListFindingsResponse\"\x93\x01\x82\xd3\xe4\x93\x02\x8c\x01\x12//v1/{parent=organizations/*/sources/*}/findingsZ+\x12)/v1/{parent=folders/*/sources/*}/findingsZ,\x12*/v1/{parent=projects/*/sources/*}/findings\x12\xa9\x03\n\x0fListMuteConfigs\x12\x36.google.cloud.securitycenter.v1.ListMuteConfigsRequest\x1a\x37.google.cloud.securitycenter.v1.ListMuteConfigsResponse\"\xa4\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x94\x02\x12(/v1/{parent=organizations/*}/muteConfigsZ$\x12\"/v1/{parent=folders/*}/muteConfigsZ%\x12#/v1/{parent=projects/*}/muteConfigsZ6\x12\x34/v1/{parent=organizations/*/locations/*/muteConfigs}Z0\x12./v1/{parent=folders/*/locations/*/muteConfigs}Z1\x12//v1/{parent=projects/*/locations/*/muteConfigs}\x12\xbc\x02\n\x17ListNotificationConfigs\x12>.google.cloud.securitycenter.v1.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v1.ListNotificationConfigsResponse\"\x9f\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8f\x01\x12\x30/v1/{parent=organizations/*}/notificationConfigsZ,\x12*/v1/{parent=folders/*}/notificationConfigsZ-\x12+/v1/{parent=projects/*}/notificationConfigs\x12\xf3\x03\n1ListEffectiveSecurityHealthAnalyticsCustomModules\x12X.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x1aY.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\"\x88\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xf8\x01\x12S/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/effectiveCustomModulesZO\x12M/v1/{parent=folders/*/securityHealthAnalyticsSettings}/effectiveCustomModulesZP\x12N/v1/{parent=projects/*/securityHealthAnalyticsSettings}/effectiveCustomModules\x12\xbd\x03\n(ListSecurityHealthAnalyticsCustomModules\x12O.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest\x1aP.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse\"\xed\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xdd\x01\x12J/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModulesZF\x12\x44/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModulesZG\x12\x45/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules\x12\xf2\x01\n\x0bListSources\x12\x32.google.cloud.securitycenter.v1.ListSourcesRequest\x1a\x33.google.cloud.securitycenter.v1.ListSourcesResponse\"z\xda\x41\x06parent\x82\xd3\xe4\x93\x02k\x12$/v1/{parent=organizations/*}/sourcesZ \x12\x1e/v1/{parent=folders/*}/sourcesZ!\x12\x1f/v1/{parent=projects/*}/sources\x12\x8a\x02\n\x11RunAssetDiscovery\x12\x38.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\x88\x02\x01\xca\x41Q\n8google.cloud.securitycenter.v1.RunAssetDiscoveryResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\"0/v1/{parent=organizations/*}/assets:runDiscovery:\x01*\x12\xc4\x02\n\x0fSetFindingState\x12\x36.google.cloud.securitycenter.v1.SetFindingStateRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xcf\x01\xda\x41\x15name,state,start_time\x82\xd3\xe4\x93\x02\xb0\x01\"8/v1/{name=organizations/*/sources/*/findings/*}:setState:\x01*Z7\"2/v1/{name=folders/*/sources/*/findings/*}:setState:\x01*Z8\"3/v1/{name=projects/*/sources/*/findings/*}:setState:\x01*\x12\xa5\x02\n\x07SetMute\x12..google.cloud.securitycenter.v1.SetMuteRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xc0\x01\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\xad\x01\"7/v1/{name=organizations/*/sources/*/findings/*}:setMute:\x01*Z6\"1/v1/{name=folders/*/sources/*/findings/*}:setMute:\x01*Z7\"2/v1/{name=projects/*/sources/*/findings/*}:setMute:\x01*\x12\x9d\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02:\"5/v1/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xc8\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02@\";/v1/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\x81\x04\n+SimulateSecurityHealthAnalyticsCustomModule\x12R.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest\x1aS.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse\"\xa8\x02\xda\x41\x1dparent,custom_config,resource\x82\xd3\xe4\x93\x02\x81\x02\"S/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*ZR\"M/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*ZS\"N/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*\x12\xd0\x03\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v1.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v1.ExternalSystem\"\xca\x02\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xa5\x02\x32Q/v1/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v1/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v1/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xc1\x02\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v1.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xd0\x01\xda\x41\x07\x66inding\x82\xd3\xe4\x93\x02\xbf\x01\x32\x37/v1/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZ<21/v1/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZ=22/v1/{finding.name=projects/*/sources/*/findings/*}:\x07\x66inding\x12\xc5\x04\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v1.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xcb\x03\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v1/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZ=2./v1/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZ>2//v1/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZO2@/v1/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZI2:/v1/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZJ2;/v1/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x12\xdb\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\xc9\x02\xda\x41\x13notification_config\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\x8a\x02\x32\x44/v1/{notification_config.name=organizations/*/notificationConfigs/*}:\x13notification_configZU2>/v1/{notification_config.name=folders/*/notificationConfigs/*}:\x13notification_configZV2?/v1/{notification_config.name=projects/*/notificationConfigs/*}:\x13notification_config\x12\x93\x02\n\x1aUpdateOrganizationSettings\x12\x41.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest\x1a\x34.google.cloud.securitycenter.v1.OrganizationSettings\"|\xda\x41\x15organization_settings\x82\xd3\xe4\x93\x02^2E/v1/{organization_settings.name=organizations/*/organizationSettings}:\x15organization_settings\x12\xd4\x05\n)UpdateSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\x8f\x04\xda\x41\x33security_health_analytics_custom_module,update_mask\x82\xd3\xe4\x93\x02\xd2\x03\x32r/v1/{security_health_analytics_custom_module.name=organizations/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_moduleZ\x97\x01\x32l/v1/{security_health_analytics_custom_module.name=folders/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_moduleZ\x98\x01\x32m/v1/{security_health_analytics_custom_module.name=projects/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_module\x12\xb1\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v1.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"D\xda\x41\x06source\x82\xd3\xe4\x93\x02\x35\x32+/v1/{source.name=organizations/*/sources/*}:\x06source\x12\x9f\x05\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v1.SecurityMarks\"\x9c\x04\xda\x41\x0esecurity_marks\x82\xd3\xe4\x93\x02\x84\x04\x32@/v1/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZL2:/v1/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZM2;/v1/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZ^2L/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xf4\x02\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v1.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\xee\x01\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xb9\x01\",/v1/{parent=organizations/*}/bigQueryExports:\x10\x62ig_query_exportZ:\"&/v1/{parent=folders/*}/bigQueryExports:\x10\x62ig_query_exportZ;\"\'/v1/{parent=projects/*}/bigQueryExports:\x10\x62ig_query_export\x12\xff\x01\n\x14\x44\x65leteBigQueryExport\x12;.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest\x1a\x16.google.protobuf.Empty\"\x91\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x83\x01*,/v1/{name=organizations/*/bigQueryExports/*}Z(*&/v1/{name=folders/*/bigQueryExports/*}Z)*\'/v1/{name=projects/*/bigQueryExports/*}\x12\x98\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\x92\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\xec\x01\x32=/v1/{big_query_export.name=organizations/*/bigQueryExports/*}:\x10\x62ig_query_exportZK27/v1/{big_query_export.name=folders/*/bigQueryExports/*}:\x10\x62ig_query_exportZL28/v1/{big_query_export.name=projects/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\xa4\x02\n\x13ListBigQueryExports\x12:.google.cloud.securitycenter.v1.ListBigQueryExportsRequest\x1a;.google.cloud.securitycenter.v1.ListBigQueryExportsResponse\"\x93\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x83\x01\x12,/v1/{parent=organizations/*}/bigQueryExportsZ(\x12&/v1/{parent=folders/*}/bigQueryExportsZ)\x12\'/v1/{parent=projects/*}/bigQueryExports\x12\xb7\x04\n&CreateEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xfb\x02\xda\x41+parent,event_threat_detection_custom_module\x82\xd3\xe4\x93\x02\xc6\x02\"G/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_moduleZi\"A/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_moduleZj\"B/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_module\x12\xf4\x02\n&DeleteEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xe2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd4\x01*G/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}ZC*A/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}ZD*B/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}\x12\x98\x03\n#GetEventThreatDetectionCustomModule\x12J.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xe2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd4\x01\x12G/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}ZC\x12\x41/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}ZD\x12\x42/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}\x12\xf6\x03\n/ListDescendantEventThreatDetectionCustomModules\x12V.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest\x1aW.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse\"\x91\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x02\x12V/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:listDescendantZR\x12P/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:listDescendantZS\x12Q/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:listDescendant\x12\xab\x03\n%ListEventThreatDetectionCustomModules\x12L.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest\x1aM.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse\"\xe4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd4\x01\x12G/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModulesZC\x12\x41/v1/{parent=folders/*/eventThreatDetectionSettings}/customModulesZD\x12\x42/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules\x12\xad\x05\n&UpdateEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xf1\x03\xda\x41\x30\x65vent_threat_detection_custom_module,update_mask\x82\xd3\xe4\x93\x02\xb7\x03\x32l/v1/{event_threat_detection_custom_module.name=organizations/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_moduleZ\x8e\x01\x32\x66/v1/{event_threat_detection_custom_module.name=folders/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_moduleZ\x8f\x01\x32g/v1/{event_threat_detection_custom_module.name=projects/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_module\x12\xc9\x03\n(ValidateEventThreatDetectionCustomModule\x12O.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest\x1aP.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse\"\xf9\x01\x82\xd3\xe4\x93\x02\xf2\x01\"N/v1/{parent=organizations/*/eventThreatDetectionSettings}:validateCustomModule:\x01*ZM\"H/v1/{parent=folders/*/eventThreatDetectionSettings}:validateCustomModule:\x01*ZN\"I/v1/{parent=projects/*/eventThreatDetectionSettings}:validateCustomModule:\x01*\x12\xce\x03\n,GetEffectiveEventThreatDetectionCustomModule\x12S.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest\x1aI.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule\"\xfd\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xef\x01\x12P/v1/{name=organizations/*/eventThreatDetectionSettings/effectiveCustomModules/*}ZL\x12J/v1/{name=folders/*/eventThreatDetectionSettings/effectiveCustomModules/*}ZM\x12K/v1/{name=projects/*/eventThreatDetectionSettings/effectiveCustomModules/*}\x12\xe1\x03\n.ListEffectiveEventThreatDetectionCustomModules\x12U.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest\x1aV.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse\"\xff\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xef\x01\x12P/v1/{parent=organizations/*/eventThreatDetectionSettings}/effectiveCustomModulesZL\x12J/v1/{parent=folders/*/eventThreatDetectionSettings}/effectiveCustomModulesZM\x12K/v1/{parent=projects/*/eventThreatDetectionSettings}/effectiveCustomModules\x12\x8e\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse\"Z\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x42\"=/v1/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*\x12\xb7\x01\n\x19\x44\x65leteResourceValueConfig\x12@.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest\x1a\x16.google.protobuf.Empty\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=organizations/*/resourceValueConfigs/*}\x12\xce\x01\n\x16GetResourceValueConfig\x12=.google.cloud.securitycenter.v1.GetResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v1.ResourceValueConfig\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=organizations/*/resourceValueConfigs/*}\x12\xe1\x01\n\x18ListResourceValueConfigs\x12?.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest\x1a@.google.cloud.securitycenter.v1.ListResourceValueConfigsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=organizations/*}/resourceValueConfigs\x12\x9f\x02\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v1.ResourceValueConfig\"\x8a\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02`2G/v1/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xb3\x02\n\x13ListValuedResources\x12:.google.cloud.securitycenter.v1.ListValuedResourcesRequest\x1a;.google.cloud.securitycenter.v1.ListValuedResourcesResponse\"\xa2\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x92\x01\x12:/v1/{parent=organizations/*/simulations/*}/valuedResourcesZT\x12R/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/valuedResources\x12\xeb\x02\n\x0fListAttackPaths\x12\x36.google.cloud.securitycenter.v1.ListAttackPathsRequest\x1a\x37.google.cloud.securitycenter.v1.ListAttackPathsResponse\"\xe6\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd6\x01\x12\x36/v1/{parent=organizations/*/simulations/*}/attackPathsZJ\x12H/v1/{parent=organizations/*/simulations/*/valuedResources/*}/attackPathsZP\x12N/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe5\x05\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41m\n4securitycenter.googleapis.com/OrganizationSimulation\x12\x35organizations/{organization}/simulations/{simulation}\xea\x41\xd7\x01\n:securitycenter.googleapis.com/EventThreatDetectionSettings\x12\x39organizations/{organization}/eventThreatDetectionSettings\x12-folders/{folder}/eventThreatDetectionSettings\x12/projects/{project}/eventThreatDetectionSettingsb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - BulkMuteFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsRequest").msgclass - BulkMuteFindingsRequest::MuteState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsRequest.MuteState").enummodule - BulkMuteFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsResponse").msgclass - CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateFindingRequest").msgclass - CreateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateMuteConfigRequest").msgclass - CreateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateResourceValueConfigRequest").msgclass - BatchCreateResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest").msgclass - BatchCreateResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse").msgclass - DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest").msgclass - GetResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetResourceValueConfigRequest").msgclass - ListResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListResourceValueConfigsRequest").msgclass - ListResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListResourceValueConfigsResponse").msgclass - UpdateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest").msgclass - CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateNotificationConfigRequest").msgclass - CreateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest").msgclass - CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateSourceRequest").msgclass - DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteMuteConfigRequest").msgclass - DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteNotificationConfigRequest").msgclass - DeleteSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest").msgclass - GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetBigQueryExportRequest").msgclass - GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetMuteConfigRequest").msgclass - GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetNotificationConfigRequest").msgclass - GetOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetOrganizationSettingsRequest").msgclass - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest").msgclass - GetSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest").msgclass - GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSourceRequest").msgclass - GroupAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupAssetsRequest").msgclass - GroupAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupAssetsResponse").msgclass - GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupFindingsRequest").msgclass - GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupFindingsResponse").msgclass - GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupResult").msgclass - ListDescendantSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest").msgclass - ListDescendantSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse").msgclass - ListValuedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListValuedResourcesRequest").msgclass - ListValuedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListValuedResourcesResponse").msgclass - ListAttackPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAttackPathsRequest").msgclass - ListAttackPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAttackPathsResponse").msgclass - GetSimulationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSimulationRequest").msgclass - GetValuedResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetValuedResourceRequest").msgclass - ListMuteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListMuteConfigsRequest").msgclass - ListMuteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListMuteConfigsResponse").msgclass - ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListNotificationConfigsRequest").msgclass - ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListNotificationConfigsResponse").msgclass - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest").msgclass - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse").msgclass - ListSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest").msgclass - ListSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse").msgclass - ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSourcesRequest").msgclass - ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSourcesResponse").msgclass - ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsRequest").msgclass - ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse").msgclass - ListAssetsResponse::ListAssetsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult").msgclass - ListAssetsResponse::ListAssetsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange").enummodule - ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsRequest").msgclass - ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse").msgclass - ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult").msgclass - ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource").msgclass - ListFindingsResponse::ListFindingsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange").enummodule - SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SetFindingStateRequest").msgclass - SetMuteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SetMuteRequest").msgclass - RunAssetDiscoveryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.RunAssetDiscoveryRequest").msgclass - SimulateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest").msgclass - SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource").msgclass - SimulateSecurityHealthAnalyticsCustomModuleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse").msgclass - SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult").msgclass - UpdateExternalSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateExternalSystemRequest").msgclass - UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateFindingRequest").msgclass - UpdateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateMuteConfigRequest").msgclass - UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateNotificationConfigRequest").msgclass - UpdateOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest").msgclass - UpdateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest").msgclass - UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSourceRequest").msgclass - UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSecurityMarksRequest").msgclass - CreateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateBigQueryExportRequest").msgclass - UpdateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateBigQueryExportRequest").msgclass - ListBigQueryExportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListBigQueryExportsRequest").msgclass - ListBigQueryExportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListBigQueryExportsResponse").msgclass - DeleteBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteBigQueryExportRequest").msgclass - CreateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest").msgclass - ValidateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest").msgclass - ValidateEventThreatDetectionCustomModuleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse").msgclass - DeleteEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest").msgclass - GetEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest").msgclass - ListDescendantEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest").msgclass - ListDescendantEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse").msgclass - ListEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest").msgclass - ListEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse").msgclass - UpdateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest").msgclass - GetEffectiveEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest").msgclass - ListEffectiveEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest").msgclass - ListEffectiveEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb deleted file mode 100644 index 0d62cc122298..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +++ /dev/null @@ -1,226 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/securitycenter/v1/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/securitycenter/v1/securitycenter_service_pb' - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - # V1 APIs for Security Center service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.securitycenter.v1.SecurityCenter' - - # Kicks off an LRO to bulk mute findings for a parent based on a filter. The - # parent can be either an organization, folder or project. The findings - # matched by the filter will be muted after the LRO is done. - rpc :BulkMuteFindings, ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Google::Longrunning::Operation - # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - # given CRM parent, and also creates inherited - # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - # parent. These modules are enabled by default. - rpc :CreateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule - # Creates a source. - rpc :CreateSource, ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source - # Creates a finding. The corresponding source must exist for finding creation - # to succeed. - rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V1::Finding - # Creates a mute config. - rpc :CreateMuteConfig, ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig - # Creates a notification config. - rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig - # Deletes an existing mute config. - rpc :DeleteMuteConfig, ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Google::Protobuf::Empty - # Deletes a notification config. - rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty - # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - # descendants in the CRM hierarchy. This method is only supported for - # resident custom modules. - rpc :DeleteSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Google::Protobuf::Empty - # Get the simulation by name or the latest simulation for the given - # organization. - rpc :GetSimulation, ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Google::Cloud::SecurityCenter::V1::Simulation - # Get the valued resource by name - rpc :GetValuedResource, ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Google::Cloud::SecurityCenter::V1::ValuedResource - # Gets a BigQuery export. - rpc :GetBigQueryExport, ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport - # Gets the access control policy on the specified Source. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets a mute config. - rpc :GetMuteConfig, ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig - # Gets a notification config. - rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig - # Gets the settings for an organization. - rpc :GetOrganizationSettings, ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1::OrganizationSettings - # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. - rpc :GetEffectiveSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule - # Retrieves a SecurityHealthAnalyticsCustomModule. - rpc :GetSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule - # Gets a source. - rpc :GetSource, ::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source - # Filters an organization's assets and groups them by their specified - # properties. - rpc :GroupAssets, ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/{organization_id}/sources/-/findings, - # /v1/folders/{folder_id}/sources/-/findings, - # /v1/projects/{project_id}/sources/-/findings - rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse - # Lists an organization's assets. - rpc :ListAssets, ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse - # Returns a list of all resident SecurityHealthAnalyticsCustomModules under - # the given CRM parent and all of the parent’s CRM descendants. - rpc :ListDescendantSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1/organizations/{organization_id}/sources/-/findings - rpc :ListFindings, ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse - # Lists mute configs. - rpc :ListMuteConfigs, ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse - # Lists notification configs. - rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse - # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - # given parent. This includes resident modules defined at the scope of the - # parent, and inherited modules, inherited from CRM ancestors. - rpc :ListEffectiveSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - # Returns a list of all SecurityHealthAnalyticsCustomModules for the given - # parent. This includes resident modules defined at the scope of the parent, - # and inherited modules, inherited from CRM ancestors. - rpc :ListSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse - # Lists all sources belonging to an organization. - rpc :ListSources, ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - rpc :RunAssetDiscovery, ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Google::Longrunning::Operation - # Updates the state of a finding. - rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V1::Finding - # Updates the mute state of a finding. - rpc :SetMute, ::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Google::Cloud::SecurityCenter::V1::Finding - # Sets the access control policy on the specified Source. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the permissions that a caller has on the specified source. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. - rpc :SimulateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse - # Updates external system. This is for a given finding. - rpc :UpdateExternalSystem, ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Google::Cloud::SecurityCenter::V1::ExternalSystem - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V1::Finding - # Updates a mute config. - rpc :UpdateMuteConfig, ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig - # - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig - # Updates an organization's settings. - rpc :UpdateOrganizationSettings, ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1::OrganizationSettings - # Updates the SecurityHealthAnalyticsCustomModule under the given name based - # on the given update mask. Updating the enablement state is supported on - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name and custom - # config of a module is supported on resident modules only. - rpc :UpdateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule - # Updates a source. - rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source - # Updates security marks. - rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V1::SecurityMarks - # Creates a BigQuery export. - rpc :CreateBigQueryExport, ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport - # Deletes an existing BigQuery export. - rpc :DeleteBigQueryExport, ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Google::Protobuf::Empty - # Updates a BigQuery export. - rpc :UpdateBigQueryExport, ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - rpc :ListBigQueryExports, ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse - # Creates a resident Event Threat Detection custom module at the scope of the - # given Resource Manager parent, and also creates inherited custom modules - # for all descendants of the given parent. These modules are enabled by - # default. - rpc :CreateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule - # Deletes the specified Event Threat Detection custom module and all of its - # descendants in the Resource Manager hierarchy. This method is only - # supported for resident custom modules. - rpc :DeleteEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Google::Protobuf::Empty - # Gets an Event Threat Detection custom module. - rpc :GetEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule - # Lists all resident Event Threat Detection custom modules under the - # given Resource Manager parent and its descendants. - rpc :ListDescendantEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse - # Lists all Event Threat Detection custom modules for the given - # Resource Manager parent. This includes resident modules defined at the - # scope of the parent along with modules inherited from ancestors. - rpc :ListEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse - # Updates the Event Threat Detection custom module with the given name based - # on the given update mask. Updating the enablement state is supported for - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name or - # configuration of a module is supported for resident modules only. The type - # of a module cannot be changed. - rpc :UpdateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule - # Validates the given Event Threat Detection custom module. - rpc :ValidateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse - # Gets an effective Event Threat Detection custom module at the given level. - rpc :GetEffectiveEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule - # Lists all effective Event Threat Detection custom modules for the - # given parent. This includes resident modules defined at the scope of the - # parent along with modules inherited from its ancestors. - rpc :ListEffectiveEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - rpc :BatchCreateResourceValueConfigs, ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse - # Deletes a ResourceValueConfig. - rpc :DeleteResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Google::Protobuf::Empty - # Gets a ResourceValueConfig. - rpc :GetResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig - # Lists all ResourceValueConfigs. - rpc :ListResourceValueConfigs, ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse - # Updates an existing ResourceValueConfigs with new rules. - rpc :UpdateResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig - # Lists the valued resources for a set of simulation results and filter. - rpc :ListValuedResources, ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - rpc :ListAttackPaths, ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb deleted file mode 100644 index 577a4d977a3a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/simulation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1/resource_pb' -require 'google/cloud/securitycenter/v1/valued_resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/simulation.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v1/resource.proto\x1a\x34google/cloud/securitycenter/v1/valued_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x02\n\nSimulation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x64\n\x1fresource_value_configs_metadata\x18\x03 \x03(\x0b\x32;.google.cloud.securitycenter.v1.ResourceValueConfigMetadata\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.CloudProvider:}\xea\x41z\n(securitycenter.googleapis.com/Simulation\x12\x35organizations/{organization}/simulations/{simulation}*\x0bsimulations2\nsimulationB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fSimulationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Simulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Simulation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb deleted file mode 100644 index 2f7921ed6f0b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/source.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n+google/cloud/securitycenter/v1/source.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xfd\x01\n\x06Source\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t:\xa1\x01\xea\x41\x9d\x01\n$securitycenter.googleapis.com/Source\x12-organizations/{organization}/sources/{source}\x12!folders/{folder}/sources/{source}\x12#projects/{project}/sources/{source}B\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Source").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb deleted file mode 100644 index 78da4c94159e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/toxic_combination.proto - -require 'google/protobuf' - - -descriptor_data = "\n6google/cloud/securitycenter/v1/toxic_combination.proto\x12\x1egoogle.cloud.securitycenter.v1\"K\n\x10ToxicCombination\x12\x1d\n\x15\x61ttack_exposure_score\x18\x01 \x01(\x01\x12\x18\n\x10related_findings\x18\x02 \x03(\tB\xef\x01\n\"com.google.cloud.securitycenter.v1B\x15ToxicCombinationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ToxicCombination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ToxicCombination").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb deleted file mode 100644 index c0a8708958bb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/valued_resource.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/valued_resource.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xd8\x04\n\x0eValuedResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08resource\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12T\n\x0eresource_value\x18\x05 \x01(\x0e\x32<.google.cloud.securitycenter.v1.ValuedResource.ResourceValue\x12\x15\n\rexposed_score\x18\x06 \x01(\x01\x12`\n\x1bresource_value_configs_used\x18\x07 \x03(\x0b\x32;.google.cloud.securitycenter.v1.ResourceValueConfigMetadata\"{\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_VALUE_LOW\x10\x01\x12\x19\n\x15RESOURCE_VALUE_MEDIUM\x10\x02\x12\x17\n\x13RESOURCE_VALUE_HIGH\x10\x03:\xac\x01\xea\x41\xa8\x01\n,securitycenter.googleapis.com/ValuedResource\x12Worganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}*\x0fvaluedResources2\x0evaluedResource\"+\n\x1bResourceValueConfigMetadata\x12\x0c\n\x04name\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13ValuedResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ValuedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValuedResource").msgclass - ValuedResource::ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValuedResource.ResourceValue").enummodule - ResourceValueConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ResourceValueConfigMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb deleted file mode 100644 index 64dcf8c6b5f7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/vulnerability.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/securitycenter/v1/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v1.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.SecurityBulletin\"\x8a\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v1.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v1.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v1.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v1.Cve.ExploitationActivity\x12\x1c\n\x14observed_in_the_wild\x18\x07 \x01(\x08\x12\x10\n\x08zero_day\x18\x08 \x01(\x08\x12\x38\n\x14\x65xploit_release_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nRiskRating\x12\x1b\n\x17RISK_RATING_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"\x84\x01\n\x14\x45xploitationActivity\x12%\n!EXPLOITATION_ACTIVITY_UNSPECIFIED\x10\x00\x12\x08\n\x04WIDE\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\x0f\n\x0b\x41NTICIPATED\x10\x04\x12\x0c\n\x08NO_KNOWN\x10\x05\"(\n\tReference\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xb1\n\n\x06\x43vssv3\x12\x12\n\nbase_score\x18\x01 \x01(\x01\x12J\n\rattack_vector\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v1.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x06 \x01(\x0e\x32\x37.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x07 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x08 \x01(\x0e\x32\x36.google.cloud.securitycenter.v1.Cvssv3.UserInteraction\x12;\n\x05scope\x18\t \x01(\x0e\x32,.google.cloud.securitycenter.v1.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x0b \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"_\n\x07Package\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x17\n\x0fpackage_version\x18\x04 \x01(\t\"\x7f\n\x10SecurityBulletin\x12\x13\n\x0b\x62ulletin_id\x18\x01 \x01(\t\x12\x33\n\x0fsubmission_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19suggested_upgrade_version\x18\x03 \x01(\tB\xec\x01\n\"com.google.cloud.securitycenter.v1B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Vulnerability").msgclass - Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve").msgclass - Cve::RiskRating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve.RiskRating").enummodule - Cve::ExploitationActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve.ExploitationActivity").enummodule - Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Reference").msgclass - Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3").msgclass - Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackVector").enummodule - Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackComplexity").enummodule - Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired").enummodule - Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.UserInteraction").enummodule - Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Scope").enummodule - Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Impact").enummodule - Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Package").msgclass - SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SecurityBulletin").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md deleted file mode 100644 index 2477ff9d487e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Security Command Center V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb deleted file mode 100644 index 31e390d3f8a1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb +++ /dev/null @@ -1,120 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents an access event. - # @!attribute [rw] principal_email - # @return [::String] - # Associated email, such as "foo@google.com". - # - # The email address of the authenticated user or a service account acting on - # behalf of a third party principal making the request. For third party - # identity callers, the `principal_subject` field is populated instead of - # this field. For privacy reasons, the principal email address is sometimes - # redacted. For more information, see [Caller identities in audit - # logs](https://cloud.google.com/logging/docs/audit#user-id). - # @!attribute [rw] caller_ip - # @return [::String] - # Caller's IP address, such as "1.1.1.1". - # @!attribute [rw] caller_ip_geo - # @return [::Google::Cloud::SecurityCenter::V1::Geolocation] - # The caller IP's geolocation, which identifies where the call came from. - # @!attribute [rw] user_agent_family - # @return [::String] - # Type of user agent associated with the finding. For example, an operating - # system shell or an embedded or standalone application. - # @!attribute [rw] user_agent - # @return [::String] - # The caller's user agent string associated with the finding. - # @!attribute [rw] service_name - # @return [::String] - # This is the API service that the service account made a call to, e.g. - # "iam.googleapis.com" - # @!attribute [rw] method_name - # @return [::String] - # The method that the service account called, e.g. "SetIamPolicy". - # @!attribute [rw] principal_subject - # @return [::String] - # A string that represents the principal_subject that is associated with the - # identity. Unlike `principal_email`, `principal_subject` supports principals - # that aren't associated with email addresses, such as third party - # principals. For most identities, the format is - # `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. - # Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, - # still use the legacy format `serviceAccount:{identity pool - # name}[\\{subject}]`. - # @!attribute [rw] service_account_key_name - # @return [::String] - # The name of the service account key that was used to create or exchange - # credentials when authenticating the service account that made the request. - # This is a scheme-less URI full resource name. For example: - # - # "//iam.googleapis.com/projects/\\{PROJECT_ID}/serviceAccounts/\\{ACCOUNT}/keys/\\{key}". - # @!attribute [rw] service_account_delegation_info - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ServiceAccountDelegationInfo>] - # The identity delegation history of an authenticated service account that - # made the request. The `serviceAccountDelegationInfo[]` object contains - # information about the real authorities that try to access Google Cloud - # resources by delegating on a service account. When multiple authorities are - # present, they are guaranteed to be sorted based on the original ordering of - # the identity delegation events. - # @!attribute [rw] user_name - # @return [::String] - # A string that represents a username. The username provided depends on the - # type of the finding and is likely not an IAM principal. For example, this - # can be a system username if the finding is related to a virtual machine, or - # it can be an application login username. - class Access - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identity delegation history of an authenticated service account. - # @!attribute [rw] principal_email - # @return [::String] - # The email address of a Google account. - # @!attribute [rw] principal_subject - # @return [::String] - # A string representing the principal_subject associated with the identity. - # As compared to `principal_email`, supports principals that aren't - # associated with email addresses, such as third party principals. For most - # identities, the format will be `principal://iam.googleapis.com/{identity - # pool name}/subjects/\\{subject}` except for some GKE identities - # (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - # format `serviceAccount:{identity pool name}[{subject}]` - class ServiceAccountDelegationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a geographical location for a given access. - # @!attribute [rw] region_code - # @return [::String] - # A CLDR. - class Geolocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb deleted file mode 100644 index 219bf34fde42..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents an application associated with a finding. - # @!attribute [rw] base_uri - # @return [::String] - # The base URI that identifies the network location of the application in - # which the vulnerability was detected. For example, `http://example.com`. - # @!attribute [rw] full_uri - # @return [::String] - # The full URI with payload that can be used to reproduce the - # vulnerability. For example, `http://example.com?p=aMmYgI6H`. - class Application - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb deleted file mode 100644 index d04b5a46cc91..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Security Command Center representation of a Google Cloud - # resource. - # - # The Asset is a Security Command Center resource that captures information - # about a single Google Cloud resource. All modifications to an Asset are only - # within the context of Security Command Center and don't affect the referenced - # Google Cloud resource. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this asset. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/assets/\\{asset_id}". - # @!attribute [rw] security_center_properties - # @return [::Google::Cloud::SecurityCenter::V1::Asset::SecurityCenterProperties] - # Security Command Center managed properties. These properties are managed by - # Security Command Center and cannot be modified by the user. - # @!attribute [rw] resource_properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Resource managed properties. These properties are managed and defined by - # the Google Cloud resource and cannot be modified by the user. - # @!attribute [rw] security_marks - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # User specified security marks. These marks are entirely managed by the user - # and come from the SecurityMarks resource that belongs to the asset. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the asset was created in Security Command Center. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the asset was last updated or added in Cloud SCC. - # @!attribute [rw] iam_policy - # @return [::Google::Cloud::SecurityCenter::V1::Asset::IamPolicy] - # Cloud IAM Policy information associated with the Google Cloud resource - # described by the Security Command Center asset. This information is managed - # and defined by the Google Cloud resource and cannot be modified by the - # user. - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the resource. It's either - # "organizations/\\{organization_id}/assets/\\{asset_id}", - # "folders/\\{folder_id}/assets/\\{asset_id}" or - # "projects/\\{project_number}/assets/\\{asset_id}", depending on the closest CRM - # ancestor of the resource. - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security Command Center managed properties. These properties are managed by - # Security Command Center and cannot be modified by the user. - # @!attribute [rw] resource_name - # @return [::String] - # The full resource name of the Google Cloud resource this asset - # represents. This field is immutable after create time. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_type - # @return [::String] - # The type of the Google Cloud resource. Examples include: APPLICATION, - # PROJECT, and ORGANIZATION. This is a case insensitive field defined by - # Security Command Center and/or the producer of the resource and is - # immutable after create time. - # @!attribute [rw] resource_parent - # @return [::String] - # The full resource name of the immediate parent of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_project - # @return [::String] - # The full resource name of the project the resource belongs to. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_owners - # @return [::Array<::String>] - # Owners of the Google Cloud resource. - # @!attribute [rw] resource_display_name - # @return [::String] - # The user defined display name for this resource. - # @!attribute [rw] resource_parent_display_name - # @return [::String] - # The user defined display name for the parent of this resource. - # @!attribute [rw] resource_project_display_name - # @return [::String] - # The user defined display name for the project of this resource. - # @!attribute [rw] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] - # Contains a Folder message for each folder in the assets ancestry. - # The first folder is the deepest nested folder, and the last folder is the - # folder directly under the Organization. - class SecurityCenterProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cloud IAM Policy information associated with the Google Cloud resource - # described by the Security Command Center asset. This information is managed - # and defined by the Google Cloud resource and cannot be modified by the - # user. - # @!attribute [rw] policy_blob - # @return [::String] - # The JSON representation of the Policy associated with the asset. - # See https://cloud.google.com/iam/reference/rest/v1/Policy for format - # details. - class IamPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class ResourcePropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb deleted file mode 100644 index 51bd94f1fd18..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # An attack exposure contains the results of an attack path simulation run. - # @!attribute [rw] score - # @return [::Float] - # A number between 0 (inclusive) and infinity that represents how important - # this finding is to remediate. The higher the score, the more important it - # is to remediate. - # @!attribute [rw] latest_calculation_time - # @return [::Google::Protobuf::Timestamp] - # The most recent time the attack exposure was updated on this finding. - # @!attribute [rw] attack_exposure_result - # @return [::String] - # The resource name of the attack path simulation result that contains the - # details regarding this attack exposure score. - # Example: `organizations/123/simulations/456/attackExposureResults/789` - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::AttackExposure::State] - # What state this AttackExposure is in. This captures whether or not an - # attack exposure has been calculated or not. - # @!attribute [rw] exposed_high_value_resources_count - # @return [::Integer] - # The number of high value resources that are exposed as a result of this - # finding. - # @!attribute [rw] exposed_medium_value_resources_count - # @return [::Integer] - # The number of medium value resources that are exposed as a result of this - # finding. - # @!attribute [rw] exposed_low_value_resources_count - # @return [::Integer] - # The number of high value resources that are exposed as a result of this - # finding. - class AttackExposure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This enum defines the various states an AttackExposure can be in. - module State - # The state is not specified. - STATE_UNSPECIFIED = 0 - - # The attack exposure has been calculated. - CALCULATED = 1 - - # The attack exposure has not been calculated. - NOT_CALCULATED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb deleted file mode 100644 index 9a78a90341b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb +++ /dev/null @@ -1,147 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # A path that an attacker could take to reach an exposed resource. - # @!attribute [rw] name - # @return [::String] - # The attack path name, for example, - # `organizations/12/simulation/34/valuedResources/56/attackPaths/78` - # @!attribute [rw] path_nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode>] - # A list of nodes that exist in this attack path. - # @!attribute [rw] edges - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathEdge>] - # A list of the edges between nodes in this attack path. - class AttackPath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents one point that an attacker passes through in this attack path. - # @!attribute [rw] resource - # @return [::String] - # The name of the resource at this point in the attack path. - # The format of the name follows the Cloud Asset Inventory [resource - # name - # format](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # @!attribute [rw] resource_type - # @return [::String] - # The [supported resource - # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # @!attribute [rw] display_name - # @return [::String] - # Human-readable name of this resource. - # @!attribute [rw] associated_findings - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::PathNodeAssociatedFinding>] - # The findings associated with this node in the attack path. - # @!attribute [rw] uuid - # @return [::String] - # Unique id of the attack path node. - # @!attribute [rw] attack_steps - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::AttackStepNode>] - # A list of attack step nodes that exist in this attack path node. - class AttackPathNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A finding that is associated with this node in the attack path. - # @!attribute [rw] canonical_finding - # @return [::String] - # Canonical name of the associated findings. Example: - # `organizations/123/sources/456/findings/789` - # @!attribute [rw] finding_category - # @return [::String] - # The additional taxonomy group within findings from a given source. - # @!attribute [rw] name - # @return [::String] - # Full resource name of the finding. - class PathNodeAssociatedFinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detailed steps the attack can take between path nodes. - # @!attribute [rw] uuid - # @return [::String] - # Unique ID for one Node - # @!attribute [rw] type - # @return [::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::NodeType] - # Attack step type. Can be either AND, OR or DEFENSE - # @!attribute [rw] display_name - # @return [::String] - # User friendly name of the attack step - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Attack step labels for metadata - # @!attribute [rw] description - # @return [::String] - # Attack step description - class AttackStepNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The type of the incoming attack step node. - module NodeType - # Type not specified - NODE_TYPE_UNSPECIFIED = 0 - - # Incoming edge joined with AND - NODE_TYPE_AND = 1 - - # Incoming edge joined with OR - NODE_TYPE_OR = 2 - - # Incoming edge is defense - NODE_TYPE_DEFENSE = 3 - - # Incoming edge is attacker - NODE_TYPE_ATTACKER = 4 - end - end - - # Represents a connection between a source node and a destination node in - # this attack path. - # @!attribute [rw] source - # @return [::String] - # The attack node uuid of the source node. - # @!attribute [rw] destination - # @return [::String] - # The attack node uuid of the destination node. - class AttackPathEdge - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb deleted file mode 100644 index 8f4297aa756e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Information related to Google Cloud Backup and DR Service findings. - # @!attribute [rw] backup_template - # @return [::String] - # The name of a Backup and DR template which comprises one or more backup - # policies. See the [Backup and DR - # documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) - # for more information. For example, `snap-ov`. - # @!attribute [rw] policies - # @return [::Array<::String>] - # The names of Backup and DR policies that are associated with a template - # and that define when to run a backup, how frequently to run a backup, and - # how long to retain the backup image. For example, `onvaults`. - # @!attribute [rw] host - # @return [::String] - # The name of a Backup and DR host, which is managed by the backup and - # recovery appliance and known to the management console. The host can be of - # type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file - # system, etc.), vCenter, or an ESX server. See the [Backup and DR - # documentation on - # hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) - # for more information. For example, `centos7-01`. - # @!attribute [rw] applications - # @return [::Array<::String>] - # The names of Backup and DR applications. An application is a VM, database, - # or file system on a managed host monitored by a backup and recovery - # appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, - # `centos7-01-vol02`. - # @!attribute [rw] storage_pool - # @return [::String] - # The name of the Backup and DR storage pool that the backup and recovery - # appliance is storing data in. The storage pool could be of type Cloud, - # Primary, Snapshot, or OnVault. See the [Backup and DR documentation on - # storage - # pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). - # For example, `DiskPoolOne`. - # @!attribute [rw] policy_options - # @return [::Array<::String>] - # The names of Backup and DR advanced policy options of a policy applying to - # an application. See the [Backup and DR documentation on policy - # options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). - # For example, `skipofflineappsincongrp, nounmap`. - # @!attribute [rw] profile - # @return [::String] - # The name of the Backup and DR resource profile that specifies the storage - # media for backups of application and VM data. See the [Backup and DR - # documentation on - # profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). - # For example, `GCP`. - # @!attribute [rw] appliance - # @return [::String] - # The name of the Backup and DR appliance that captures, moves, and manages - # the lifecycle of backup data. For example, `backup-server-57137`. - # @!attribute [rw] backup_type - # @return [::String] - # The backup type of the Backup and DR image. - # For example, `Snapshot`, `Remote Snapshot`, `OnVault`. - # @!attribute [rw] backup_create_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp at which the Backup and DR backup was created. - class BackupDisasterRecovery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb deleted file mode 100644 index f558699d1218..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Configures how to deliver Findings to BigQuery Instance. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this export. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name. - # Example format: - # "organizations/\\{organization_id}/bigQueryExports/\\{export_id}" Example - # format: "folders/\\{folder_id}/bigQueryExports/\\{export_id}" Example format: - # "projects/\\{project_id}/bigQueryExports/\\{export_id}" - # This field is provided in responses, and is ignored when provided in create - # requests. - # @!attribute [rw] description - # @return [::String] - # The description of the export (max of 1024 characters). - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across create/update events - # of findings. The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @!attribute [rw] dataset - # @return [::String] - # The dataset to write findings' updates to. Its format is - # "projects/[project_id]/datasets/[bigquery_dataset_id]". - # BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers - # (0-9), or underscores (_). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the BigQuery export was created. - # This field is set by the server and will be ignored if provided on export - # on creation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time at which the BigQuery export was updated. - # This field is set by the server and will be ignored if provided on export - # creation or update. - # @!attribute [r] most_recent_editor - # @return [::String] - # Output only. Email address of the user who last edited the BigQuery export. - # This field is set by the server and will be ignored if provided on export - # creation or update. - # @!attribute [r] principal - # @return [::String] - # Output only. The service account that needs permission to create table and - # upload data to the BigQuery dataset. - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb deleted file mode 100644 index d16907c3f4b8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains details about a chokepoint, which is a resource or resource group - # where high-risk attack paths converge, based on [attack path simulations] - # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). - # @!attribute [rw] related_findings - # @return [::Array<::String>] - # List of resource names of findings associated with this chokepoint. - # For example, organizations/123/sources/456/findings/789. - # This list will have at most 100 findings. - class Chokepoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb deleted file mode 100644 index 589ad76bf248..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Fields related to Google Cloud Armor findings. - # @!attribute [rw] security_policy - # @return [::Google::Cloud::SecurityCenter::V1::SecurityPolicy] - # Information about the [Google Cloud Armor security - # policy](https://cloud.google.com/armor/docs/security-policy-overview) - # relevant to the finding. - # @!attribute [rw] requests - # @return [::Google::Cloud::SecurityCenter::V1::Requests] - # Information about incoming requests evaluated by [Google Cloud Armor - # security - # policies](https://cloud.google.com/armor/docs/security-policy-overview). - # @!attribute [rw] adaptive_protection - # @return [::Google::Cloud::SecurityCenter::V1::AdaptiveProtection] - # Information about potential Layer 7 DDoS attacks identified by [Google - # Cloud Armor Adaptive - # Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). - # @!attribute [rw] attack - # @return [::Google::Cloud::SecurityCenter::V1::Attack] - # Information about DDoS attack volume and classification. - # @!attribute [rw] threat_vector - # @return [::String] - # Distinguish between volumetric & protocol DDoS attack and - # application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS - # attacks, or "L_7" for Layer 7 DDoS attacks. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Duration of attack from the start until the current moment (updated every 5 - # minutes). - class CloudArmor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the [Google Cloud Armor security - # policy](https://cloud.google.com/armor/docs/security-policy-overview) - # relevant to the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the Google Cloud Armor security policy, for example, - # "my-security-policy". - # @!attribute [rw] type - # @return [::String] - # The type of Google Cloud Armor security policy for example, 'backend - # security policy', 'edge security policy', 'network edge security policy', - # or 'always-on DDoS protection'. - # @!attribute [rw] preview - # @return [::Boolean] - # Whether or not the associated rule or policy is in preview mode. - class SecurityPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the requests relevant to the finding. - # @!attribute [rw] ratio - # @return [::Float] - # For 'Increasing deny ratio', the ratio is the denied traffic divided by the - # allowed traffic. For 'Allowed traffic spike', the ratio is the allowed - # traffic in the short term divided by allowed traffic in the long term. - # @!attribute [rw] short_term_allowed - # @return [::Integer] - # Allowed RPS (requests per second) in the short term. - # @!attribute [rw] long_term_allowed - # @return [::Integer] - # Allowed RPS (requests per second) over the long term. - # @!attribute [rw] long_term_denied - # @return [::Integer] - # Denied RPS (requests per second) over the long term. - class Requests - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about [Google Cloud Armor Adaptive - # Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). - # @!attribute [rw] confidence - # @return [::Float] - # A score of 0 means that there is low confidence that the detected event is - # an actual attack. A score of 1 means that there is high confidence that the - # detected event is an attack. See the [Adaptive Protection - # documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) - # for further explanation. - class AdaptiveProtection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about DDoS attack volume and classification. - # @!attribute [rw] volume_pps - # @return [::Integer] - # Total PPS (packets per second) volume of attack. - # @!attribute [rw] volume_bps - # @return [::Integer] - # Total BPS (bytes per second) volume of attack. - # @!attribute [rw] classification - # @return [::String] - # Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. - class Attack - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb deleted file mode 100644 index 83d9ad22a479..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb +++ /dev/null @@ -1,114 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # The [data profile](https://cloud.google.com/dlp/docs/data-profiles) - # associated with the finding. - # @!attribute [rw] data_profile - # @return [::String] - # Name of the data profile, for example, - # `projects/123/locations/europe/tableProfiles/8383929`. - # @!attribute [rw] parent_type - # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpDataProfile::ParentType] - # The resource hierarchy level at which the data profile was generated. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::SecurityCenter::V1::InfoType>] - # Type of information detected by SDP. - # Info type includes name, version and sensitivity of the detected - # information type. - class CloudDlpDataProfile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Parents for configurations that produce data profile findings. - module ParentType - # Unspecified parent type. - PARENT_TYPE_UNSPECIFIED = 0 - - # Organization-level configurations. - ORGANIZATION = 1 - - # Project-level configurations. - PROJECT = 2 - end - end - - # Type of information detected by the API. - # @!attribute [rw] name - # @return [::String] - # Name of the information type. Either a name of your choosing when - # creating a CustomInfoType, or one of the names listed - # at - # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference - # when specifying a built-in type. When sending Cloud DLP results to Data - # Catalog, infoType names should conform to the pattern - # `[A-Za-z0-9$_-]{1,64}`. - # @!attribute [rw] version - # @return [::String] - # Optional version name for this InfoType. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::SecurityCenter::V1::SensitivityScore] - # Optional custom sensitivity for this InfoType. - # This only applies to data profiling. - class InfoType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Score is calculated from of all elements in the data profile. - # A higher level means the data is more sensitive. - # @!attribute [rw] score - # @return [::Google::Cloud::SecurityCenter::V1::SensitivityScore::SensitivityScoreLevel] - # The sensitivity score applied to the resource. - class SensitivityScore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Various sensitivity score levels for resources. - module SensitivityScoreLevel - # Unused. - SENSITIVITY_SCORE_LEVEL_UNSPECIFIED = 0 - - # No sensitive information detected. The resource isn't publicly - # accessible. - SENSITIVITY_LOW = 10 - - # Unable to determine sensitivity. - SENSITIVITY_UNKNOWN = 12 - - # Medium risk. Contains personally identifiable information (PII), - # potentially sensitive data, or fields with free-text data that are at a - # higher risk of having intermittent sensitive data. Consider limiting - # access. - SENSITIVITY_MODERATE = 20 - - # High risk. Sensitive personally identifiable information (SPII) can be - # present. Exfiltration of data can lead to user data loss. - # Re-identification of users might be possible. Consider limiting usage and - # or removing SPII. - SENSITIVITY_HIGH = 30 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb deleted file mode 100644 index 9faad618c6f4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection - # job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced - # the finding. - # @!attribute [rw] inspect_job - # @return [::String] - # Name of the inspection job, for example, - # `projects/123/locations/europe/dlpJobs/i-8383929`. - # @!attribute [rw] info_type - # @return [::String] - # The type of information (or - # *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, - # for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. - # @!attribute [rw] info_type_count - # @return [::Integer] - # The number of times Cloud DLP found this infoType within this job - # and resource. - # @!attribute [rw] full_scan - # @return [::Boolean] - # Whether Cloud DLP scanned the complete resource or a sampled subset. - class CloudDlpInspection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb deleted file mode 100644 index 158ef2e388fe..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains compliance information about a security standard indicating unmet - # recommendations. - # @!attribute [rw] standard - # @return [::String] - # Industry-wide compliance standards or benchmarks, such as CIS, PCI, and - # OWASP. - # @!attribute [rw] version - # @return [::String] - # Version of the standard or benchmark, for example, 1.1 - # @!attribute [rw] ids - # @return [::Array<::String>] - # Policies within the standard or benchmark, for example, A.12.4.1 - class Compliance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb deleted file mode 100644 index b44d3c237ea7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains information about the IP connection associated with the finding. - # @!attribute [rw] destination_ip - # @return [::String] - # Destination IP address. Not present for sockets that are listening and not - # connected. - # @!attribute [rw] destination_port - # @return [::Integer] - # Destination port. Not present for sockets that are listening and not - # connected. - # @!attribute [rw] source_ip - # @return [::String] - # Source IP address. - # @!attribute [rw] source_port - # @return [::Integer] - # Source port. - # @!attribute [rw] protocol - # @return [::Google::Cloud::SecurityCenter::V1::Connection::Protocol] - # IANA Internet Protocol Number such as TCP(6) and UDP(17). - class Connection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # IANA Internet Protocol Number such as TCP(6) and UDP(17). - module Protocol - # Unspecified protocol (not HOPOPT). - PROTOCOL_UNSPECIFIED = 0 - - # Internet Control Message Protocol. - ICMP = 1 - - # Transmission Control Protocol. - TCP = 6 - - # User Datagram Protocol. - UDP = 17 - - # Generic Routing Encapsulation. - GRE = 47 - - # Encap Security Payload. - ESP = 50 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb deleted file mode 100644 index de91713678d6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Details about specific contacts - # @!attribute [rw] contacts - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Contact>] - # A list of contacts - class ContactDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The email address of a contact. - # @!attribute [rw] email - # @return [::String] - # An email address. For example, "`person123@company.com`". - class Contact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb deleted file mode 100644 index acc0a1015fa9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Container associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Name of the container. - # @!attribute [rw] uri - # @return [::String] - # Container image URI provided when configuring a pod or container. This - # string can identify a container image version using mutable tags. - # @!attribute [rw] image_id - # @return [::String] - # Optional container image ID, if provided by the container runtime. Uniquely - # identifies the container image launched using a container image digest. - # @!attribute [rw] labels - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Label>] - # Container labels, as provided by the container runtime. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time that the container was created. - class Container - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb deleted file mode 100644 index 2294178aef6c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents database access information, such as queries. A database may be a - # sub-resource of an instance (as in the case of Cloud SQL instances or Cloud - # Spanner instances), or the database instance itself. Some database resources - # might not have the [full resource - # name](https://google.aip.dev/122#full-resource-names) populated because these - # resource types, such as Cloud SQL databases, are not yet supported by Cloud - # Asset Inventory. In these cases only the display name is provided. - # @!attribute [rw] name - # @return [::String] - # Some database resources may not have the [full resource - # name](https://google.aip.dev/122#full-resource-names) populated because - # these resource types are not yet supported by Cloud Asset Inventory (e.g. - # Cloud SQL databases). In these cases only the display name will be - # provided. - # The [full resource name](https://google.aip.dev/122#full-resource-names) of - # the database that the user connected to, if it is supported by Cloud Asset - # Inventory. - # @!attribute [rw] display_name - # @return [::String] - # The human-readable name of the database that the user connected to. - # @!attribute [rw] user_name - # @return [::String] - # The username used to connect to the database. The username might not be an - # IAM principal and does not have a set format. - # @!attribute [rw] query - # @return [::String] - # The SQL statement that is associated with the database access. - # @!attribute [rw] grantees - # @return [::Array<::String>] - # The target usernames, roles, or groups of an SQL privilege grant, which is - # not an IAM policy change. - # @!attribute [rw] version - # @return [::String] - # The version of the database, for example, POSTGRES_14. - # See [the complete - # list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). - class Database - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb deleted file mode 100644 index 06a03cf035f5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # An EffectiveEventThreatDetectionCustomModule is the representation of - # an Event Threat Detection custom module at a specified level of the - # resource hierarchy: organization, folder, or project. If a custom module is - # inherited from a parent organization or folder, the value of the - # `enablement_state` property in EffectiveEventThreatDetectionCustomModule is - # set to the value that is effective in the parent, instead of `INHERITED`. - # For example, if the module is enabled in a parent organization or folder, the - # effective `enablement_state` for the module in all child folders or projects - # is also `enabled`. EffectiveEventThreatDetectionCustomModule is read-only. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the effective ETD custom module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # @!attribute [r] config - # @return [::Google::Protobuf::Struct] - # Output only. Config for the effective module. - # @!attribute [r] enablement_state - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule::EnablementState] - # Output only. The effective state of enablement for the module at the given - # level of the hierarchy. - # @!attribute [r] type - # @return [::String] - # Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. - # @!attribute [r] display_name - # @return [::String] - # Output only. The human readable name to be displayed for the module. - # @!attribute [r] description - # @return [::String] - # Output only. The description for the module. - class EffectiveEventThreatDetectionCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb deleted file mode 100644 index 83aab7af710b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # An EffectiveSecurityHealthAnalyticsCustomModule is the representation of - # a Security Health Analytics custom module at a specified level of the - # resource hierarchy: organization, folder, or project. If a custom module is - # inherited from a parent organization or folder, the value of the - # `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is - # set to the value that is effective in the parent, instead of `INHERITED`. - # For example, if the module is enabled in a parent organization or folder, the - # effective enablement_state for the module in all child folders or projects is - # also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the custom module. - # Its format is - # "organizations/\\{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}", - # or - # "folders/\\{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}", - # or - # "projects/\\{project}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}" - # @!attribute [r] custom_config - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] - # Output only. The user-specified configuration for the module. - # @!attribute [r] enablement_state - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule::EnablementState] - # Output only. The effective state of enablement for the module at the given - # level of the hierarchy. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name for the custom module. The name must be - # between 1 and 128 characters, start with a lowercase letter, and contain - # alphanumeric characters or underscores only. - class EffectiveSecurityHealthAnalyticsCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb deleted file mode 100644 index e5b28d560c27..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents an instance of an Event Threat Detection custom module, - # including its full module name, display name, enablement state, and last - # updated time. You can create a custom module at the organization, folder, or - # project level. Custom modules that you create at the organization or folder - # level are inherited by child folders and projects. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of the Event Threat Detection custom module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # @!attribute [rw] config - # @return [::Google::Protobuf::Struct] - # Config for the module. For the resident module, its config value is defined - # at this level. For the inherited module, its config value is inherited from - # the ancestor module. - # @!attribute [r] ancestor_module - # @return [::String] - # Output only. The closest ancestor module that this module inherits the - # enablement state from. The format is the same as the - # EventThreatDetectionCustomModule resource name. - # @!attribute [rw] enablement_state - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule::EnablementState] - # The state of enablement for the module at the given level of the hierarchy. - # @!attribute [rw] type - # @return [::String] - # Type for the module. e.g. CONFIGURABLE_BAD_IP. - # @!attribute [rw] display_name - # @return [::String] - # The human readable name to be displayed for the module. - # @!attribute [rw] description - # @return [::String] - # The description for the module. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the module was last updated. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The editor the module was last updated by. - class EventThreatDetectionCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - - # When the enablement state is inherited. - INHERITED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb deleted file mode 100644 index 0751dbe51e9a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # A list of zero or more errors encountered while validating the uploaded - # configuration of an Event Threat Detection Custom Module. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::SecurityCenter::V1::CustomModuleValidationError>] - class CustomModuleValidationErrors - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An error encountered while validating the uploaded configuration of an - # Event Threat Detection Custom Module. - # @!attribute [rw] description - # @return [::String] - # A description of the error, suitable for human consumption. Required. - # @!attribute [rw] field_path - # @return [::String] - # The path, in RFC 8901 JSON Pointer format, to the field that failed - # validation. This may be left empty if no specific field is affected. - # @!attribute [rw] start - # @return [::Google::Cloud::SecurityCenter::V1::Position] - # The initial position of the error in the uploaded text version of the - # module. This field may be omitted if no specific position applies, or if - # one could not be computed. - # @!attribute [rw] end - # @return [::Google::Cloud::SecurityCenter::V1::Position] - # The end position of the error in the uploaded text version of the - # module. This field may be omitted if no specific position applies, or if - # one could not be computed.. - class CustomModuleValidationError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A position in the uploaded text version of a module. - # @!attribute [rw] line_number - # @return [::Integer] - # @!attribute [rw] column_number - # @return [::Integer] - class Position - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb deleted file mode 100644 index 718388b29179..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Exfiltration represents a data exfiltration attempt from one or more sources - # to one or more targets. The `sources` attribute lists the sources of the - # exfiltrated data. The `targets` attribute lists the destinations the data was - # copied to. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ExfilResource>] - # If there are multiple sources, then the data is considered "joined" between - # them. For instance, BigQuery can join multiple tables, and each - # table would be considered a source. - # @!attribute [rw] targets - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ExfilResource>] - # If there are multiple targets, each target would get a complete copy of the - # "joined" source data. - # @!attribute [rw] total_exfiltrated_bytes - # @return [::Integer] - # Total exfiltrated bytes processed for the entire job. - class Exfiltration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Resource where data was exfiltrated from or exfiltrated to. - # @!attribute [rw] name - # @return [::String] - # The resource's [full resource - # name](https://cloud.google.com/apis/design/resource_names#full_resource_name). - # @!attribute [rw] components - # @return [::Array<::String>] - # Subcomponents of the asset that was exfiltrated, like URIs used during - # exfiltration, table names, databases, and filenames. For example, multiple - # tables might have been exfiltrated from the same Cloud SQL instance, or - # multiple files might have been exfiltrated from the same Cloud Storage - # bucket. - class ExfilResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb deleted file mode 100644 index 8b10d2880776..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Details about the externally exposed resource associated with the finding. - # @!attribute [rw] private_ip_address - # @return [::String] - # Private IP address of the exposed endpoint. - # @!attribute [rw] private_port - # @return [::String] - # Port number associated with private IP address. - # @!attribute [rw] exposed_service - # @return [::String] - # The name and version of the service, for example, "Jupyter - # Notebook 6.14.0". - # @!attribute [rw] public_ip_address - # @return [::String] - # Public IP address of the exposed endpoint. - # @!attribute [rw] public_port - # @return [::String] - # Public port number of the exposed endpoint. - # @!attribute [rw] exposed_endpoint - # @return [::String] - # The resource which is running the exposed service, for example, - # "//compute.googleapis.com/projects/\\{project-id}/zones/\\{zone}/instances/\\{instance}.” - # @!attribute [rw] load_balancer_firewall_policy - # @return [::String] - # The full resource name of the load balancer firewall policy, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/firewallPolicies/\\{policy-name}". - # @!attribute [rw] service_firewall_policy - # @return [::String] - # The full resource name of the firewall policy of the exposed service, for - # example, - # "//compute.googleapis.com/projects/\\{project-id}/global/firewallPolicies/\\{policy-name}". - # @!attribute [rw] forwarding_rule - # @return [::String] - # The full resource name of the forwarding rule, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/forwardingRules/\\{forwarding-rule-name}". - # @!attribute [rw] backend_service - # @return [::String] - # The full resource name of load balancer backend service, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/backendServices/\\{name}". - # @!attribute [rw] instance_group - # @return [::String] - # The full resource name of the instance group, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/instanceGroups/\\{name}". - # @!attribute [rw] network_endpoint_group - # @return [::String] - # The full resource name of the network endpoint group, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/networkEndpointGroups/\\{name}". - class ExternalExposure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb deleted file mode 100644 index 9a0f33c8a79a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Representation of third party SIEM/SOAR fields within SCC. - # @!attribute [rw] name - # @return [::String] - # Full resource name of the external system, for example: - # "organizations/1234/sources/5678/findings/123456/externalSystems/jira", - # "folders/1234/sources/5678/findings/123456/externalSystems/jira", - # "projects/1234/sources/5678/findings/123456/externalSystems/jira" - # @!attribute [rw] assignees - # @return [::Array<::String>] - # References primary/secondary etc assignees in the external system. - # @!attribute [rw] external_uid - # @return [::String] - # The identifier that's used to track the finding's corresponding case in the - # external system. - # @!attribute [rw] status - # @return [::String] - # The most recent status of the finding's corresponding case, as reported by - # the external system. - # @!attribute [rw] external_system_update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was last updated, as reported by the external - # system. - # @!attribute [rw] case_uri - # @return [::String] - # The link to the finding's corresponding case in the external system. - # @!attribute [rw] case_priority - # @return [::String] - # The priority of the finding's corresponding case in the external system. - # @!attribute [rw] case_sla - # @return [::Google::Protobuf::Timestamp] - # The SLA of the finding's corresponding case in the external system. - # @!attribute [rw] case_create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was created, as reported by the external system. - # @!attribute [rw] case_close_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was closed, as reported by the external system. - # @!attribute [rw] ticket_info - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem::TicketInfo] - # Information about the ticket, if any, that is being used to track the - # resolution of the issue that is identified by this finding. - class ExternalSystem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the ticket, if any, that is being used to track the - # resolution of the issue that is identified by this finding. - # @!attribute [rw] id - # @return [::String] - # The identifier of the ticket in the ticket system. - # @!attribute [rw] assignee - # @return [::String] - # The assignee of the ticket in the ticket system. - # @!attribute [rw] description - # @return [::String] - # The description of the ticket in the ticket system. - # @!attribute [rw] uri - # @return [::String] - # The link to the ticket in the ticket system. - # @!attribute [rw] status - # @return [::String] - # The latest status of the ticket, as reported by the ticket system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the ticket was last updated, as reported by the ticket - # system. - class TicketInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb deleted file mode 100644 index 7e7468407e6a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # File information about the related binary/library used by an executable, or - # the script used by a script interpreter - # @!attribute [rw] path - # @return [::String] - # Absolute path of the file as a JSON encoded string. - # @!attribute [rw] size - # @return [::Integer] - # Size of the file in bytes. - # @!attribute [rw] sha256 - # @return [::String] - # SHA256 hash of the first hashed_size bytes of the file encoded as a - # hex string. If hashed_size == size, sha256 represents the SHA256 hash - # of the entire file. - # @!attribute [rw] hashed_size - # @return [::Integer] - # The length in bytes of the file prefix that was hashed. If - # hashed_size == size, any hashes reported represent the entire - # file. - # @!attribute [rw] partially_hashed - # @return [::Boolean] - # True when the hash covers only a prefix of the file. - # @!attribute [rw] contents - # @return [::String] - # Prefix of the file contents as a JSON-encoded string. - # @!attribute [rw] disk_path - # @return [::Google::Cloud::SecurityCenter::V1::File::DiskPath] - # Path of the file in terms of underlying disk/partition identifiers. - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Path of the file in terms of underlying disk/partition identifiers. - # @!attribute [rw] partition_uuid - # @return [::String] - # UUID of the partition (format - # https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) - # @!attribute [rw] relative_path - # @return [::String] - # Relative path of the file in the partition as a JSON encoded string. - # Example: /home/user1/executable_file.sh - class DiskPath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb deleted file mode 100644 index d4cb1b117d7c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb +++ /dev/null @@ -1,486 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Security Command Center finding. - # - # A finding is a record of assessment data like security, risk, health, or - # privacy, that is ingested into Security Command Center for presentation, - # notification, analysis, policy testing, and enforcement. For example, a - # cross-site scripting (XSS) vulnerability in an App Engine application is a - # finding. - # @!attribute [rw] name - # @return [::String] - # The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", - # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}", - # "projects/\\{project_id}/sources/\\{source_id}/findings/\\{finding_id}". - # @!attribute [rw] parent - # @return [::String] - # The relative resource name of the source the finding belongs to. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # This field is immutable after creation time. - # For example: - # "organizations/\\{organization_id}/sources/\\{source_id}" - # @!attribute [rw] resource_name - # @return [::String] - # For findings on Google Cloud resources, the full resource - # name of the Google Cloud resource this finding is for. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # When the finding is for a non-Google Cloud resource, the resourceName can - # be a customer or partner defined string. This field is immutable after - # creation time. - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::Finding::State] - # The state of the finding. - # @!attribute [rw] category - # @return [::String] - # The additional taxonomy group within findings from a given source. - # This field is immutable after creation time. - # Example: "XSS_FLASH_INJECTION" - # @!attribute [rw] external_uri - # @return [::String] - # The URI that, if available, points to a web page outside of Security - # Command Center where additional information about the finding can be found. - # This field is guaranteed to be either empty or a well formed URL. - # @!attribute [rw] source_properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Source specific properties. These properties are managed by the source - # that writes the finding. The key names in the source_properties map must be - # between 1 and 255 characters, and must start with a letter and contain - # alphanumeric characters or underscores only. - # @!attribute [r] security_marks - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # Output only. User specified security marks. These marks are entirely - # managed by the user and come from the SecurityMarks resource that belongs - # to the finding. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # The time the finding was first detected. If an existing finding is updated, - # then this is the time the update occurred. - # For example, if the finding represents an open firewall, this property - # captures the time the detector believes the firewall became open. The - # accuracy is determined by the detector. If the finding is later resolved, - # then this time reflects when the finding was resolved. This must not - # be set to a value greater than the current timestamp. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the finding was created in Security Command Center. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V1::Finding::Severity] - # The severity of the finding. This field is managed by the source that - # writes the finding. - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the finding. It's either - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", - # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}" or - # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}", - # depending on the closest CRM ancestor of the resource associated with the - # finding. - # @!attribute [rw] mute - # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # Indicates the mute state of a finding (either muted, unmuted - # or undefined). Unlike other attributes of a finding, a finding provider - # shouldn't set the value of mute. - # @!attribute [rw] finding_class - # @return [::Google::Cloud::SecurityCenter::V1::Finding::FindingClass] - # The class of the finding. - # @!attribute [rw] indicator - # @return [::Google::Cloud::SecurityCenter::V1::Indicator] - # Represents what's commonly known as an *indicator of compromise* (IoC) in - # computer forensics. This is an artifact observed on a network or in an - # operating system that, with high confidence, indicates a computer - # intrusion. For more information, see [Indicator of - # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). - # @!attribute [rw] vulnerability - # @return [::Google::Cloud::SecurityCenter::V1::Vulnerability] - # Represents vulnerability-specific fields like CVE and CVSS scores. - # CVE stands for Common Vulnerabilities and Exposures - # (https://cve.mitre.org/about/) - # @!attribute [r] mute_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time this finding was muted or unmuted. - # @!attribute [r] external_systems - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V1::ExternalSystem}] - # Output only. Third party SIEM/SOAR fields within SCC, contains external - # system information and external system finding fields. - # @!attribute [rw] mitre_attack - # @return [::Google::Cloud::SecurityCenter::V1::MitreAttack] - # MITRE ATT&CK tactics and techniques related to this finding. - # See: https://attack.mitre.org - # @!attribute [rw] access - # @return [::Google::Cloud::SecurityCenter::V1::Access] - # Access details associated with the finding, such as more information on the - # caller, which method was accessed, and from where. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Connection>] - # Contains information about the IP connection associated with the finding. - # @!attribute [rw] mute_initiator - # @return [::String] - # Records additional information about the mute operation, for example, the - # [mute configuration](/security-command-center/docs/how-to-mute-findings) - # that muted the finding and the user who muted the finding. - # @!attribute [r] mute_info - # @return [::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo] - # Output only. The mute information regarding this finding. - # @!attribute [rw] processes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Process>] - # Represents operating system processes associated with the Finding. - # @!attribute [r] contacts - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V1::ContactDetails}] - # Output only. Map containing the points of contact for the given finding. - # The key represents the type of contact, while the value contains a list of - # all the contacts that pertain. Please refer to: - # https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - # - # { - # "security": { - # "contacts": [ - # { - # "email": "person1@company.com" - # }, - # { - # "email": "person2@company.com" - # } - # ] - # } - # } - # @!attribute [rw] compliances - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Compliance>] - # Contains compliance information for security standards associated to the - # finding. - # @!attribute [r] parent_display_name - # @return [::String] - # Output only. The human readable display name of the finding source such as - # "Event Threat Detection" or "Security Health Analytics". - # @!attribute [rw] description - # @return [::String] - # Contains more details about the finding. - # @!attribute [rw] exfiltration - # @return [::Google::Cloud::SecurityCenter::V1::Exfiltration] - # Represents exfiltrations associated with the finding. - # @!attribute [rw] iam_bindings - # @return [::Array<::Google::Cloud::SecurityCenter::V1::IamBinding>] - # Represents IAM bindings associated with the finding. - # @!attribute [rw] next_steps - # @return [::String] - # Steps to address the finding. - # @!attribute [rw] module_name - # @return [::String] - # Unique identifier of the module which generated the finding. - # Example: - # folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] - # Containers associated with the finding. This field provides information for - # both Kubernetes and non-Kubernetes containers. - # @!attribute [rw] kubernetes - # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes] - # Kubernetes resources associated with the finding. - # @!attribute [rw] database - # @return [::Google::Cloud::SecurityCenter::V1::Database] - # Database associated with the finding. - # @!attribute [rw] attack_exposure - # @return [::Google::Cloud::SecurityCenter::V1::AttackExposure] - # The results of an attack path simulation relevant to this finding. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::SecurityCenter::V1::File>] - # File associated with the finding. - # @!attribute [rw] cloud_dlp_inspection - # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpInspection] - # Cloud Data Loss Prevention (Cloud DLP) inspection results that are - # associated with the finding. - # @!attribute [rw] cloud_dlp_data_profile - # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpDataProfile] - # Cloud DLP data profile that is associated with the finding. - # @!attribute [rw] kernel_rootkit - # @return [::Google::Cloud::SecurityCenter::V1::KernelRootkit] - # Signature of the kernel rootkit. - # @!attribute [rw] org_policies - # @return [::Array<::Google::Cloud::SecurityCenter::V1::OrgPolicy>] - # Contains information about the org policies associated with the finding. - # @!attribute [rw] application - # @return [::Google::Cloud::SecurityCenter::V1::Application] - # Represents an application associated with the finding. - # @!attribute [rw] backup_disaster_recovery - # @return [::Google::Cloud::SecurityCenter::V1::BackupDisasterRecovery] - # Fields related to Backup and DR findings. - # @!attribute [rw] security_posture - # @return [::Google::Cloud::SecurityCenter::V1::SecurityPosture] - # The security posture associated with the finding. - # @!attribute [rw] log_entries - # @return [::Array<::Google::Cloud::SecurityCenter::V1::LogEntry>] - # Log entries that are relevant to the finding. - # @!attribute [rw] load_balancers - # @return [::Array<::Google::Cloud::SecurityCenter::V1::LoadBalancer>] - # The load balancers associated with the finding. - # @!attribute [rw] cloud_armor - # @return [::Google::Cloud::SecurityCenter::V1::CloudArmor] - # Fields related to Cloud Armor findings. - # @!attribute [rw] notebook - # @return [::Google::Cloud::SecurityCenter::V1::Notebook] - # Notebook associated with the finding. - # @!attribute [rw] toxic_combination - # @return [::Google::Cloud::SecurityCenter::V1::ToxicCombination] - # Contains details about a group of security issues that, when the issues - # occur together, represent a greater risk than when the issues occur - # independently. A group of such issues is referred to as a toxic - # combination. - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] group_memberships - # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupMembership>] - # Contains details about groups of which this finding is a member. A group is - # a collection of findings that are related in some way. - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] chokepoint - # @return [::Google::Cloud::SecurityCenter::V1::Chokepoint] - # Contains details about a chokepoint, which is a resource or resource group - # where high-risk attack paths converge, based on [attack path simulations] - # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] external_exposure - # @return [::Google::Cloud::SecurityCenter::V1::ExternalExposure] - # External exposure associated with the finding. - # @!attribute [rw] agent - # @return [::Google::Cloud::SecurityCenter::V1::Agent] - # Primary Agent that the specified finding was flagged for - # @!attribute [rw] agent_sessions - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AgentSession>] - # Conversational session(s) where the finding occurred. - # @!attribute [rw] agent_anomaly - # @return [::Google::Cloud::SecurityCenter::V1::AgentAnomaly] - # Details about behavior anomalies detected in AI agents. - class Finding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Mute information about the finding, including whether the finding has a - # static mute or any matching dynamic mute rules. - # @!attribute [rw] static_mute - # @return [::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo::StaticMute] - # If set, the static mute applied to this finding. Static mutes override - # dynamic mutes. If unset, there is no static mute. - # @!attribute [rw] dynamic_mute_records - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo::DynamicMuteRecord>] - # The list of dynamic mute rules that currently match the finding. - class MuteInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the static mute state. A static mute state overrides - # any dynamic mute rules that apply to this finding. The static mute state - # can be set by a static mute rule or by muting the finding directly. - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # The static mute state. If the value is `MUTED` or `UNMUTED`, then the - # finding's overall mute state will have the same value. - # @!attribute [rw] apply_time - # @return [::Google::Protobuf::Timestamp] - # When the static mute was applied. - class StaticMute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The record of a dynamic mute rule that matches the finding. - # @!attribute [rw] mute_config - # @return [::String] - # The relative resource name of the mute rule, represented by a mute - # config, that created this record, for example - # `organizations/123/muteConfigs/mymuteconfig` or - # `organizations/123/locations/global/muteConfigs/mymuteconfig`. - # @!attribute [rw] match_time - # @return [::Google::Protobuf::Timestamp] - # When the dynamic mute rule first matched the finding. - class DynamicMuteRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class SourcePropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - class ExternalSystemsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::SecurityCenter::V1::ContactDetails] - class ContactsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of the finding. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The finding requires attention and has not been addressed yet. - ACTIVE = 1 - - # The finding has been fixed, triaged as a non-issue or otherwise addressed - # and is no longer active. - INACTIVE = 2 - end - - # The severity of the finding. - module Severity - # This value is used for findings when a source doesn't write a severity - # value. - SEVERITY_UNSPECIFIED = 0 - - # Vulnerability: - # A critical vulnerability is easily discoverable by an external actor, - # exploitable, and results in the direct ability to execute arbitrary code, - # exfiltrate data, and otherwise gain additional access and privileges to - # cloud resources and workloads. Examples include publicly accessible - # unprotected user data and public SSH access with weak or no - # passwords. - # - # Threat: - # Indicates a threat that is able to access, modify, or delete data or - # execute unauthorized code within existing resources. - CRITICAL = 1 - - # Vulnerability: - # A high risk vulnerability can be easily discovered and exploited in - # combination with other vulnerabilities in order to gain direct access and - # the ability to execute arbitrary code, exfiltrate data, and otherwise - # gain additional access and privileges to cloud resources and workloads. - # An example is a database with weak or no passwords that is only - # accessible internally. This database could easily be compromised by an - # actor that had access to the internal network. - # - # Threat: - # Indicates a threat that is able to create new computational resources in - # an environment but not able to access data or execute code in existing - # resources. - HIGH = 2 - - # Vulnerability: - # A medium risk vulnerability could be used by an actor to gain access to - # resources or privileges that enable them to eventually (through multiple - # steps or a complex exploit) gain access and the ability to execute - # arbitrary code or exfiltrate data. An example is a service account with - # access to more projects than it should have. If an actor gains access to - # the service account, they could potentially use that access to manipulate - # a project the service account was not intended to. - # - # Threat: - # Indicates a threat that is able to cause operational impact but may not - # access data or execute unauthorized code. - MEDIUM = 3 - - # Vulnerability: - # A low risk vulnerability hampers a security organization's ability to - # detect vulnerabilities or active threats in their deployment, or prevents - # the root cause investigation of security issues. An example is monitoring - # and logs being disabled for resource configurations and access. - # - # Threat: - # Indicates a threat that has obtained minimal access to an environment but - # is not able to access data, execute code, or create resources. - LOW = 4 - end - - # Mute state a finding can be in. - module Mute - # Unspecified. - MUTE_UNSPECIFIED = 0 - - # Finding has been muted. - MUTED = 1 - - # Finding has been unmuted. - UNMUTED = 2 - - # Finding has never been muted/unmuted. - UNDEFINED = 4 - end - - # Represents what kind of Finding it is. - module FindingClass - # Unspecified finding class. - FINDING_CLASS_UNSPECIFIED = 0 - - # Describes unwanted or malicious activity. - THREAT = 1 - - # Describes a potential weakness in software that increases risk to - # Confidentiality & Integrity & Availability. - VULNERABILITY = 2 - - # Describes a potential weakness in cloud resource/asset configuration that - # increases risk. - MISCONFIGURATION = 3 - - # Describes a security observation that is for informational purposes. - OBSERVATION = 4 - - # Describes an error that prevents some SCC functionality. - SCC_ERROR = 5 - - # Describes a potential security risk due to a change in the security - # posture. - POSTURE_VIOLATION = 6 - - # Describes a group of security issues that, when the issues - # occur together, represent a greater risk than when the issues occur - # independently. A group of such issues is referred to as a toxic - # combination. - TOXIC_COMBINATION = 7 - - # Describes a potential security risk to data assets that contain sensitive - # data. - SENSITIVE_DATA_RISK = 8 - - # Describes a resource or resource group where high risk attack paths - # converge, based on attack path simulations (APS). - CHOKEPOINT = 9 - - # Describes a potential security risk due to the resource being exposed to - # the internet. - EXTERNAL_EXPOSURE = 10 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb deleted file mode 100644 index 18f745ec7791..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Message that contains the resource name and display name of a folder - # resource. - # @!attribute [rw] resource_folder - # @return [::String] - # Full resource name of this folder. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_folder_display_name - # @return [::String] - # The user defined display name for this folder. - class Folder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb deleted file mode 100644 index 78f19b012cf5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains details about groups of which this finding is a member. A group is a - # collection of findings that are related in some way. - # @!attribute [rw] group_type - # @return [::Google::Cloud::SecurityCenter::V1::GroupMembership::GroupType] - # Type of group. - # @!attribute [rw] group_id - # @return [::String] - # ID of the group. - class GroupMembership - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of groups. - module GroupType - # Default value. - GROUP_TYPE_UNSPECIFIED = 0 - - # Group represents a toxic combination. - GROUP_TYPE_TOXIC_COMBINATION = 1 - - # Group represents a chokepoint. - GROUP_TYPE_CHOKEPOINT = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb deleted file mode 100644 index 0444b9de78dc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a particular IAM binding, which captures a member's role addition, - # removal, or state. - # @!attribute [rw] action - # @return [::Google::Cloud::SecurityCenter::V1::IamBinding::Action] - # The action that was performed on a Binding. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to "members". - # For example, "roles/viewer", "roles/editor", or "roles/owner". - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Cloud Platform resource, for - # example, "foo@google.com". - class IamBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb deleted file mode 100644 index 518ba2e5451a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents what's commonly known as an _indicator of compromise_ (IoC) in - # computer forensics. This is an artifact observed on a network or in an - # operating system that, with high confidence, indicates a computer intrusion. - # For more information, see [Indicator of - # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). - # @!attribute [rw] ip_addresses - # @return [::Array<::String>] - # The list of IP addresses that are associated with the finding. - # @!attribute [rw] domains - # @return [::Array<::String>] - # List of domains associated to the Finding. - # @!attribute [rw] signatures - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature>] - # The list of matched signatures indicating that the given - # process is present in the environment. - # @!attribute [rw] uris - # @return [::Array<::String>] - # The list of URIs associated to the Findings. - class Indicator - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates what signature matched this process. - # @!attribute [rw] memory_hash_signature - # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::MemoryHashSignature] - # Signature indicating that a binary family was matched. - # - # Note: The following fields are mutually exclusive: `memory_hash_signature`, `yara_rule_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] yara_rule_signature - # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::YaraRuleSignature] - # Signature indicating that a YARA rule was matched. - # - # Note: The following fields are mutually exclusive: `yara_rule_signature`, `memory_hash_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] signature_type - # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::SignatureType] - # Describes the type of resource associated with the signature. - class ProcessSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A signature corresponding to memory page hashes. - # @!attribute [rw] binary_family - # @return [::String] - # The binary family. - # @!attribute [rw] detections - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::MemoryHashSignature::Detection>] - # The list of memory hash detections contributing to the binary family - # match. - class MemoryHashSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Memory hash detection contributing to the binary family match. - # @!attribute [rw] binary - # @return [::String] - # The name of the binary associated with the memory hash - # signature detection. - # @!attribute [rw] percent_pages_matched - # @return [::Float] - # The percentage of memory page hashes in the signature - # that were matched. - class Detection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A signature corresponding to a YARA rule. - # @!attribute [rw] yara_rule - # @return [::String] - # The name of the YARA rule. - class YaraRuleSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible resource types to be associated with a signature. - module SignatureType - # The default signature type. - SIGNATURE_TYPE_UNSPECIFIED = 0 - - # Used for signatures concerning processes. - SIGNATURE_TYPE_PROCESS = 1 - - # Used for signatures concerning disks. - SIGNATURE_TYPE_FILE = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb deleted file mode 100644 index 9fc2809838c2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Kernel mode rootkit signatures. - # @!attribute [rw] name - # @return [::String] - # Rootkit name, when available. - # @!attribute [rw] unexpected_code_modification - # @return [::Boolean] - # True if unexpected modifications of kernel code memory are present. - # @!attribute [rw] unexpected_read_only_data_modification - # @return [::Boolean] - # True if unexpected modifications of kernel read-only data memory are - # present. - # @!attribute [rw] unexpected_ftrace_handler - # @return [::Boolean] - # True if `ftrace` points are present with callbacks pointing to regions - # that are not in the expected kernel or module code range. - # @!attribute [rw] unexpected_kprobe_handler - # @return [::Boolean] - # True if `kprobe` points are present with callbacks pointing to regions - # that are not in the expected kernel or module code range. - # @!attribute [rw] unexpected_kernel_code_pages - # @return [::Boolean] - # True if kernel code pages that are not in the expected kernel or module - # code regions are present. - # @!attribute [rw] unexpected_system_call_handler - # @return [::Boolean] - # True if system call handlers that are are not in the expected kernel or - # module code regions are present. - # @!attribute [rw] unexpected_interrupt_handler - # @return [::Boolean] - # True if interrupt handlers that are are not in the expected kernel or - # module code regions are present. - # @!attribute [rw] unexpected_processes_in_runqueue - # @return [::Boolean] - # True if unexpected processes in the scheduler run queue are present. Such - # processes are in the run queue, but not in the process task list. - class KernelRootkit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb deleted file mode 100644 index 6286084901a9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb +++ /dev/null @@ -1,241 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Kubernetes-related attributes. - # @!attribute [rw] pods - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Pod>] - # Kubernetes - # [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) - # associated with the finding. This field contains Pod records for each - # container that is owned by a Pod. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Node>] - # Provides Kubernetes - # [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) - # information. - # @!attribute [rw] node_pools - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::NodePool>] - # GKE [node - # pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) - # associated with the finding. This field contains node pool information for - # each node, when it is available. - # @!attribute [rw] roles - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Role>] - # Provides Kubernetes role information for findings that involve [Roles or - # ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). - # @!attribute [rw] bindings - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Binding>] - # Provides Kubernetes role binding information for findings that involve - # [RoleBindings or - # ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). - # @!attribute [rw] access_reviews - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::AccessReview>] - # Provides information on any Kubernetes access reviews (privilege checks) - # relevant to the finding. - # @!attribute [rw] objects - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Object>] - # Kubernetes objects related to the finding. - class Kubernetes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A Kubernetes Pod. - # @!attribute [rw] ns - # @return [::String] - # Kubernetes Pod namespace. - # @!attribute [rw] name - # @return [::String] - # Kubernetes Pod name. - # @!attribute [rw] labels - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Label>] - # Pod labels. For Kubernetes containers, these are applied to the - # container. - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] - # Pod containers associated with this finding, if any. - class Pod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes nodes associated with the finding. - # @!attribute [rw] name - # @return [::String] - # [Full resource name](https://google.aip.dev/122#full-resource-names) of - # the Compute Engine VM running the cluster node. - class Node - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides GKE node pool information. - # @!attribute [rw] name - # @return [::String] - # Kubernetes node pool name. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Node>] - # Nodes associated with the finding. - class NodePool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes Role or ClusterRole. - # @!attribute [rw] kind - # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Role::Kind] - # Role type. - # @!attribute [rw] ns - # @return [::String] - # Role namespace. - # @!attribute [rw] name - # @return [::String] - # Role name. - class Role - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of Kubernetes roles. - module Kind - # Role type is not specified. - KIND_UNSPECIFIED = 0 - - # Kubernetes Role. - ROLE = 1 - - # Kubernetes ClusterRole. - CLUSTER_ROLE = 2 - end - end - - # Represents a Kubernetes RoleBinding or ClusterRoleBinding. - # @!attribute [rw] ns - # @return [::String] - # Namespace for the binding. - # @!attribute [rw] name - # @return [::String] - # Name for the binding. - # @!attribute [rw] role - # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Role] - # The Role or ClusterRole referenced by the binding. - # @!attribute [rw] subjects - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Subject>] - # Represents one or more subjects that are bound to the role. Not always - # available for PATCH requests. - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Kubernetes subject. - # @!attribute [rw] kind - # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Subject::AuthType] - # Authentication type for the subject. - # @!attribute [rw] ns - # @return [::String] - # Namespace for the subject. - # @!attribute [rw] name - # @return [::String] - # Name for the subject. - class Subject - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Auth types that can be used for the subject's kind field. - module AuthType - # Authentication is not specified. - AUTH_TYPE_UNSPECIFIED = 0 - - # User with valid certificate. - USER = 1 - - # Users managed by Kubernetes API with credentials stored as secrets. - SERVICEACCOUNT = 2 - - # Collection of users. - GROUP = 3 - end - end - - # Conveys information about a Kubernetes access review (such as one returned - # by a [`kubectl auth - # can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) - # command) that was involved in a finding. - # @!attribute [rw] group - # @return [::String] - # The API group of the resource. "*" means all. - # @!attribute [rw] ns - # @return [::String] - # Namespace of the action being requested. Currently, there is no - # distinction between no namespace and all namespaces. Both - # are represented by "" (empty). - # @!attribute [rw] name - # @return [::String] - # The name of the resource being requested. Empty means all. - # @!attribute [rw] resource - # @return [::String] - # The optional resource type requested. "*" means all. - # @!attribute [rw] subresource - # @return [::String] - # The optional subresource type. - # @!attribute [rw] verb - # @return [::String] - # A Kubernetes resource API verb, like get, list, watch, create, update, - # delete, proxy. "*" means all. - # @!attribute [rw] version - # @return [::String] - # The API version of the resource. "*" means all. - class AccessReview - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes object related to the finding, uniquely identified by GKNN. - # Used if the object Kind is not one of Pod, Node, NodePool, Binding, or - # AccessReview. - # @!attribute [rw] group - # @return [::String] - # Kubernetes object group, such as "policy.k8s.io/v1". - # @!attribute [rw] kind - # @return [::String] - # Kubernetes object kind, such as "Namespace". - # @!attribute [rw] ns - # @return [::String] - # Kubernetes object namespace. Must be a valid DNS label. Named - # "ns" to avoid collision with C++ namespace keyword. For details see - # https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. - # @!attribute [rw] name - # @return [::String] - # Kubernetes object name. For details see - # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] - # Pod containers associated with this finding, if any. - class Object - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb deleted file mode 100644 index d3887e4fc185..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a generic name-value label. A label has separate name and value - # fields to support filtering with the `contains()` function. For more - # information, see [Filtering on array-type - # fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). - # @!attribute [rw] name - # @return [::String] - # Name of the label. - # @!attribute [rw] value - # @return [::String] - # Value that corresponds to the label's name. - class Label - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb deleted file mode 100644 index be5ec1bb5606..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains information related to the load balancer associated with the - # finding. - # @!attribute [rw] name - # @return [::String] - # The name of the load balancer associated with the finding. - class LoadBalancer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb deleted file mode 100644 index 6f028cba55b8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # An individual entry in a log. - # @!attribute [rw] cloud_logging_entry - # @return [::Google::Cloud::SecurityCenter::V1::CloudLoggingEntry] - # An individual entry in a log stored in Cloud Logging. - class LogEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata taken from a [Cloud Logging - # LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) - # @!attribute [rw] insert_id - # @return [::String] - # A unique identifier for the log entry. - # @!attribute [rw] log_id - # @return [::String] - # The type of the log (part of `log_name`. `log_name` is the resource name of - # the log to which this log entry belongs). For example: - # `cloudresourcemanager.googleapis.com/activity`. Note that this field is not - # URL-encoded, unlike the `LOG_ID` field in `LogEntry`. - # @!attribute [rw] resource_container - # @return [::String] - # The organization, folder, or project of the monitored resource that - # produced this log entry. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # The time the event described by the log entry occurred. - class CloudLoggingEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb deleted file mode 100644 index 6e17500226e7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb +++ /dev/null @@ -1,303 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # MITRE ATT&CK tactics and techniques related to this finding. - # See: https://attack.mitre.org - # @!attribute [rw] primary_tactic - # @return [::Google::Cloud::SecurityCenter::V1::MitreAttack::Tactic] - # The MITRE ATT&CK tactic most closely represented by this finding, if any. - # @!attribute [rw] primary_techniques - # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Technique>] - # The MITRE ATT&CK technique most closely represented by this finding, if - # any. primary_techniques is a repeated field because there are multiple - # levels of MITRE ATT&CK techniques. If the technique most closely - # represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), - # both the sub-technique and its parent technique(s) will be listed (e.g. - # `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). - # @!attribute [rw] additional_tactics - # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Tactic>] - # Additional MITRE ATT&CK tactics related to this finding, if any. - # @!attribute [rw] additional_techniques - # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Technique>] - # Additional MITRE ATT&CK techniques related to this finding, if any, along - # with any of their respective parent techniques. - # @!attribute [rw] version - # @return [::String] - # The MITRE ATT&CK version referenced by the above fields. E.g. "8". - class MitreAttack - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # MITRE ATT&CK tactics that can be referenced by SCC findings. - # See: https://attack.mitre.org/tactics/enterprise/ - module Tactic - # Unspecified value. - TACTIC_UNSPECIFIED = 0 - - # TA0043 - RECONNAISSANCE = 1 - - # TA0042 - RESOURCE_DEVELOPMENT = 2 - - # TA0001 - INITIAL_ACCESS = 5 - - # TA0002 - EXECUTION = 3 - - # TA0003 - PERSISTENCE = 6 - - # TA0004 - PRIVILEGE_ESCALATION = 8 - - # TA0005 - DEFENSE_EVASION = 7 - - # TA0006 - CREDENTIAL_ACCESS = 9 - - # TA0007 - DISCOVERY = 10 - - # TA0008 - LATERAL_MOVEMENT = 11 - - # TA0009 - COLLECTION = 12 - - # TA0011 - COMMAND_AND_CONTROL = 4 - - # TA0010 - EXFILTRATION = 13 - - # TA0040 - IMPACT = 14 - end - - # MITRE ATT&CK techniques that can be referenced by SCC findings. - # See: https://attack.mitre.org/techniques/enterprise/ - # Next ID: 65 - module Technique - # Unspecified value. - TECHNIQUE_UNSPECIFIED = 0 - - # T1036 - MASQUERADING = 49 - - # T1036.005 - MATCH_LEGITIMATE_NAME_OR_LOCATION = 50 - - # T1037 - BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37 - - # T1037.005 - STARTUP_ITEMS = 38 - - # T1046 - NETWORK_SERVICE_DISCOVERY = 32 - - # T1057 - PROCESS_DISCOVERY = 56 - - # T1059 - COMMAND_AND_SCRIPTING_INTERPRETER = 6 - - # T1059.004 - UNIX_SHELL = 7 - - # T1059.006 - PYTHON = 59 - - # T1068 - EXPLOITATION_FOR_PRIVILEGE_ESCALATION = 63 - - # T1069 - PERMISSION_GROUPS_DISCOVERY = 18 - - # T1069.003 - CLOUD_GROUPS = 19 - - # T1070.004 - INDICATOR_REMOVAL_FILE_DELETION = 64 - - # T1071 - APPLICATION_LAYER_PROTOCOL = 45 - - # T1071.004 - DNS = 46 - - # T1072 - SOFTWARE_DEPLOYMENT_TOOLS = 47 - - # T1078 - VALID_ACCOUNTS = 14 - - # T1078.001 - DEFAULT_ACCOUNTS = 35 - - # T1078.003 - LOCAL_ACCOUNTS = 15 - - # T1078.004 - CLOUD_ACCOUNTS = 16 - - # T1090 - PROXY = 9 - - # T1090.002 - EXTERNAL_PROXY = 10 - - # T1090.003 - MULTI_HOP_PROXY = 11 - - # T1098 - ACCOUNT_MANIPULATION = 22 - - # T1098.001 - ADDITIONAL_CLOUD_CREDENTIALS = 40 - - # T1098.004 - SSH_AUTHORIZED_KEYS = 23 - - # T1098.006 - ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 - - # T1105 - INGRESS_TOOL_TRANSFER = 3 - - # T1106 - NATIVE_API = 4 - - # T1110 - BRUTE_FORCE = 44 - - # T1129 - SHARED_MODULES = 5 - - # T1134 - ACCESS_TOKEN_MANIPULATION = 33 - - # T1134.001 - TOKEN_IMPERSONATION_OR_THEFT = 39 - - # T1190 - EXPLOIT_PUBLIC_FACING_APPLICATION = 27 - - # T1484 - DOMAIN_POLICY_MODIFICATION = 30 - - # T1485 - DATA_DESTRUCTION = 29 - - # T1489 - SERVICE_STOP = 52 - - # T1490 - INHIBIT_SYSTEM_RECOVERY = 36 - - # T1496 - RESOURCE_HIJACKING = 8 - - # T1498 - NETWORK_DENIAL_OF_SERVICE = 17 - - # T1526 - CLOUD_SERVICE_DISCOVERY = 48 - - # T1528 - STEAL_APPLICATION_ACCESS_TOKEN = 42 - - # T1531 - ACCOUNT_ACCESS_REMOVAL = 51 - - # T1539 - STEAL_WEB_SESSION_COOKIE = 25 - - # T1543 - CREATE_OR_MODIFY_SYSTEM_PROCESS = 24 - - # T1548 - ABUSE_ELEVATION_CONTROL_MECHANISM = 34 - - # T1552 - UNSECURED_CREDENTIALS = 13 - - # T1556 - MODIFY_AUTHENTICATION_PROCESS = 28 - - # T1562 - IMPAIR_DEFENSES = 31 - - # T1562.001 - DISABLE_OR_MODIFY_TOOLS = 55 - - # T1567 - EXFILTRATION_OVER_WEB_SERVICE = 20 - - # T1567.002 - EXFILTRATION_TO_CLOUD_STORAGE = 21 - - # T1568 - DYNAMIC_RESOLUTION = 12 - - # T1570 - LATERAL_TOOL_TRANSFER = 41 - - # T1578 - MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 - - # T1578.001 - CREATE_SNAPSHOT = 54 - - # T1580 - CLOUD_INFRASTRUCTURE_DISCOVERY = 53 - - # T1588 - OBTAIN_CAPABILITIES = 43 - - # T1595 - ACTIVE_SCANNING = 1 - - # T1595.001 - SCANNING_IP_BLOCKS = 2 - - # T1609 - CONTAINER_ADMINISTRATION_COMMAND = 60 - - # T1611 - ESCAPE_TO_HOST = 61 - - # T1613 - CONTAINER_AND_RESOURCE_DISCOVERY = 57 - - # T1649 - STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb deleted file mode 100644 index ef639857ed11..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # A mute config is a Cloud SCC resource that contains the configuration - # to mute create/update events of findings. - # @!attribute [rw] name - # @return [::String] - # This field will be ignored if provided on config creation. Format - # `organizations/{organization}/muteConfigs/{mute_config}` - # `folders/{folder}/muteConfigs/{mute_config}` - # `projects/{project}/muteConfigs/{mute_config}` - # `organizations/{organization}/locations/global/muteConfigs/{mute_config}` - # `folders/{folder}/locations/global/muteConfigs/{mute_config}` - # `projects/{project}/locations/global/muteConfigs/{mute_config}` - # @!attribute [rw] display_name - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # The human readable name to be displayed for the mute config. - # @!attribute [rw] description - # @return [::String] - # A description of the mute config. - # @!attribute [rw] filter - # @return [::String] - # Required. An expression that defines the filter to apply across - # create/update events of findings. While creating a filter string, be - # mindful of the scope in which the mute configuration is being created. - # E.g., If a filter contains project = X but is created under the project = Y - # scope, it might not match any findings. - # - # The following field and operator combinations are supported: - # - # * severity: `=`, `:` - # * category: `=`, `:` - # * resource.name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * finding_class: `=`, `:` - # * indicator.ip_addresses: `=`, `:` - # * indicator.domains: `=`, `:` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the mute config was created. - # This field is set by the server and will be ignored if provided on config - # creation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time at which the mute config was updated. - # This field is set by the server and will be ignored if provided on config - # creation or update. - # @!attribute [r] most_recent_editor - # @return [::String] - # Output only. Email address of the user who last edited the mute config. - # This field is set by the server and will be ignored if provided on config - # creation or update. - # @!attribute [rw] type - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig::MuteConfigType] - # Optional. The type of the mute config, which determines what type of mute - # state the config affects. The static mute state takes precedence over the - # dynamic mute state. Immutable after creation. STATIC by default if not set - # during creation. - # @!attribute [rw] expiry_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The expiry of the mute config. Only applicable for dynamic - # configs. If the expiry is set, when the config expires, it is removed from - # all findings. - class MuteConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of MuteConfig. - module MuteConfigType - # Unused. - MUTE_CONFIG_TYPE_UNSPECIFIED = 0 - - # A static mute config, which sets the static mute state of future matching - # findings to muted. Once the static mute state has been set, finding or - # config modifications will not affect the state. - STATIC = 1 - - # A dynamic mute config, which is applied to existing and future matching - # findings, setting their dynamic mute state to "muted". If the config is - # updated or deleted, or a matching finding is updated, such that the - # finding doesn't match the config, the config will be removed from the - # finding, and the finding's dynamic mute state may become "unmuted" - # (unless other configs still match). - DYNAMIC = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb deleted file mode 100644 index c1a520b911b6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise - # notebook](https://cloud.google.com/colab/docs/introduction) file, that is - # associated with a finding. - # @!attribute [rw] name - # @return [::String] - # The name of the notebook. - # @!attribute [rw] service - # @return [::String] - # The source notebook service, for example, "Colab Enterprise". - # @!attribute [rw] last_author - # @return [::String] - # The user ID of the latest author to modify the notebook. - # @!attribute [rw] notebook_update_time - # @return [::Google::Protobuf::Timestamp] - # The most recent time the notebook was updated. - class Notebook - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb deleted file mode 100644 index 76042f526f38..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Cloud Security Command Center (Cloud SCC) notification configs. - # - # A notification config is a Cloud SCC resource that contains the configuration - # to send notifications for create/update events of findings, assets and etc. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this notification config. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/notificationConfigs/notify_public_bucket", - # "folders/\\{folder_id}/notificationConfigs/notify_public_bucket", - # or "projects/\\{project_id}/notificationConfigs/notify_public_bucket". - # @!attribute [rw] description - # @return [::String] - # The description of the notification config (max of 1024 characters). - # @!attribute [rw] pubsub_topic - # @return [::String] - # The Pub/Sub topic to send notifications to. Its format is - # "projects/[project_id]/topics/[topic]". - # @!attribute [r] service_account - # @return [::String] - # Output only. The service account that needs "pubsub.topics.publish" - # permission to publish to the Pub/Sub topic. - # @!attribute [rw] streaming_config - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig::StreamingConfig] - # The config for triggering streaming-based notifications. - class NotificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The config for streaming-based notifications, which send each event as soon - # as it is detected. - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across create/update events - # of assets or findings as specified by the event type. The expression is a - # list of zero or more restrictions combined via logical operators `AND` - # and `OR`. Parentheses are supported, and `OR` has higher precedence than - # `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - class StreamingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb deleted file mode 100644 index 117cc8daf4cc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Cloud SCC's Notification - # @!attribute [rw] notification_config_name - # @return [::String] - # Name of the notification config that generated current notification. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # If it's a Finding based notification config, this field will be - # populated. - # @!attribute [rw] resource - # @return [::Google::Cloud::SecurityCenter::V1::Resource] - # The Cloud resource tied to this notification's Finding. - class NotificationMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb deleted file mode 100644 index dd2663301322..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains information about the org policies associated with the finding. - # @!attribute [rw] name - # @return [::String] - # The resource name of the org policy. - # Example: - # "organizations/\\{organization_id}/policies/\\{constraint_name}" - class OrgPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb deleted file mode 100644 index d75d60b378de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # User specified settings that are attached to the Security Command - # Center organization. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of the settings. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/organizationSettings". - # @!attribute [rw] enable_asset_discovery - # @return [::Boolean] - # A flag that indicates if Asset Discovery should be enabled. If the flag is - # set to `true`, then discovery of assets will occur. If it is set to - # `false`, all historical assets will remain, but discovery of future assets - # will not occur. - # @!attribute [rw] asset_discovery_config - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig] - # The configuration used for Asset Discovery runs. - class OrganizationSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration used for Asset Discovery runs. - # @!attribute [rw] project_ids - # @return [::Array<::String>] - # The project ids to use for filtering asset discovery. - # @!attribute [rw] inclusion_mode - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig::InclusionMode] - # The mode to use for filtering asset discovery. - # @!attribute [rw] folder_ids - # @return [::Array<::String>] - # The folder ids to use for filtering asset discovery. - # It consists of only digits, e.g., 756619654966. - class AssetDiscoveryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mode of inclusion when running Asset Discovery. - # Asset discovery can be limited by explicitly identifying projects to be - # included or excluded. If INCLUDE_ONLY is set, then only those projects - # within the organization and their children are discovered during asset - # discovery. If EXCLUDE is set, then projects that don't match those - # projects are discovered during asset discovery. If neither are set, then - # all projects within the organization are discovered during asset - # discovery. - module InclusionMode - # Unspecified. Setting the mode with this value will disable - # inclusion/exclusion filtering for Asset Discovery. - INCLUSION_MODE_UNSPECIFIED = 0 - - # Asset Discovery will capture only the resources within the projects - # specified. All other resources will be ignored. - INCLUDE_ONLY = 1 - - # Asset Discovery will ignore all resources under the projects specified. - # All other resources will be retrieved. - EXCLUDE = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb deleted file mode 100644 index 7c14c9d1baf2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents an operating system process. - # @!attribute [rw] name - # @return [::String] - # The process name, as displayed in utilities like `top` and `ps`. This name - # can be accessed through `/proc/[pid]/comm` and changed with - # `prctl(PR_SET_NAME)`. - # @!attribute [rw] binary - # @return [::Google::Cloud::SecurityCenter::V1::File] - # File information for the process executable. - # @!attribute [rw] libraries - # @return [::Array<::Google::Cloud::SecurityCenter::V1::File>] - # File information for libraries loaded by the process. - # @!attribute [rw] script - # @return [::Google::Cloud::SecurityCenter::V1::File] - # When the process represents the invocation of a script, `binary` provides - # information about the interpreter, while `script` provides information - # about the script file provided to the interpreter. - # @!attribute [rw] args - # @return [::Array<::String>] - # Process arguments as JSON encoded strings. - # @!attribute [rw] arguments_truncated - # @return [::Boolean] - # True if `args` is incomplete. - # @!attribute [rw] env_variables - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EnvironmentVariable>] - # Process environment variables. - # @!attribute [rw] env_variables_truncated - # @return [::Boolean] - # True if `env_variables` is incomplete. - # @!attribute [rw] pid - # @return [::Integer] - # The process ID. - # @!attribute [rw] parent_pid - # @return [::Integer] - # The parent process ID. - class Process - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A name-value pair representing an environment variable used in an operating - # system process. - # @!attribute [rw] name - # @return [::String] - # Environment variable name as a JSON encoded string. - # @!attribute [rw] val - # @return [::String] - # Environment variable value as a JSON encoded string. - class EnvironmentVariable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb deleted file mode 100644 index 5783203927c7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb +++ /dev/null @@ -1,286 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Information related to the Google Cloud resource. - # @!attribute [rw] name - # @return [::String] - # The full resource name of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] display_name - # @return [::String] - # The human readable name of the resource. - # @!attribute [rw] type - # @return [::String] - # The full resource type of the resource. - # @!attribute [rw] project - # @return [::String] - # The full resource name of project that the resource belongs to. - # @!attribute [rw] project_display_name - # @return [::String] - # The project ID that the resource belongs to. - # @!attribute [rw] parent - # @return [::String] - # The full resource name of resource's parent. - # @!attribute [rw] parent_display_name - # @return [::String] - # The human readable name of resource's parent. - # @!attribute [r] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] - # Output only. Contains a Folder message for each folder in the assets - # ancestry. The first folder is the deepest nested folder, and the last - # folder is the folder directly under the Organization. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] - # Indicates which cloud provider the resource resides in. - # @!attribute [rw] organization - # @return [::String] - # Indicates which organization or tenant in the cloud provider the finding - # applies to. - # @!attribute [rw] service - # @return [::String] - # The parent service or product from which the resource is provided, for - # example, GKE or SNS. - # @!attribute [rw] location - # @return [::String] - # The region or location of the service (if applicable). - # @!attribute [rw] aws_metadata - # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata] - # The AWS metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_metadata - # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata] - # The Azure metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `azure_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource_path - # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath] - # Provides the path to the resource within the resource hierarchy. - # @!attribute [rw] resource_path_string - # @return [::String] - # A string representation of the resource path. - # For Google Cloud, it has the format of - # `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` - # where there can be any number of folders. - # For AWS, it has the format of - # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` - # where there can be any number of organizational units. - # For Azure, it has the format of - # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` - # where there can be any number of management groups. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AWS metadata associated with the resource, only applicable if the finding's - # cloud provider is Amazon Web Services. - # @!attribute [rw] organization - # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsOrganization] - # The AWS organization associated with the resource. - # @!attribute [rw] organizational_units - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsOrganizationalUnit>] - # A list of AWS organizational units associated with the resource, ordered - # from lowest level (closest to the account) to highest level. - # @!attribute [rw] account - # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsAccount] - # The AWS account associated with the resource. - class AwsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An organization is a collection of accounts that are centrally managed - # together using consolidated billing, organized hierarchically with - # organizational units (OUs), and controlled with policies. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) for the organization. The regex pattern for an - # organization ID string requires "o-" followed by from 10 to 32 lowercase - # letters or digits. - class AwsOrganization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Organizational Unit (OU) is a container of AWS accounts within a root of - # an organization. Policies that are attached to an OU apply to all accounts - # contained in that OU and in any child OUs. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) associated with this OU. The regex pattern for - # an organizational unit ID string requires "ou-" followed by from 4 to 32 - # lowercase letters or digits (the ID of the root that contains the OU). - # This string is followed by a second "-" dash and from 8 to 32 additional - # lowercase letters or digits. For example, "ou-ab12-cd34ef56". - # @!attribute [rw] name - # @return [::String] - # The friendly name of the OU. - class AwsOrganizationalUnit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An AWS account that is a member of an organization. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) of the account, containing exactly 12 digits. - # @!attribute [rw] name - # @return [::String] - # The friendly name of this account. - class AwsAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Azure metadata associated with the resource, only applicable if the finding's - # cloud provider is Microsoft Azure. - # @!attribute [rw] management_groups - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureManagementGroup>] - # A list of Azure management groups associated with the resource, ordered - # from lowest level (closest to the subscription) to highest level. - # @!attribute [rw] subscription - # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureSubscription] - # The Azure subscription associated with the resource. - # @!attribute [rw] resource_group - # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureResourceGroup] - # The Azure resource group associated with the resource. - class AzureMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an Azure management group. - # @!attribute [rw] id - # @return [::String] - # The UUID of the Azure management group, for example, - # `20000000-0001-0000-0000-000000000000`. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Azure management group. - class AzureManagementGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an Azure subscription. - # @!attribute [rw] id - # @return [::String] - # The UUID of the Azure subscription, for example, - # `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Azure subscription. - class AzureSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an Azure resource group. - # @!attribute [rw] name - # @return [::String] - # The name of the Azure resource group. This is not a UUID. - class AzureResourceGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents the path of resources leading up to the resource this finding is - # about. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourcePath::ResourcePathNode>] - # The list of nodes that make the up resource path, ordered from lowest - # level to highest level. - class ResourcePath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A node within the resource path. Each node represents a resource within the - # resource hierarchy. - # @!attribute [rw] node_type - # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath::ResourcePathNodeType] - # The type of resource this node represents. - # @!attribute [rw] id - # @return [::String] - # The ID of the resource this node represents. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the resource this node represents. - class ResourcePathNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of resource the node represents. - module ResourcePathNodeType - # Node type is unspecified. - RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0 - - # The node represents a Google Cloud organization. - GCP_ORGANIZATION = 1 - - # The node represents a Google Cloud folder. - GCP_FOLDER = 2 - - # The node represents a Google Cloud project. - GCP_PROJECT = 3 - - # The node represents an AWS organization. - AWS_ORGANIZATION = 4 - - # The node represents an AWS organizational unit. - AWS_ORGANIZATIONAL_UNIT = 5 - - # The node represents an AWS account. - AWS_ACCOUNT = 6 - - # The node represents an Azure management group. - AZURE_MANAGEMENT_GROUP = 7 - - # The node represents an Azure subscription. - AZURE_SUBSCRIPTION = 8 - - # The node represents an Azure resource group. - AZURE_RESOURCE_GROUP = 9 - end - end - - # Enumeration representing the various cloud providers a finding's resource - # could reside in. - module CloudProvider - # The cloud provider is unspecified. - CLOUD_PROVIDER_UNSPECIFIED = 0 - - # The cloud provider is Google Cloud Platform. - GOOGLE_CLOUD_PLATFORM = 1 - - # The cloud provider is Amazon Web Services. - AMAZON_WEB_SERVICES = 2 - - # The cloud provider is Microsoft Azure. - MICROSOFT_AZURE = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb deleted file mode 100644 index f231fe97ed46..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb +++ /dev/null @@ -1,125 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # A resource value configuration (RVC) is a mapping configuration of user's - # resources to resource values. Used in Attack path simulations. - # @!attribute [rw] name - # @return [::String] - # Name for the resource value configuration - # @!attribute [rw] resource_value - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] - # Required. Resource value level this expression represents - # @!attribute [rw] tag_values - # @return [::Array<::String>] - # Required. Tag values combined with `AND` to check against. - # Values in the form "tagValues/123" - # Example: `[ "tagValues/123", "tagValues/456", "tagValues/789" ]` - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing - # @!attribute [rw] resource_type - # @return [::String] - # Apply resource_value only to resources that match resource_type. - # resource_type will be checked with `AND` of other resources. - # For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" - # will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. - # @!attribute [rw] scope - # @return [::String] - # Project or folder to scope this configuration to. - # For example, "project/456" would apply this configuration only to resources - # in "project/456" scope will be checked with `AND` of other - # resources. - # @!attribute [rw] resource_labels_selector - # @return [::Google::Protobuf::Map{::String => ::String}] - # List of resource labels to search for, evaluated with `AND`. - # For example, `"resource_labels_selector": {"key": "value", "env": "prod"}` - # will match resources with labels "key": "value" `AND` "env": - # "prod" - # https://cloud.google.com/resource-manager/docs/creating-managing-labels - # @!attribute [rw] description - # @return [::String] - # Description of the resource value configuration. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp this resource value configuration was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp this resource value configuration was last updated. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] - # Cloud provider this configuration applies to - # @!attribute [rw] sensitive_data_protection_mapping - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig::SensitiveDataProtectionMapping] - # A mapping of the sensitivity on Sensitive Data Protection finding to - # resource values. This mapping can only be used in combination with a - # resource_type that is related to BigQuery, e.g. - # "bigquery.googleapis.com/Dataset". - class ResourceValueConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Resource value mapping for Sensitive Data Protection findings. - # If any of these mappings have a resource value that is not unspecified, - # the resource_value field will be ignored when reading this configuration. - # @!attribute [rw] high_sensitivity_mapping - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] - # Resource value mapping for high-sensitivity Sensitive Data Protection - # findings - # @!attribute [rw] medium_sensitivity_mapping - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] - # Resource value mapping for medium-sensitivity Sensitive Data Protection - # findings - class SensitiveDataProtectionMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceLabelsSelectorEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Value enum to map to a resource - module ResourceValue - # Unspecific value - RESOURCE_VALUE_UNSPECIFIED = 0 - - # High resource value - HIGH = 1 - - # Medium resource value - MEDIUM = 2 - - # Low resource value - LOW = 3 - - # No resource value, e.g. ignore these resources - NONE = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb deleted file mode 100644 index c00c755d2726..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Response of asset discovery run - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryResponse::State] - # The state of an asset discovery run. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # The duration between asset discovery run start and end - class RunAssetDiscoveryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of an asset discovery run. - module State - # Asset discovery run state was unspecified. - STATE_UNSPECIFIED = 0 - - # Asset discovery run completed successfully. - COMPLETED = 1 - - # Asset discovery run was cancelled with tasks still pending, as another - # run for the same organization was started with a higher priority. - SUPERSEDED = 2 - - # Asset discovery run was killed and terminated. - TERMINATED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb deleted file mode 100644 index 042d8ac3a7b6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Defines the properties in a custom module configuration for Security - # Health Analytics. Use the custom module configuration to create custom - # detectors that generate custom findings for resources that you specify. - # @!attribute [rw] predicate - # @return [::Google::Type::Expr] - # The CEL expression to evaluate to produce findings. When the expression - # evaluates to true against a resource, a finding is generated. - # @!attribute [rw] custom_output - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::CustomOutputSpec] - # Custom output properties. - # @!attribute [rw] resource_selector - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::ResourceSelector] - # The resource types that the custom module operates on. Each custom module - # can specify up to 5 resource types. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::Severity] - # The severity to assign to findings generated by the module. - # @!attribute [rw] description - # @return [::String] - # Text that describes the vulnerability or misconfiguration that the custom - # module detects. This explanation is returned with each finding instance to - # help investigators understand the detected issue. The text must be enclosed - # in quotation marks. - # @!attribute [rw] recommendation - # @return [::String] - # An explanation of the recommended steps that security teams can take to - # resolve the detected issue. This explanation is returned with each finding - # generated by this module in the `nextSteps` property of the finding JSON. - class CustomConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A set of optional name-value pairs that define custom source properties to - # return with each finding that is generated by the custom module. The custom - # source properties that are defined here are included in the finding JSON - # under `sourceProperties`. - # @!attribute [rw] properties - # @return [::Array<::Google::Cloud::SecurityCenter::V1::CustomConfig::CustomOutputSpec::Property>] - # A list of custom output properties to add to the finding. - class CustomOutputSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An individual name-value pair that defines a custom source property. - # @!attribute [rw] name - # @return [::String] - # Name of the property for the custom output. - # @!attribute [rw] value_expression - # @return [::Google::Type::Expr] - # The CEL expression for the custom output. A resource property can be - # specified to return the value of the property or a text string enclosed - # in quotation marks. - class Property - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Resource for selecting resource type. - # @!attribute [rw] resource_types - # @return [::Array<::String>] - # The resource types to run the detector on. - class ResourceSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the valid value options for the severity of a finding. - module Severity - # Unspecified severity. - SEVERITY_UNSPECIFIED = 0 - - # Critical severity. - CRITICAL = 1 - - # High severity. - HIGH = 2 - - # Medium severity. - MEDIUM = 3 - - # Low severity. - LOW = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb deleted file mode 100644 index 0b327125cfc6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents an instance of a Security Health Analytics custom module, - # including its full module name, display name, enablement state, and last - # updated time. You can create a custom module at the organization, folder, or - # project level. Custom modules that you create at the organization or folder - # level are inherited by the child folders and projects. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of the custom module. - # Its format is - # "organizations/\\{organization}/securityHealthAnalyticsSettings/customModules/\\{customModule}", - # or - # "folders/\\{folder}/securityHealthAnalyticsSettings/customModules/\\{customModule}", - # or - # "projects/\\{project}/securityHealthAnalyticsSettings/customModules/\\{customModule}" - # - # The id \\{customModule} is server-generated and is not user settable. - # It will be a numeric id containing 1-20 digits. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Security Health Analytics custom module. This - # display name becomes the finding category for all findings that are - # returned by this custom module. The display name must be between 1 and - # 128 characters, start with a lowercase letter, and contain alphanumeric - # characters or underscores only. - # @!attribute [rw] enablement_state - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule::EnablementState] - # The enablement state of the custom module. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the custom module was last updated. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The editor that last updated the custom module. - # @!attribute [r] ancestor_module - # @return [::String] - # Output only. If empty, indicates that the custom module was created in the - # organization, folder, or project in which you are viewing the custom - # module. Otherwise, `ancestor_module` specifies the organization or folder - # from which the custom module is inherited. - # @!attribute [rw] custom_config - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] - # The user specified custom configuration for the module. - class SecurityHealthAnalyticsCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible enablement states of a custom module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given CRM resource. - ENABLED = 1 - - # The module is disabled at the given CRM resource. - DISABLED = 2 - - # State is inherited from an ancestor module. The module will either - # be effectively ENABLED or DISABLED based on its closest non-inherited - # ancestor module in the CRM hierarchy. - INHERITED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb deleted file mode 100644 index 0fd162583773..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # User specified security marks that are attached to the parent Security - # Command Center resource. Security marks are scoped within a Security Command - # Center organization -- they can be modified and viewed by all users who have - # proper permissions on the organization. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of the SecurityMarks. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Examples: - # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks". - # @!attribute [rw] marks - # @return [::Google::Protobuf::Map{::String => ::String}] - # Mutable user specified security marks belonging to the parent resource. - # Constraints are as follows: - # - # * Keys and values are treated as case insensitive - # * Keys must be between 1 - 256 characters (inclusive) - # * Keys must be letters, numbers, underscores, or dashes - # * Values have leading and trailing whitespace trimmed, remaining - # characters must be between 1 - 4096 characters (inclusive) - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the marks. - # Examples: - # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" - # "folders/\\{folder_id}/assets/\\{asset_id}/securityMarks" - # "projects/\\{project_number}/assets/\\{asset_id}/securityMarks" - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - class SecurityMarks - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MarksEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb deleted file mode 100644 index fb8f89c609e0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a posture that is deployed on Google Cloud by the - # Security Command Center Posture Management service. - # A posture contains one or more policy sets. A policy set is a - # group of policies that enforce a set of security rules on Google - # Cloud. - # @!attribute [rw] name - # @return [::String] - # Name of the posture, for example, `CIS-Posture`. - # @!attribute [rw] revision_id - # @return [::String] - # The version of the posture, for example, `c7cfa2a8`. - # @!attribute [rw] posture_deployment_resource - # @return [::String] - # The project, folder, or organization on which the posture is deployed, - # for example, `projects/{project_number}`. - # @!attribute [rw] posture_deployment - # @return [::String] - # The name of the posture deployment, for example, - # `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. - # @!attribute [rw] changed_policy - # @return [::String] - # The name of the updated policy, for example, - # `projects/{project_id}/policies/{constraint_name}`. - # @!attribute [rw] policy_set - # @return [::String] - # The name of the updated policyset, for example, `cis-policyset`. - # @!attribute [rw] policy - # @return [::String] - # The ID of the updated policy, for example, `compute-policy-1`. - # @!attribute [rw] policy_drift_details - # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityPosture::PolicyDriftDetails>] - # The details about a change in an updated policy that violates the deployed - # posture. - class SecurityPosture - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The policy field that violates the deployed posture and its expected and - # detected values. - # @!attribute [rw] field - # @return [::String] - # The name of the updated field, for example - # constraint.implementation.policy_rules[0].enforce - # @!attribute [rw] expected_value - # @return [::String] - # The value of this field that was configured in a posture, for example, - # `true` or `allowed_values={"projects/29831892"}`. - # @!attribute [rw] detected_value - # @return [::String] - # The detected value that violates the deployed posture, for example, - # `false` or `allowed_values={"projects/22831892"}`. - class PolicyDriftDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb deleted file mode 100644 index 6b9045050b73..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +++ /dev/null @@ -1,2146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Request message for bulk findings update. - # - # Note: - # 1. If multiple bulk update requests match the same resource, the order in - # which they get executed is not defined. - # 2. Once a bulk operation is started, there is no way to stop it. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, at which bulk action needs to be applied. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @!attribute [rw] filter - # @return [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @!attribute [rw] mute_annotation - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # This can be a mute configuration name or any identifier for mute/unmute - # of findings based on the filter. - # @!attribute [rw] mute_state - # @return [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - class BulkMuteFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mute state. - module MuteState - # Unused. - MUTE_STATE_UNSPECIFIED = 0 - - # Matching findings will be muted (default). - MUTED = 1 - - # Matching findings will have their mute state cleared. - UNDEFINED = 2 - end - end - - # The response to a BulkMute request. Contains the LRO information. - class BulkMuteFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a finding. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new finding's parent. Its format should be - # `organizations/[organization_id]/sources/[source_id]`. - # @!attribute [rw] finding_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - class CreateFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a mute config. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] mute_config - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # Required. The mute config being created. - # @!attribute [rw] mute_config_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - class CreateMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to create single resource value config - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # @!attribute [rw] resource_value_config - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # Required. The resource value config being created. - class CreateResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to create multiple resource value configs - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest>] - # Required. The resource value configs to be created. - class BatchCreateResourceValueConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BatchCreateResourceValueConfigs - # @!attribute [rw] resource_value_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # The resource value configs created - class BatchCreateResourceValueConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete resource value config - # @!attribute [rw] name - # @return [::String] - # Required. Name of the ResourceValueConfig to delete - class DeleteResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to get resource value config - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource value config to retrieve. Its format is - # `organizations/{organization}/resourceValueConfigs/{config_id}`. - class GetResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to list resource value configs of a parent - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @!attribute [rw] page_size - # @return [::Integer] - # The number of results to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - class ListResourceValueConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message to list resource value configs - # @!attribute [rw] resource_value_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # The resource value configs from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is empty, there are no subsequent pages. - class ListResourceValueConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to update resource value config - # @!attribute [rw] resource_value_config - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # Required. The resource value config being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a notification config. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] config_id - # @return [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - class CreateNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating Security Health Analytics custom modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new custom module's parent. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @!attribute [rw] security_health_analytics_custom_module - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # Required. SecurityHealthAnalytics custom module to create. The provided - # name is ignored and reset with provided parent information and - # server-generated ID. - class CreateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a source. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - class CreateSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a mute config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the mute config to delete. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - class DeleteMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a notification config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the notification config to delete. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - class DeleteNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting Security Health Analytics custom modules. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the custom module to delete. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - class DeleteSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for retrieving a BigQuery export. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the BigQuery export to retrieve. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - class GetBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for retrieving a mute config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the mute config to retrieve. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - class GetMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a notification config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the notification config to get. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - class GetNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting organization settings. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the organization to get organization settings for. Its - # format is `organizations/[organization_id]/organizationSettings`. - class GetOrganizationSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting effective Security Health Analytics custom - # modules. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the effective custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` - class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting Security Health Analytics custom modules. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - class GetSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a source. - # @!attribute [rw] name - # @return [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - class GetSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for grouping by assets. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent to group the assets by. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @!attribute [rw] group_by - # @return [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class GroupAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for grouping by assets. - # @!attribute [rw] group_by_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # Group results. There exists an element for each existing unique - # combination of property/values. The element contains a count for the number - # of times those specific property/values appear. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the groupBy request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of results matching the query. - class GroupAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for grouping by findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source to groupBy. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, - # or `projects/{project_id}/sources/-` - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @!attribute [rw] group_by - # @return [::String] - # Required. Expression that defines what assets fields to use for grouping - # (including `state_change`). The string value should follow SQL syntax: - # comma separated list of fields. For example: "parent,resource_name". - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class GroupFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for group by findings. - # @!attribute [rw] group_by_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # Group results. There exists an element for each existing unique - # combination of property/values. The element contains a count for the number - # of times those specific property/values appear. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the groupBy request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of results matching the query. - class GroupFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result containing the properties and count of a groupBy request. - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Properties matching the groupBy fields in the request. - # @!attribute [rw] count - # @return [::Integer] - # Total count of resources for the given properties. - class GroupResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for listing descendant Security Health Analytics custom - # modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list descendant custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last call indicating a continuation - class ListDescendantSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing descendant Security Health Analytics custom - # modules. - # @!attribute [rw] security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # Custom modules belonging to the requested parent and its descendants. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more custom modules to be - # returned. - class ListDescendantSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing the valued resources for a given simulation. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list valued resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @!attribute [rw] filter - # @return [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # * `resource` - # - # * `display_name` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for - # example: `exposed_score DESC`. - class ListValuedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing the valued resources for a given simulation. - # @!attribute [rw] valued_resources - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # The valued resources that the attack path simulation identified. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The estimated total number of results matching the query. - class ListValuedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing the attack paths for a given simulation or valued - # resource. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @!attribute [rw] filter - # @return [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListAttackPathsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing the attack paths for a given simulation or - # valued resource. - # @!attribute [rw] attack_paths - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # The attack paths that the attack path simulation identified. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListAttackPathsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting simulation. - # Simulation name can include "latest" to retrieve the latest simulation - # For example, "organizations/123/simulations/latest" - # @!attribute [rw] name - # @return [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - class GetSimulationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a valued resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - class GetValuedResourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing mute configs at a given scope e.g. organization, - # folder or project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - class ListMuteConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing mute configs. - # @!attribute [rw] mute_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # The mute configs from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMuteConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing notification configs. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is "organizations/[organization_id]", - # "folders/[folder_id]", or "projects/[project_id]". - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListNotificationConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing notification configs. - # @!attribute [rw] notification_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # Notification configs belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListNotificationConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing effective Security Health Analytics custom - # modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list effective custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last call indicating a continuation - class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing effective Security Health Analytics custom - # modules. - # @!attribute [rw] effective_security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # Effective custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more effective custom modules to - # be returned. - class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing Security Health Analytics custom modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last call indicating a continuation - class ListSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing Security Health Analytics custom modules. - # @!attribute [rw] security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # Custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more custom modules to be - # returned. - class ListSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing sources. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing sources. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Source>] - # Sources belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing assets. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource that contains the assets. The - # value that you can specify on parent depends on the method in which you - # specify parent. You can specify one of the following values: - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @!attribute [rw] order_by - # @return [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing assets. - # @!attribute [rw] list_assets_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # Assets matching the list request. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the list request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of assets matching the query. - class ListAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result containing the Asset and its State. - # @!attribute [rw] asset - # @return [::Google::Cloud::SecurityCenter::V1::Asset] - # Asset matching the search request. - # @!attribute [rw] state_change - # @return [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult::StateChange] - # State change of the asset between the points in time. - class ListAssetsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The change in state of the asset. - # - # When querying across two points in time this describes - # the change between the two points: ADDED, REMOVED, or ACTIVE. - # If there was no compare_duration supplied in the request the state change - # will be: UNUSED - module StateChange - # State change is unused, this is the canonical default for this enum. - UNUSED = 0 - - # Asset was added between the points in time. - ADDED = 1 - - # Asset was removed between the points in time. - REMOVED = 2 - - # Asset was present at both point(s) in time. - ACTIVE = 3 - end - end - end - - # Request message for listing findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source the findings belong to. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To list across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-`, - # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @!attribute [rw] order_by - # @return [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing findings. - # @!attribute [rw] list_findings_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # Findings matching the list request. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the list request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of findings matching the query. - class ListFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result containing the Finding and its StateChange. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # Finding matching the search request. - # @!attribute [rw] state_change - # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::StateChange] - # State change of the finding between the points in time. - # @!attribute [r] resource - # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::Resource] - # Output only. Resource that is associated with this finding. - class ListFindingsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information related to the Google Cloud resource that is - # associated with this finding. - # @!attribute [rw] name - # @return [::String] - # The full resource name of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] display_name - # @return [::String] - # The human readable name of the resource. - # @!attribute [rw] type - # @return [::String] - # The full resource type of the resource. - # @!attribute [rw] project_name - # @return [::String] - # The full resource name of project that the resource belongs to. - # @!attribute [rw] project_display_name - # @return [::String] - # The project ID that the resource belongs to. - # @!attribute [rw] parent_name - # @return [::String] - # The full resource name of resource's parent. - # @!attribute [rw] parent_display_name - # @return [::String] - # The human readable name of resource's parent. - # @!attribute [rw] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] - # Contains a Folder message for each folder in the assets ancestry. - # The first folder is the deepest nested folder, and the last folder is - # the folder directly under the Organization. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] - # Indicates which cloud provider the finding is from. - # @!attribute [rw] organization - # @return [::String] - # Indicates which organization / tenant the finding is for. - # @!attribute [rw] service - # @return [::String] - # The service or resource provider associated with the resource. - # @!attribute [rw] location - # @return [::String] - # The region or location of the service (if applicable). - # @!attribute [rw] aws_metadata - # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata] - # The AWS metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_metadata - # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata] - # The Azure metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `azure_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource_path - # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath] - # Provides the path to the resource within the resource hierarchy. - # @!attribute [rw] resource_path_string - # @return [::String] - # A string representation of the resource path. - # For Google Cloud, it has the format of - # `org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id}` - # where there can be any number of folders. - # For AWS, it has the format of - # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` - # where there can be any number of organizational units. - # For Azure, it has the format of - # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` - # where there can be any number of management groups. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The change in state of the finding. - # - # When querying across two points in time this describes - # the change in the finding between the two points: CHANGED, UNCHANGED, - # ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that - # the finding at timestamp does not match the filter specified, but it did - # at timestamp - compare_duration. If there was no compare_duration - # supplied in the request the state change will be: UNUSED - module StateChange - # State change is unused, this is the canonical default for this enum. - UNUSED = 0 - - # The finding has changed state in some way between the points in time - # and existed at both points. - CHANGED = 1 - - # The finding has not changed state between the points in time and - # existed at both points. - UNCHANGED = 2 - - # The finding was created between the points in time. - ADDED = 3 - - # The finding at timestamp does not match the filter specified, but it - # did at timestamp - compare_duration. - REMOVED = 4 - end - end - end - - # Request message for updating a finding's state. - # @!attribute [rw] name - # @return [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::Finding::State] - # Required. The desired State of the finding. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. The time at which the updated state takes effect. - class SetFindingStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a finding's mute status. - # @!attribute [rw] name - # @return [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @!attribute [rw] mute - # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # Required. The desired state of the Mute. - class SetMuteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for running asset discovery for an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the organization to run asset discovery for. Its format - # is `organizations/[organization_id]`. - class RunAssetDiscoveryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to simulate a CustomConfig against a given test resource. - # Maximum size of the request is 4 MB by default. - # @!attribute [rw] parent - # @return [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [Relative - # Resource - # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # Example: `organizations/{organization_id}` - # @!attribute [rw] custom_config - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] - # Required. The custom configuration that you need to test. - # @!attribute [rw] resource - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource] - # Required. Resource data to simulate custom module against. - class SimulateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Manually constructed resource name. If the custom module evaluates against - # only the resource data, you can omit the `iam_policy_data` field. If it - # evaluates only the `iam_policy_data` field, you can omit the resource data. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the resource, for example, - # `compute.googleapis.com/Disk`. - # @!attribute [rw] resource_data - # @return [::Google::Protobuf::Struct] - # Optional. A representation of the Google Cloud resource. Should match the - # Google Cloud resource JSON format. - # @!attribute [rw] iam_policy_data - # @return [::Google::Iam::V1::Policy] - # Optional. A representation of the IAM policy. - class SimulatedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for simulating a `SecurityHealthAnalyticsCustomModule` - # against a given resource. - # @!attribute [rw] result - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult] - # Result for test case in the corresponding request. - class SimulateSecurityHealthAnalyticsCustomModuleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible test result. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # Finding that would be published for the test case, - # if a violation is detected. - # - # Note: The following fields are mutually exclusive: `finding`, `no_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] no_violation - # @return [::Google::Protobuf::Empty] - # Indicates that the test case does not trigger any violation. - # - # Note: The following fields are mutually exclusive: `no_violation`, `finding`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Error encountered during the test. - # - # Note: The following fields are mutually exclusive: `error`, `finding`, `no_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SimulatedResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for updating a ExternalSystem resource. - # @!attribute [rw] external_system - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # Required. The external system resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - class UpdateExternalSystemRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating or creating a finding. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - class UpdateFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a mute config. - # @!attribute [rw] mute_config - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # Required. The mute config being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a notification config. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # Required. The notification config to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - class UpdateNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating an organization's settings. - # @!attribute [rw] organization_settings - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # Required. The organization settings resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - class UpdateOrganizationSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating Security Health Analytics custom modules. - # @!attribute [rw] security_health_analytics_custom_module - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # Required. The SecurityHealthAnalytics custom module to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. The only fields that can be updated are - # `enablement_state` and `custom_config`. If empty or set to the wildcard - # value `*`, both `enablement_state` and `custom_config` are updated. - class UpdateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a source. - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # Required. The source resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - class UpdateSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a SecurityMarks resource. - # @!attribute [rw] security_marks - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # Required. The security marks resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. Must be - # earlier or equal to the server time. - class UpdateSecurityMarksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a BigQuery export. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] big_query_export - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # Required. The BigQuery export being created. - # @!attribute [rw] big_query_export_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - class CreateBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a BigQuery export. - # @!attribute [rw] big_query_export - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # Required. The BigQuery export being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing BigQuery exports at a given scope e.g. - # organization, folder or project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - class ListBigQueryExportsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing BigQuery exports. - # @!attribute [rw] big_query_exports - # @return [::Array<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # The BigQuery exports from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListBigQueryExportsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a BigQuery export. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the BigQuery export to delete. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - class DeleteBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create an Event Threat Detection custom module. - # @!attribute [rw] parent - # @return [::String] - # Required. The new custom module's parent. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] event_threat_detection_custom_module - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # Required. The module to create. The - # event_threat_detection_custom_module.name will be ignored and server - # generated. - class CreateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to validate an Event Threat Detection custom module. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent to validate the Custom Module under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] raw_text - # @return [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @!attribute [rw] type - # @return [::String] - # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - class ValidateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to validating an Event Threat Detection custom module. - # @!attribute [rw] errors - # @return [::Google::Cloud::SecurityCenter::V1::CustomModuleValidationErrors] - # A list of errors returned by the validator. If the list is empty, there - # were no errors. - class ValidateEventThreatDetectionCustomModuleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete an Event Threat Detection custom module. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the custom module to delete. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - class DeleteEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get an Event Threat Detection custom module. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the custom module to get. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - class GetEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list current and descendant resident Event Threat Detection custom - # modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous - # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDescendantEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - class ListDescendantEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing current and descendant resident - # Event Threat Detection custom modules. - # @!attribute [rw] event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # Custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDescendantEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list Event Threat Detection custom modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous - # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListEventThreatDetectionCustomModules` must match the call that provided - # the page token. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - class ListEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing Event Threat Detection custom modules. - # @!attribute [rw] event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # Custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update an Event Threat Detection custom module. - # @!attribute [rw] event_threat_detection_custom_module - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # Required. The module being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get an EffectiveEventThreatDetectionCustomModule. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the effective Event Threat Detection custom - # module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - class GetEffectiveEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list effective Event Threat Detection custom modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent to list custom modules for. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous - # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListEffectiveEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - class ListEffectiveEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing EffectiveEventThreatDetectionCustomModules. - # @!attribute [rw] effective_event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # Effective custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListEffectiveEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb deleted file mode 100644 index 63924f12b411..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Attack path simulation - # @!attribute [rw] name - # @return [::String] - # Full resource name of the Simulation: - # `organizations/123/simulations/456` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time simulation was created - # @!attribute [rw] resource_value_configs_metadata - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfigMetadata>] - # Resource value configurations' metadata used in this simulation. Maximum of - # 100. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] - # Indicates which cloud provider was used in this simulation. - class Simulation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb deleted file mode 100644 index 4ccbdd08fd29..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Security Command Center finding source. A finding source - # is an entity or a mechanism that can produce a finding. A source is like a - # container of findings that come from the same scanner, logger, monitor, and - # other tools. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this source. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/sources/\\{source_id}" - # @!attribute [rw] display_name - # @return [::String] - # The source's display name. - # A source's display name must be unique amongst its siblings, for example, - # two sources with the same parent can't share the same display name. - # The display name must have a length between 1 and 64 characters - # (inclusive). - # @!attribute [rw] description - # @return [::String] - # The description of the source (max of 1024 characters). - # Example: - # "Web Security Scanner is a web security scanner for common - # vulnerabilities in App Engine applications. It can automatically - # scan and detect four common vulnerabilities, including cross-site-scripting - # (XSS), Flash injection, mixed content (HTTP in HTTPS), and - # outdated or insecure libraries." - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the finding source. It's either - # "organizations/\\{organization_id}/sources/\\{source_id}", - # "folders/\\{folder_id}/sources/\\{source_id}", or - # "projects/\\{project_number}/sources/\\{source_id}", - # depending on the closest CRM ancestor of the resource associated with the - # finding. - class Source - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb deleted file mode 100644 index 4ad02b3ce5f0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains details about a group of security issues that, when the issues - # occur together, represent a greater risk than when the issues occur - # independently. A group of such issues is referred to as a toxic combination. - # @!attribute [rw] attack_exposure_score - # @return [::Float] - # The - # [Attack exposure - # score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) - # of this toxic combination. The score is a measure of how much this toxic - # combination exposes one or more high-value resources to potential attack. - # @!attribute [rw] related_findings - # @return [::Array<::String>] - # List of resource names of findings associated with this toxic combination. - # For example, `organizations/123/sources/456/findings/789`. - class ToxicCombination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb deleted file mode 100644 index 1cd95d5b43f1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # A resource that is determined to have value to a user's system - # @!attribute [rw] name - # @return [::String] - # Valued resource name, for example, - # e.g.: - # `organizations/123/simulations/456/valuedResources/789` - # @!attribute [rw] resource - # @return [::String] - # The - # [full resource - # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) - # of the valued resource. - # @!attribute [rw] resource_type - # @return [::String] - # The [resource - # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # of the valued resource. - # @!attribute [rw] display_name - # @return [::String] - # Human-readable name of the valued resource. - # @!attribute [rw] resource_value - # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource::ResourceValue] - # How valuable this resource is. - # @!attribute [rw] exposed_score - # @return [::Float] - # Exposed score for this valued resource. A value of 0 means no exposure was - # detected exposure. - # @!attribute [rw] resource_value_configs_used - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfigMetadata>] - # List of resource value configurations' metadata used to determine the value - # of this resource. Maximum of 100. - class ValuedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How valuable the resource is. - module ResourceValue - # The resource value isn't specified. - RESOURCE_VALUE_UNSPECIFIED = 0 - - # This is a low-value resource. - RESOURCE_VALUE_LOW = 1 - - # This is a medium-value resource. - RESOURCE_VALUE_MEDIUM = 2 - - # This is a high-value resource. - RESOURCE_VALUE_HIGH = 3 - end - end - - # Metadata about a ResourceValueConfig. For example, id and name. - # @!attribute [rw] name - # @return [::String] - # Resource value config name - class ResourceValueConfigMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb deleted file mode 100644 index aadd507c0a50..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb +++ /dev/null @@ -1,336 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Refers to common vulnerability fields e.g. cve, cvss, cwe etc. - # @!attribute [rw] cve - # @return [::Google::Cloud::SecurityCenter::V1::Cve] - # CVE stands for Common Vulnerabilities and Exposures - # (https://cve.mitre.org/about/) - # @!attribute [rw] offending_package - # @return [::Google::Cloud::SecurityCenter::V1::Package] - # The offending package is relevant to the finding. - # @!attribute [rw] fixed_package - # @return [::Google::Cloud::SecurityCenter::V1::Package] - # The fixed package is relevant to the finding. - # @!attribute [rw] security_bulletin - # @return [::Google::Cloud::SecurityCenter::V1::SecurityBulletin] - # The security bulletin is relevant to this finding. - class Vulnerability - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CVE stands for Common Vulnerabilities and Exposures. - # Information from the [CVE - # record](https://www.cve.org/ResourcesSupport/Glossary) that describes this - # vulnerability. - # @!attribute [rw] id - # @return [::String] - # The unique identifier for the vulnerability. e.g. CVE-2021-34527 - # @!attribute [rw] references - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Reference>] - # Additional information about the CVE. - # e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 - # @!attribute [rw] cvssv3 - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3] - # Describe Common Vulnerability Scoring System specified at - # https://www.first.org/cvss/v3.1/specification-document - # @!attribute [rw] upstream_fix_available - # @return [::Boolean] - # Whether upstream fix is available for the CVE. - # @!attribute [rw] impact - # @return [::Google::Cloud::SecurityCenter::V1::Cve::RiskRating] - # The potential impact of the vulnerability if it was to be exploited. - # @!attribute [rw] exploitation_activity - # @return [::Google::Cloud::SecurityCenter::V1::Cve::ExploitationActivity] - # The exploitation activity of the vulnerability in the wild. - # @!attribute [rw] observed_in_the_wild - # @return [::Boolean] - # Whether or not the vulnerability has been observed in the wild. - # @!attribute [rw] zero_day - # @return [::Boolean] - # Whether or not the vulnerability was zero day when the finding was - # published. - # @!attribute [rw] exploit_release_date - # @return [::Google::Protobuf::Timestamp] - # Date the first publicly available exploit or PoC was released. - class Cve - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible values of impact of the vulnerability if it was to be - # exploited. - module RiskRating - # Invalid or empty value. - RISK_RATING_UNSPECIFIED = 0 - - # Exploitation would have little to no security impact. - LOW = 1 - - # Exploitation would enable attackers to perform activities, or could allow - # attackers to have a direct impact, but would require additional steps. - MEDIUM = 2 - - # Exploitation would enable attackers to have a notable direct impact - # without needing to overcome any major mitigating factors. - HIGH = 3 - - # Exploitation would fundamentally undermine the security of affected - # systems, enable actors to perform significant attacks with minimal - # effort, with little to no mitigating factors to overcome. - CRITICAL = 4 - end - - # The possible values of exploitation activity of the vulnerability in the - # wild. - module ExploitationActivity - # Invalid or empty value. - EXPLOITATION_ACTIVITY_UNSPECIFIED = 0 - - # Exploitation has been reported or confirmed to widely occur. - WIDE = 1 - - # Limited reported or confirmed exploitation activities. - CONFIRMED = 2 - - # Exploit is publicly available. - AVAILABLE = 3 - - # No known exploitation activity, but has a high potential for - # exploitation. - ANTICIPATED = 4 - - # No known exploitation activity. - NO_KNOWN = 5 - end - end - - # Additional Links - # @!attribute [rw] source - # @return [::String] - # Source of the reference e.g. NVD - # @!attribute [rw] uri - # @return [::String] - # Uri for the mentioned source e.g. - # https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. - class Reference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Common Vulnerability Scoring System version 3. - # @!attribute [rw] base_score - # @return [::Float] - # The base score is a function of the base metric scores. - # @!attribute [rw] attack_vector - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::AttackVector] - # Base Metrics - # Represents the intrinsic characteristics of a vulnerability that are - # constant over time and across user environments. - # This metric reflects the context by which vulnerability exploitation is - # possible. - # @!attribute [rw] attack_complexity - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::AttackComplexity] - # This metric describes the conditions beyond the attacker's control that - # must exist in order to exploit the vulnerability. - # @!attribute [rw] privileges_required - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::PrivilegesRequired] - # This metric describes the level of privileges an attacker must possess - # before successfully exploiting the vulnerability. - # @!attribute [rw] user_interaction - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::UserInteraction] - # This metric captures the requirement for a human user, other than the - # attacker, to participate in the successful compromise of the vulnerable - # component. - # @!attribute [rw] scope - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Scope] - # The Scope metric captures whether a vulnerability in one vulnerable - # component impacts resources in components beyond its security scope. - # @!attribute [rw] confidentiality_impact - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] - # This metric measures the impact to the confidentiality of the information - # resources managed by a software component due to a successfully exploited - # vulnerability. - # @!attribute [rw] integrity_impact - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] - # This metric measures the impact to integrity of a successfully exploited - # vulnerability. - # @!attribute [rw] availability_impact - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] - # This metric measures the impact to the availability of the impacted - # component resulting from a successfully exploited vulnerability. - class Cvssv3 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This metric reflects the context by which vulnerability exploitation is - # possible. - module AttackVector - # Invalid value. - ATTACK_VECTOR_UNSPECIFIED = 0 - - # The vulnerable component is bound to the network stack and the set of - # possible attackers extends beyond the other options listed below, up to - # and including the entire Internet. - ATTACK_VECTOR_NETWORK = 1 - - # The vulnerable component is bound to the network stack, but the attack is - # limited at the protocol level to a logically adjacent topology. - ATTACK_VECTOR_ADJACENT = 2 - - # The vulnerable component is not bound to the network stack and the - # attacker's path is via read/write/execute capabilities. - ATTACK_VECTOR_LOCAL = 3 - - # The attack requires the attacker to physically touch or manipulate the - # vulnerable component. - ATTACK_VECTOR_PHYSICAL = 4 - end - - # This metric describes the conditions beyond the attacker's control that - # must exist in order to exploit the vulnerability. - module AttackComplexity - # Invalid value. - ATTACK_COMPLEXITY_UNSPECIFIED = 0 - - # Specialized access conditions or extenuating circumstances do not exist. - # An attacker can expect repeatable success when attacking the vulnerable - # component. - ATTACK_COMPLEXITY_LOW = 1 - - # A successful attack depends on conditions beyond the attacker's control. - # That is, a successful attack cannot be accomplished at will, but requires - # the attacker to invest in some measurable amount of effort in preparation - # or execution against the vulnerable component before a successful attack - # can be expected. - ATTACK_COMPLEXITY_HIGH = 2 - end - - # This metric describes the level of privileges an attacker must possess - # before successfully exploiting the vulnerability. - module PrivilegesRequired - # Invalid value. - PRIVILEGES_REQUIRED_UNSPECIFIED = 0 - - # The attacker is unauthorized prior to attack, and therefore does not - # require any access to settings or files of the vulnerable system to - # carry out an attack. - PRIVILEGES_REQUIRED_NONE = 1 - - # The attacker requires privileges that provide basic user capabilities - # that could normally affect only settings and files owned by a user. - # Alternatively, an attacker with Low privileges has the ability to access - # only non-sensitive resources. - PRIVILEGES_REQUIRED_LOW = 2 - - # The attacker requires privileges that provide significant (e.g., - # administrative) control over the vulnerable component allowing access to - # component-wide settings and files. - PRIVILEGES_REQUIRED_HIGH = 3 - end - - # This metric captures the requirement for a human user, other than the - # attacker, to participate in the successful compromise of the vulnerable - # component. - module UserInteraction - # Invalid value. - USER_INTERACTION_UNSPECIFIED = 0 - - # The vulnerable system can be exploited without interaction from any user. - USER_INTERACTION_NONE = 1 - - # Successful exploitation of this vulnerability requires a user to take - # some action before the vulnerability can be exploited. - USER_INTERACTION_REQUIRED = 2 - end - - # The Scope metric captures whether a vulnerability in one vulnerable - # component impacts resources in components beyond its security scope. - module Scope - # Invalid value. - SCOPE_UNSPECIFIED = 0 - - # An exploited vulnerability can only affect resources managed by the same - # security authority. - SCOPE_UNCHANGED = 1 - - # An exploited vulnerability can affect resources beyond the security scope - # managed by the security authority of the vulnerable component. - SCOPE_CHANGED = 2 - end - - # The Impact metrics capture the effects of a successfully exploited - # vulnerability on the component that suffers the worst outcome that is most - # directly and predictably associated with the attack. - module Impact - # Invalid value. - IMPACT_UNSPECIFIED = 0 - - # High impact. - IMPACT_HIGH = 1 - - # Low impact. - IMPACT_LOW = 2 - - # No impact. - IMPACT_NONE = 3 - end - end - - # Package is a generic definition of a package. - # @!attribute [rw] package_name - # @return [::String] - # The name of the package where the vulnerability was detected. - # @!attribute [rw] cpe_uri - # @return [::String] - # The CPE URI where the vulnerability was detected. - # @!attribute [rw] package_type - # @return [::String] - # Type of package, for example, os, maven, or go. - # @!attribute [rw] package_version - # @return [::String] - # The version of the package. - class Package - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SecurityBulletin are notifications of vulnerabilities of Google products. - # @!attribute [rw] bulletin_id - # @return [::String] - # ID of the bulletin corresponding to the vulnerability. - # @!attribute [rw] submission_time - # @return [::Google::Protobuf::Timestamp] - # Submission time of this Security Bulletin. - # @!attribute [rw] suggested_upgrade_version - # @return [::String] - # This represents a version that the cluster receiving this notification - # should be upgraded to, based on its current version. For example, 1.15.0 - class SecurityBulletin - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile deleted file mode 100644 index f16288a177ba..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-security_center-v1", path: "../" -else - gem "google-cloud-security_center-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb deleted file mode 100644 index 62423aec31af..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the batch_create_resource_value_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs. -# -def batch_create_resource_value_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new - - # Call the batch_create_resource_value_configs method. - result = client.batch_create_resource_value_configs request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb deleted file mode 100644 index 93db8d1e0876..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the bulk_mute_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings. -# -def bulk_mute_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new - - # Call the bulk_mute_findings method. - result = client.bulk_mute_findings request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb deleted file mode 100644 index be92178bf7b4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export. -# -def create_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new - - # Call the create_big_query_export method. - result = client.create_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb deleted file mode 100644 index 08036d256638..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module. -# -def create_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new - - # Call the create_event_threat_detection_custom_module method. - result = client.create_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb deleted file mode 100644 index 0b195fb59e80..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_finding call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding. -# -def create_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new - - # Call the create_finding method. - result = client.create_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb deleted file mode 100644 index 7c91c84d013c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config. -# -def create_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new - - # Call the create_mute_config method. - result = client.create_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb deleted file mode 100644 index 9d25cf280532..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config. -# -def create_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new - - # Call the create_notification_config method. - result = client.create_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb deleted file mode 100644 index 5de06ad0e47b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module. -# -def create_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the create_security_health_analytics_custom_module method. - result = client.create_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb deleted file mode 100644 index 426ebeba8ec5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateSource_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source. -# -def create_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new - - # Call the create_source method. - result = client.create_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb deleted file mode 100644 index e549c6d67597..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export. -# -def delete_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new - - # Call the delete_big_query_export method. - result = client.delete_big_query_export request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb deleted file mode 100644 index 9da872ba42f6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module. -# -def delete_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new - - # Call the delete_event_threat_detection_custom_module method. - result = client.delete_event_threat_detection_custom_module request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb deleted file mode 100644 index ea8a60533934..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config. -# -def delete_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new - - # Call the delete_mute_config method. - result = client.delete_mute_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb deleted file mode 100644 index 6bc88e7ff81e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config. -# -def delete_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new - - # Call the delete_notification_config method. - result = client.delete_notification_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb deleted file mode 100644 index a39d9a23c8fd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config. -# -def delete_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new - - # Call the delete_resource_value_config method. - result = client.delete_resource_value_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb deleted file mode 100644 index 946a821c16e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module. -# -def delete_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the delete_security_health_analytics_custom_module method. - result = client.delete_security_health_analytics_custom_module request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb deleted file mode 100644 index 1c58bd5b0d78..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export. -# -def get_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new - - # Call the get_big_query_export method. - result = client.get_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb deleted file mode 100644 index be112113b672..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module. -# -def get_effective_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - - # Call the get_effective_event_threat_detection_custom_module method. - result = client.get_effective_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb deleted file mode 100644 index 7db2ddb3ecfc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module. -# -def get_effective_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the get_effective_security_health_analytics_custom_module method. - result = client.get_effective_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb deleted file mode 100644 index ec5742081391..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module. -# -def get_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new - - # Call the get_event_threat_detection_custom_module method. - result = client.get_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb deleted file mode 100644 index 2b9a6db77e1e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_iam_policy call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb deleted file mode 100644 index 48df3fdf3201..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config. -# -def get_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new - - # Call the get_mute_config method. - result = client.get_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb deleted file mode 100644 index 6b5a3b4c0d68..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config. -# -def get_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new - - # Call the get_notification_config method. - result = client.get_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb deleted file mode 100644 index b4b9f24ba65c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_organization_settings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings. -# -def get_organization_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new - - # Call the get_organization_settings method. - result = client.get_organization_settings request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb deleted file mode 100644 index d40c67a9eba0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config. -# -def get_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new - - # Call the get_resource_value_config method. - result = client.get_resource_value_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb deleted file mode 100644 index a4f9f8ef3f19..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module. -# -def get_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the get_security_health_analytics_custom_module method. - result = client.get_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb deleted file mode 100644 index c0a1d22fa00d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetSimulation_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_simulation call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation. -# -def get_simulation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new - - # Call the get_simulation method. - result = client.get_simulation request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetSimulation_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb deleted file mode 100644 index bd7c16821102..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetSource_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source. -# -def get_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new - - # Call the get_source method. - result = client.get_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb deleted file mode 100644 index 8c1d07bdc6de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_valued_resource call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource. -# -def get_valued_resource - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new - - # Call the get_valued_resource method. - result = client.get_valued_resource request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb deleted file mode 100644 index ae956d56813e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the group_assets call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets. -# -def group_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new - - # Call the group_assets method. - result = client.group_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb deleted file mode 100644 index c4786c15f09b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the group_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings. -# -def group_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new - - # Call the group_findings method. - result = client.group_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb deleted file mode 100644 index ceeaebf8d86d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListAssets_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_assets call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets. -# -def list_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new - - # Call the list_assets method. - result = client.list_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb deleted file mode 100644 index 5862a15cff4a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_attack_paths call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths. -# -def list_attack_paths - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new - - # Call the list_attack_paths method. - result = client.list_attack_paths request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb deleted file mode 100644 index 3746c178ec2f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_big_query_exports call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports. -# -def list_big_query_exports - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new - - # Call the list_big_query_exports method. - result = client.list_big_query_exports request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb deleted file mode 100644 index 5dacc91c28be..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules. -# -def list_descendant_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - - # Call the list_descendant_event_threat_detection_custom_modules method. - result = client.list_descendant_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb deleted file mode 100644 index 5f821c75b303..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules. -# -def list_descendant_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_descendant_security_health_analytics_custom_modules method. - result = client.list_descendant_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb deleted file mode 100644 index 39414a8834dd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules. -# -def list_effective_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - - # Call the list_effective_event_threat_detection_custom_modules method. - result = client.list_effective_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb deleted file mode 100644 index 964e57448ce6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules. -# -def list_effective_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_effective_security_health_analytics_custom_modules method. - result = client.list_effective_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb deleted file mode 100644 index 41b6dd7a76c0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules. -# -def list_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new - - # Call the list_event_threat_detection_custom_modules method. - result = client.list_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb deleted file mode 100644 index 57fb4cae4392..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListFindings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings. -# -def list_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new - - # Call the list_findings method. - result = client.list_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb deleted file mode 100644 index eb1fdb03d97d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_mute_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs. -# -def list_mute_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new - - # Call the list_mute_configs method. - result = client.list_mute_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb deleted file mode 100644 index b7b5eee3314f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_notification_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs. -# -def list_notification_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new - - # Call the list_notification_configs method. - result = client.list_notification_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb deleted file mode 100644 index 251454a75ea0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_resource_value_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs. -# -def list_resource_value_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new - - # Call the list_resource_value_configs method. - result = client.list_resource_value_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb deleted file mode 100644 index 1c67c25b10d3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules. -# -def list_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_security_health_analytics_custom_modules method. - result = client.list_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb deleted file mode 100644 index c97a5da2a253..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListSources_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_sources call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources. -# -def list_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new - - # Call the list_sources method. - result = client.list_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb deleted file mode 100644 index 2dfc8bf0281c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_valued_resources call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources. -# -def list_valued_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new - - # Call the list_valued_resources method. - result = client.list_valued_resources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb deleted file mode 100644 index b4992daa0dfc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the run_asset_discovery call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery. -# -def run_asset_discovery - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new - - # Call the run_asset_discovery method. - result = client.run_asset_discovery request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb deleted file mode 100644 index 46ec0d32e12b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the set_finding_state call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state. -# -def set_finding_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new - - # Call the set_finding_state method. - result = client.set_finding_state request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb deleted file mode 100644 index 61c6f0c2658c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the set_iam_policy call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb deleted file mode 100644 index 0d8d48794099..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_SetMute_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the set_mute call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute. -# -def set_mute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new - - # Call the set_mute method. - result = client.set_mute request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb deleted file mode 100644 index 6573cca21b08..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module. -# -def simulate_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the simulate_security_health_analytics_custom_module method. - result = client.simulate_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb deleted file mode 100644 index 2beb6f525829..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the test_iam_permissions call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb deleted file mode 100644 index 64a07908fd64..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export. -# -def update_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new - - # Call the update_big_query_export method. - result = client.update_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb deleted file mode 100644 index 20ba7f0b690c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module. -# -def update_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new - - # Call the update_event_threat_detection_custom_module method. - result = client.update_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb deleted file mode 100644 index 4ec047a6fb39..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_external_system call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system. -# -def update_external_system - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new - - # Call the update_external_system method. - result = client.update_external_system request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb deleted file mode 100644 index 39355b256e0d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_finding call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding. -# -def update_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new - - # Call the update_finding method. - result = client.update_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb deleted file mode 100644 index aa233b884d74..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config. -# -def update_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new - - # Call the update_mute_config method. - result = client.update_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb deleted file mode 100644 index f976002b3515..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config. -# -def update_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new - - # Call the update_notification_config method. - result = client.update_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb deleted file mode 100644 index a4f402013e90..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_organization_settings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings. -# -def update_organization_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new - - # Call the update_organization_settings method. - result = client.update_organization_settings request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb deleted file mode 100644 index 40a21d5efc16..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config. -# -def update_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new - - # Call the update_resource_value_config method. - result = client.update_resource_value_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb deleted file mode 100644 index 8e83edf227ea..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module. -# -def update_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the update_security_health_analytics_custom_module method. - result = client.update_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb deleted file mode 100644 index 04da82c1a94b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_security_marks call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks. -# -def update_security_marks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new - - # Call the update_security_marks method. - result = client.update_security_marks request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb deleted file mode 100644 index 6f0ba52cd6f1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source. -# -def update_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new - - # Call the update_source method. - result = client.update_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb deleted file mode 100644 index 31919bb29465..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module. -# -def validate_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new - - # Call the validate_event_threat_detection_custom_module method. - result = client.validate_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json b/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json deleted file mode 100644 index 97ec18a5449f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json +++ /dev/null @@ -1,2535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-security_center-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.securitycenter.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync", - "title": "Snippet for the bulk_mute_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings.", - "file": "security_center/bulk_mute_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_mute_findings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "BulkMuteFindings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.BulkMuteFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the create_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module.", - "file": "security_center/create_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateSource_sync", - "title": "Snippet for the create_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source.", - "file": "security_center/create_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_source", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateSource", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateFinding_sync", - "title": "Snippet for the create_finding call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding.", - "file": "security_center/create_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_finding", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateFinding", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync", - "title": "Snippet for the create_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config.", - "file": "security_center/create_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateMuteConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync", - "title": "Snippet for the create_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config.", - "file": "security_center/create_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateNotificationConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync", - "title": "Snippet for the delete_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config.", - "file": "security_center/delete_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteMuteConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync", - "title": "Snippet for the delete_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config.", - "file": "security_center/delete_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteNotificationConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module.", - "file": "security_center/delete_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSimulation_sync", - "title": "Snippet for the get_simulation call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation.", - "file": "security_center/get_simulation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_simulation", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetSimulationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Simulation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSimulation", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSimulation", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync", - "title": "Snippet for the get_valued_resource call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource.", - "file": "security_center/get_valued_resource.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_valued_resource", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ValuedResource", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetValuedResource", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetValuedResource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync", - "title": "Snippet for the get_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export.", - "file": "security_center/get_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetBigQueryExport", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy.", - "file": "security_center/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync", - "title": "Snippet for the get_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config.", - "file": "security_center/get_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetMuteConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync", - "title": "Snippet for the get_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config.", - "file": "security_center/get_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetNotificationConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync", - "title": "Snippet for the get_organization_settings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings.", - "file": "security_center/get_organization_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_organization_settings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::OrganizationSettings", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetOrganizationSettings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module.", - "file": "security_center/get_effective_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_effective_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetEffectiveSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the get_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module.", - "file": "security_center/get_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSource_sync", - "title": "Snippet for the get_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source.", - "file": "security_center/get_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_source", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSource", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GroupAssets_sync", - "title": "Snippet for the group_assets call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets.", - "file": "security_center/group_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "group_assets", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GroupAssets", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GroupAssets", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GroupFindings_sync", - "title": "Snippet for the group_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings.", - "file": "security_center/group_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "group_findings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GroupFindings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GroupFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListAssets_sync", - "title": "Snippet for the list_assets call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets.", - "file": "security_center/list_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assets", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListAssetsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListAssets", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListAssets", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules.", - "file": "security_center/list_descendant_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_descendant_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListDescendantSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListFindings_sync", - "title": "Snippet for the list_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings.", - "file": "security_center/list_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_findings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListFindings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync", - "title": "Snippet for the list_mute_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs.", - "file": "security_center/list_mute_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_mute_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListMuteConfigs", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListMuteConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync", - "title": "Snippet for the list_notification_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs.", - "file": "security_center/list_notification_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_notification_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListNotificationConfigs", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListNotificationConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules.", - "file": "security_center/list_effective_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_effective_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListEffectiveSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules.", - "file": "security_center/list_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListSources_sync", - "title": "Snippet for the list_sources call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources.", - "file": "security_center/list_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sources", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListSourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListSources", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListSources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync", - "title": "Snippet for the run_asset_discovery call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery.", - "file": "security_center/run_asset_discovery.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_asset_discovery", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "RunAssetDiscovery", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscovery", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_SetFindingState_sync", - "title": "Snippet for the set_finding_state call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state.", - "file": "security_center/set_finding_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_finding_state", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "SetFindingState", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetFindingState", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_SetMute_sync", - "title": "Snippet for the set_mute call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute.", - "file": "security_center/set_mute.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_mute", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::SetMuteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "SetMute", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetMute", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy.", - "file": "security_center/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions.", - "file": "security_center/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissions", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module.", - "file": "security_center/simulate_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "simulate_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "SimulateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SimulateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync", - "title": "Snippet for the update_external_system call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system.", - "file": "security_center/update_external_system.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_external_system", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ExternalSystem", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateExternalSystem", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateExternalSystem", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync", - "title": "Snippet for the update_finding call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding.", - "file": "security_center/update_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_finding", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateFinding", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync", - "title": "Snippet for the update_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config.", - "file": "security_center/update_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateMuteConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync", - "title": "Snippet for the update_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config.", - "file": "security_center/update_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateNotificationConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync", - "title": "Snippet for the update_organization_settings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings.", - "file": "security_center/update_organization_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_organization_settings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::OrganizationSettings", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateOrganizationSettings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the update_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module.", - "file": "security_center/update_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSource_sync", - "title": "Snippet for the update_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source.", - "file": "security_center/update_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_source", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSource", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync", - "title": "Snippet for the update_security_marks call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks.", - "file": "security_center/update_security_marks.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_marks", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityMarks", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSecurityMarks", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarks", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync", - "title": "Snippet for the create_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export.", - "file": "security_center/create_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateBigQueryExport", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync", - "title": "Snippet for the delete_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export.", - "file": "security_center/delete_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteBigQueryExport", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync", - "title": "Snippet for the update_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export.", - "file": "security_center/update_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateBigQueryExport", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync", - "title": "Snippet for the list_big_query_exports call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports.", - "file": "security_center/list_big_query_exports.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_big_query_exports", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListBigQueryExports", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListBigQueryExports", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the create_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module.", - "file": "security_center/create_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync", - "title": "Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module.", - "file": "security_center/delete_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync", - "title": "Snippet for the get_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module.", - "file": "security_center/get_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules.", - "file": "security_center/list_descendant_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_descendant_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListDescendantEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules.", - "file": "security_center/list_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the update_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module.", - "file": "security_center/update_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module.", - "file": "security_center/validate_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "validate_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ValidateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ValidateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync", - "title": "Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module.", - "file": "security_center/get_effective_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_effective_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetEffectiveEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules.", - "file": "security_center/list_effective_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_effective_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListEffectiveEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync", - "title": "Snippet for the batch_create_resource_value_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs.", - "file": "security_center/batch_create_resource_value_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_resource_value_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "BatchCreateResourceValueConfigs", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.BatchCreateResourceValueConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync", - "title": "Snippet for the delete_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config.", - "file": "security_center/delete_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteResourceValueConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync", - "title": "Snippet for the get_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config.", - "file": "security_center/get_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ResourceValueConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetResourceValueConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync", - "title": "Snippet for the list_resource_value_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs.", - "file": "security_center/list_resource_value_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_resource_value_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListResourceValueConfigs", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListResourceValueConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync", - "title": "Snippet for the update_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config.", - "file": "security_center/update_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ResourceValueConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateResourceValueConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync", - "title": "Snippet for the list_valued_resources call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources.", - "file": "security_center/list_valued_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_valued_resources", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListValuedResources", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListValuedResources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync", - "title": "Snippet for the list_attack_paths call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths.", - "file": "security_center/list_attack_paths.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_attack_paths", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListAttackPaths", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListAttackPaths", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb deleted file mode 100644 index 650ae5647c63..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycenter/v1/securitycenter_service_pb" -require "google/cloud/securitycenter/v1/securitycenter_service_services_pb" -require "google/cloud/security_center/v1/security_center" - -class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb deleted file mode 100644 index 25ac2a34d4cc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb +++ /dev/null @@ -1,487 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security_center/v1/security_center" - -class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_big_query_export_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.big_query_export_path organization: "value0", export: "value1" - assert_equal "organizations/value0/bigQueryExports/value1", path - - path = client.big_query_export_path folder: "value0", export: "value1" - assert_equal "folders/value0/bigQueryExports/value1", path - - path = client.big_query_export_path project: "value0", export: "value1" - assert_equal "projects/value0/bigQueryExports/value1", path - end - end - - def test_dlp_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dlp_job_path project: "value0", dlp_job: "value1" - assert_equal "projects/value0/dlpJobs/value1", path - - path = client.dlp_job_path project: "value0", location: "value1", dlp_job: "value2" - assert_equal "projects/value0/locations/value1/dlpJobs/value2", path - end - end - - def test_effective_event_threat_detection_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.effective_event_threat_detection_custom_module_path organization: "value0", module: "value1" - assert_equal "organizations/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path - - path = client.effective_event_threat_detection_custom_module_path folder: "value0", module: "value1" - assert_equal "folders/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path - - path = client.effective_event_threat_detection_custom_module_path project: "value0", module: "value1" - assert_equal "projects/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path - end - end - - def test_effective_security_health_analytics_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.effective_security_health_analytics_custom_module_path organization: "value0", effective_custom_module: "value1" - assert_equal "organizations/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path - - path = client.effective_security_health_analytics_custom_module_path folder: "value0", effective_custom_module: "value1" - assert_equal "folders/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path - - path = client.effective_security_health_analytics_custom_module_path project: "value0", effective_custom_module: "value1" - assert_equal "projects/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path - end - end - - def test_event_threat_detection_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.event_threat_detection_custom_module_path organization: "value0", module: "value1" - assert_equal "organizations/value0/eventThreatDetectionSettings/customModules/value1", path - - path = client.event_threat_detection_custom_module_path folder: "value0", module: "value1" - assert_equal "folders/value0/eventThreatDetectionSettings/customModules/value1", path - - path = client.event_threat_detection_custom_module_path project: "value0", module: "value1" - assert_equal "projects/value0/eventThreatDetectionSettings/customModules/value1", path - end - end - - def test_event_threat_detection_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.event_threat_detection_settings_path organization: "value0" - assert_equal "organizations/value0/eventThreatDetectionSettings", path - - path = client.event_threat_detection_settings_path folder: "value0" - assert_equal "folders/value0/eventThreatDetectionSettings", path - - path = client.event_threat_detection_settings_path project: "value0" - assert_equal "projects/value0/eventThreatDetectionSettings", path - end - end - - def test_external_system_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.external_system_path organization: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "organizations/value0/sources/value1/findings/value2/externalSystems/value3", path - - path = client.external_system_path folder: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "folders/value0/sources/value1/findings/value2/externalSystems/value3", path - - path = client.external_system_path project: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "projects/value0/sources/value1/findings/value2/externalSystems/value3", path - end - end - - def test_finding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.finding_path organization: "value0", source: "value1", finding: "value2" - assert_equal "organizations/value0/sources/value1/findings/value2", path - - path = client.finding_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2", path - - path = client.finding_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2", path - end - end - - def test_folder_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_path folder: "value0" - assert_equal "folders/value0", path - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_mute_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.mute_config_path organization: "value0", mute_config: "value1" - assert_equal "organizations/value0/muteConfigs/value1", path - - path = client.mute_config_path folder: "value0", mute_config: "value1" - assert_equal "folders/value0/muteConfigs/value1", path - - path = client.mute_config_path project: "value0", mute_config: "value1" - assert_equal "projects/value0/muteConfigs/value1", path - - path = client.mute_config_path organization: "value0", location: "value1", mute_config: "value2" - assert_equal "organizations/value0/locations/value1/muteConfigs/value2", path - - path = client.mute_config_path folder: "value0", location: "value1", mute_config: "value2" - assert_equal "folders/value0/locations/value1/muteConfigs/value2", path - - path = client.mute_config_path project: "value0", location: "value1", mute_config: "value2" - assert_equal "projects/value0/locations/value1/muteConfigs/value2", path - end - end - - def test_notification_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_config_path organization: "value0", notification_config: "value1" - assert_equal "organizations/value0/notificationConfigs/value1", path - - path = client.notification_config_path folder: "value0", notification_config: "value1" - assert_equal "folders/value0/notificationConfigs/value1", path - - path = client.notification_config_path project: "value0", notification_config: "value1" - assert_equal "projects/value0/notificationConfigs/value1", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_organization_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_settings_path organization: "value0" - assert_equal "organizations/value0/organizationSettings", path - end - end - - def test_organization_simulation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_simulation_path organization: "value0", simulation: "value1" - assert_equal "organizations/value0/simulations/value1", path - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path organization: "value0", constraint_name: "value1" - assert_equal "organizations/value0/policies/value1", path - - path = client.policy_path folder: "value0", constraint_name: "value1" - assert_equal "folders/value0/policies/value1", path - - path = client.policy_path project: "value0", constraint_name: "value1" - assert_equal "projects/value0/policies/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_resource_value_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.resource_value_config_path organization: "value0", resource_value_config: "value1" - assert_equal "organizations/value0/resourceValueConfigs/value1", path - end - end - - def test_security_health_analytics_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_health_analytics_custom_module_path organization: "value0", custom_module: "value1" - assert_equal "organizations/value0/securityHealthAnalyticsSettings/customModules/value1", path - - path = client.security_health_analytics_custom_module_path folder: "value0", custom_module: "value1" - assert_equal "folders/value0/securityHealthAnalyticsSettings/customModules/value1", path - - path = client.security_health_analytics_custom_module_path project: "value0", custom_module: "value1" - assert_equal "projects/value0/securityHealthAnalyticsSettings/customModules/value1", path - end - end - - def test_security_health_analytics_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_health_analytics_settings_path organization: "value0" - assert_equal "organizations/value0/securityHealthAnalyticsSettings", path - - path = client.security_health_analytics_settings_path folder: "value0" - assert_equal "folders/value0/securityHealthAnalyticsSettings", path - - path = client.security_health_analytics_settings_path project: "value0" - assert_equal "projects/value0/securityHealthAnalyticsSettings", path - end - end - - def test_security_marks_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_marks_path organization: "value0", asset: "value1" - assert_equal "organizations/value0/assets/value1/securityMarks", path - - path = client.security_marks_path organization: "value0", source: "value1", finding: "value2" - assert_equal "organizations/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path folder: "value0", asset: "value1" - assert_equal "folders/value0/assets/value1/securityMarks", path - - path = client.security_marks_path project: "value0", asset: "value1" - assert_equal "projects/value0/assets/value1/securityMarks", path - - path = client.security_marks_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path - end - end - - def test_simulation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.simulation_path organization: "value0", simulation: "value1" - assert_equal "organizations/value0/simulations/value1", path - end - end - - def test_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.source_path organization: "value0", source: "value1" - assert_equal "organizations/value0/sources/value1", path - - path = client.source_path folder: "value0", source: "value1" - assert_equal "folders/value0/sources/value1", path - - path = client.source_path project: "value0", source: "value1" - assert_equal "projects/value0/sources/value1", path - end - end - - def test_table_data_profile_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_data_profile_path project: "value0", table_profile: "value1" - assert_equal "projects/value0/tableProfiles/value1", path - - path = client.table_data_profile_path project: "value0", location: "value1", table_profile: "value2" - assert_equal "projects/value0/locations/value1/tableProfiles/value2", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end - - def test_valued_resource_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.valued_resource_path organization: "value0", simulation: "value1", valued_resource: "value2" - assert_equal "organizations/value0/simulations/value1/valuedResources/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb deleted file mode 100644 index d85963f8c45d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb +++ /dev/null @@ -1,3594 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/securitycenter/v1/securitycenter_service_pb" -require "google/cloud/security_center/v1/security_center/rest" - - -class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_bulk_mute_findings - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - mute_annotation = "hello world" - mute_state = :MUTE_STATE_UNSPECIFIED - - bulk_mute_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_bulk_mute_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_mute_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.bulk_mute_findings parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_mute_findings_client_stub.call_count - end - end - end - - def test_create_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - security_health_analytics_custom_module = {} - - create_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_create_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - create_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_source({ parent: parent, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_source parent: parent, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_source ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_source({ parent: parent, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_source(::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_source_client_stub.call_count - end - end - end - - def test_create_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - finding_id = "hello world" - finding = {} - - create_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_finding parent: parent, finding_id: finding_id, finding: finding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_finding ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_finding(::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_finding_client_stub.call_count - end - end - end - - def test_create_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - mute_config = {} - mute_config_id = "hello world" - - create_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_mute_config ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_mute_config(::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_mute_config_client_stub.call_count - end - end - end - - def test_create_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config_id = "hello world" - notification_config = {} - - create_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_notification_config ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_notification_config(::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_notification_config_client_stub.call_count - end - end - end - - def test_delete_mute_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_mute_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_mute_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_mute_config ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_mute_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_mute_config(::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_mute_config_client_stub.call_count - end - end - end - - def test_delete_notification_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_notification_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_notification_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_notification_config ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_notification_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_notification_config(::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_notification_config_client_stub.call_count - end - end - end - - def test_delete_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_security_health_analytics_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_security_health_analytics_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_get_simulation - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Simulation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_simulation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_simulation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_simulation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_simulation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_simulation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_simulation ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_simulation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_simulation(::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_simulation_client_stub.call_count - end - end - end - - def test_get_valued_resource - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ValuedResource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_valued_resource_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_valued_resource_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_valued_resource_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_valued_resource({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_valued_resource name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_valued_resource ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_valued_resource({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_valued_resource(::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_valued_resource_client_stub.call_count - end - end - end - - def test_get_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_big_query_export({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_big_query_export name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_big_query_export ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_big_query_export({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_big_query_export(::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_big_query_export_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_get_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_mute_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_mute_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_mute_config ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_mute_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_mute_config(::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_mute_config_client_stub.call_count - end - end - end - - def test_get_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_notification_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_notification_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_notification_config ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_notification_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_notification_config(::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_notification_config_client_stub.call_count - end - end - end - - def test_get_organization_settings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_organization_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_organization_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_organization_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_organization_settings ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_organization_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_organization_settings(::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_organization_settings_client_stub.call_count - end - end - end - - def test_get_effective_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_effective_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_effective_security_health_analytics_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_effective_security_health_analytics_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_effective_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_get_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_security_health_analytics_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_security_health_analytics_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_get_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_source ::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_source(::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_source_client_stub.call_count - end - end - end - - def test_group_assets - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - compare_duration = {} - read_time = {} - page_token = "hello world" - page_size = 42 - - group_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, group_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.group_assets ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.group_assets(::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, group_assets_client_stub.call_count - end - end - end - - def test_group_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - read_time = {} - compare_duration = {} - page_token = "hello world" - page_size = 42 - - group_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, group_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.group_findings ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.group_findings(::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, group_findings_client_stub.call_count - end - end - end - - def test_list_assets - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_assets ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_assets(::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_count - end - end - end - - def test_list_descendant_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_descendant_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_list_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_findings ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_findings(::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_count - end - end - end - - def test_list_mute_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_mute_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_mute_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_mute_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_mute_configs ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_mute_configs(::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_mute_configs_client_stub.call_count - end - end - end - - def test_list_notification_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_notification_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_notification_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_notification_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_notification_configs ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_notification_configs(::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_notification_configs_client_stub.call_count - end - end - end - - def test_list_effective_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_effective_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_list_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_list_sources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_sources ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_sources(::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sources_client_stub.call_count - end - end - end - - def test_run_asset_discovery - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - run_asset_discovery_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_run_asset_discovery_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_asset_discovery_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.run_asset_discovery({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.run_asset_discovery parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.run_asset_discovery({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_asset_discovery_client_stub.call_count - end - end - end - - def test_set_finding_state - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - state = :STATE_UNSPECIFIED - start_time = {} - - set_finding_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_finding_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_finding_state({ name: name, state: state, start_time: start_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_finding_state name: name, state: state, start_time: start_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state, start_time: start_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_finding_state(::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_finding_state_client_stub.call_count - end - end - end - - def test_set_mute - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - mute = :MUTE_UNSPECIFIED - - set_mute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_mute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_mute_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_mute({ name: name, mute: mute }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_mute name: name, mute: mute do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_mute ::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_mute({ name: name, mute: mute }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_mute(::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_mute_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_simulate_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_config = {} - resource = {} - - simulate_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_simulate_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_update_external_system - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - external_system = {} - update_mask = {} - - update_external_system_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_external_system_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_external_system_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_external_system external_system: external_system, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_external_system ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_external_system({ external_system: external_system, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_external_system(::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_external_system_client_stub.call_count - end - end - end - - def test_update_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - finding = {} - update_mask = {} - - update_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_finding({ finding: finding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_finding finding: finding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_finding ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_finding({ finding: finding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_finding(::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_finding_client_stub.call_count - end - end - end - - def test_update_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - mute_config = {} - update_mask = {} - - update_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_mute_config mute_config: mute_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_mute_config ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_mute_config(::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_mute_config_client_stub.call_count - end - end - end - - def test_update_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - notification_config = {} - update_mask = {} - - update_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_notification_config notification_config: notification_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_notification_config ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_notification_config(::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_notification_config_client_stub.call_count - end - end - end - - def test_update_organization_settings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - organization_settings = {} - update_mask = {} - - update_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_organization_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_organization_settings ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_organization_settings(::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_organization_settings_client_stub.call_count - end - end - end - - def test_update_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_health_analytics_custom_module = {} - update_mask = {} - - update_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_security_health_analytics_custom_module security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_update_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - source = {} - update_mask = {} - - update_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_source({ source: source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_source source: source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_source ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_source({ source: source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_source(::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_source_client_stub.call_count - end - end - end - - def test_update_security_marks - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - start_time = {} - - update_security_marks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_marks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_security_marks(::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_marks_client_stub.call_count - end - end - end - - def test_create_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - big_query_export = {} - big_query_export_id = "hello world" - - create_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_big_query_export ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_big_query_export(::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_big_query_export_client_stub.call_count - end - end - end - - def test_delete_big_query_export - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_big_query_export({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_big_query_export name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_big_query_export ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_big_query_export({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_big_query_export(::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_big_query_export_client_stub.call_count - end - end - end - - def test_update_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - big_query_export = {} - update_mask = {} - - update_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_big_query_export ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_big_query_export(::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_big_query_export_client_stub.call_count - end - end - end - - def test_list_big_query_exports - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_big_query_exports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_big_query_exports_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_big_query_exports_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_big_query_exports ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_big_query_exports(::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_big_query_exports_client_stub.call_count - end - end - end - - def test_create_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - event_threat_detection_custom_module = {} - - create_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_delete_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_event_threat_detection_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_event_threat_detection_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_get_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_event_threat_detection_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_event_threat_detection_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_list_descendant_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_descendant_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_descendant_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_list_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_update_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - event_threat_detection_custom_module = {} - update_mask = {} - - update_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_event_threat_detection_custom_module event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_validate_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - raw_text = "hello world" - type = "hello world" - - validate_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_validate_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, validate_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_get_effective_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_effective_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_effective_event_threat_detection_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_effective_event_threat_detection_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_effective_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_list_effective_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_effective_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_effective_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_batch_create_resource_value_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_batch_create_resource_value_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_create_resource_value_configs parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_create_resource_value_configs({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_resource_value_configs_client_stub.call_count - end - end - end - - def test_delete_resource_value_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_resource_value_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_resource_value_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_resource_value_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_resource_value_config_client_stub.call_count - end - end - end - - def test_get_resource_value_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_resource_value_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_resource_value_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_resource_value_config ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_resource_value_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_resource_value_config(::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_resource_value_config_client_stub.call_count - end - end - end - - def test_list_resource_value_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_resource_value_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_resource_value_configs_client_stub.call_count - end - end - end - - def test_update_resource_value_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource_value_config = {} - update_mask = {} - - update_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_resource_value_config ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_resource_value_config(::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_resource_value_config_client_stub.call_count - end - end - end - - def test_list_valued_resources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - - list_valued_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_valued_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_valued_resources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_valued_resources ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_valued_resources(::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_valued_resources_client_stub.call_count - end - end - end - - def test_list_attack_paths - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_attack_paths_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_attack_paths_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_attack_paths_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_attack_paths ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_attack_paths(::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_attack_paths_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb deleted file mode 100644 index f949190ff600..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb +++ /dev/null @@ -1,4053 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycenter/v1/securitycenter_service_pb" -require "google/cloud/security_center/v1/security_center" - -class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_bulk_mute_findings - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - mute_annotation = "hello world" - mute_state = :MUTE_STATE_UNSPECIFIED - - bulk_mute_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_mute_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["mute_annotation"] - assert_equal :MUTE_STATE_UNSPECIFIED, request["mute_state"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_mute_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.bulk_mute_findings parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_mute_findings_client_stub.call_rpc_count - end - end - - def test_create_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - security_health_analytics_custom_module = {} - - create_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_create_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - create_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Source), request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_source({ parent: parent, source: source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_source parent: parent, source: source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_source ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_source({ parent: parent, source: source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_source(::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_source_client_stub.call_rpc_count - end - end - - def test_create_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - finding_id = "hello world" - finding = {} - - create_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_finding, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["finding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Finding), request["finding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_finding parent: parent, finding_id: finding_id, finding: finding do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_finding ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_finding(::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_finding_client_stub.call_rpc_count - end - end - - def test_create_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - mute_config = {} - mute_config_id = "hello world" - - create_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::MuteConfig), request["mute_config"] - assert_equal "hello world", request["mute_config_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_mute_config ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_mute_config(::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_mute_config_client_stub.call_rpc_count - end - end - - def test_create_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config_id = "hello world" - notification_config = {} - - create_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::NotificationConfig), request["notification_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_notification_config ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_notification_config(::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_notification_config_client_stub.call_rpc_count - end - end - - def test_delete_mute_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_mute_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_mute_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_mute_config ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_mute_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_mute_config(::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_mute_config_client_stub.call_rpc_count - end - end - - def test_delete_notification_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_notification_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_notification_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_notification_config ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_notification_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_notification_config(::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_notification_config_client_stub.call_rpc_count - end - end - - def test_delete_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_security_health_analytics_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_security_health_analytics_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_get_simulation - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Simulation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_simulation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_simulation, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_simulation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_simulation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_simulation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_simulation ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_simulation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_simulation(::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_simulation_client_stub.call_rpc_count - end - end - - def test_get_valued_resource - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ValuedResource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_valued_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_valued_resource, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_valued_resource_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_valued_resource({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_valued_resource name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_valued_resource ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_valued_resource({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_valued_resource(::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_valued_resource_client_stub.call_rpc_count - end - end - - def test_get_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_big_query_export({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_big_query_export name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_big_query_export ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_big_query_export({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_big_query_export(::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_big_query_export_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_mute_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_mute_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_mute_config ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_mute_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_mute_config(::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_mute_config_client_stub.call_rpc_count - end - end - - def test_get_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_notification_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_notification_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_notification_config ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_notification_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_notification_config(::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_notification_config_client_stub.call_rpc_count - end - end - - def test_get_organization_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_organization_settings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_organization_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_organization_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_organization_settings ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_organization_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_organization_settings(::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_organization_settings_client_stub.call_rpc_count - end - end - - def test_get_effective_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_effective_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_effective_security_health_analytics_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_effective_security_health_analytics_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_effective_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_get_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_security_health_analytics_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_security_health_analytics_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_get_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_source ::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_source(::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_source_client_stub.call_rpc_count - end - end - - def test_group_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - compare_duration = {} - read_time = {} - page_token = "hello world" - page_size = 42 - - group_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :group_assets, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["group_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, group_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.group_assets ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.group_assets(::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, group_assets_client_stub.call_rpc_count - end - end - - def test_group_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - read_time = {} - compare_duration = {} - page_token = "hello world" - page_size = 42 - - group_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :group_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["group_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, group_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.group_findings ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.group_findings(::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, group_findings_client_stub.call_rpc_count - end - end - - def test_list_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assets, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_assets ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_assets(::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_rpc_count - end - end - - def test_list_descendant_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_descendant_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_findings ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_findings(::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_rpc_count - end - end - - def test_list_mute_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_mute_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_mute_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_mute_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_mute_configs ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_mute_configs(::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_mute_configs_client_stub.call_rpc_count - end - end - - def test_list_notification_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_notification_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_notification_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_notification_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_notification_configs ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_notification_configs(::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_notification_configs_client_stub.call_rpc_count - end - end - - def test_list_effective_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_effective_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sources, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_sources ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_sources(::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sources_client_stub.call_rpc_count - end - end - - def test_run_asset_discovery - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - run_asset_discovery_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_asset_discovery, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_asset_discovery_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.run_asset_discovery({ parent: parent }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.run_asset_discovery parent: parent do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.run_asset_discovery({ parent: parent }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_asset_discovery_client_stub.call_rpc_count - end - end - - def test_set_finding_state - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - state = :STATE_UNSPECIFIED - start_time = {} - - set_finding_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_finding_state, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, request - assert_equal "hello world", request["name"] - assert_equal :STATE_UNSPECIFIED, request["state"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_finding_state({ name: name, state: state, start_time: start_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_finding_state name: name, state: state, start_time: start_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state, start_time: start_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_finding_state(::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_finding_state_client_stub.call_rpc_count - end - end - - def test_set_mute - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - mute = :MUTE_UNSPECIFIED - - set_mute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_mute, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SetMuteRequest, request - assert_equal "hello world", request["name"] - assert_equal :MUTE_UNSPECIFIED, request["mute"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_mute_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_mute({ name: name, mute: mute }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_mute name: name, mute: mute do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_mute ::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_mute({ name: name, mute: mute }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_mute(::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_mute_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_simulate_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_config = {} - resource = {} - - simulate_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :simulate_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::CustomConfig), request["custom_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource), request["resource"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_update_external_system - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - external_system = {} - update_mask = {} - - update_external_system_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_external_system, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::ExternalSystem), request["external_system"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_external_system_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_external_system external_system: external_system, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_external_system ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_external_system({ external_system: external_system, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_external_system(::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_external_system_client_stub.call_rpc_count - end - end - - def test_update_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - finding = {} - update_mask = {} - - update_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_finding, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Finding), request["finding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_finding({ finding: finding, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_finding finding: finding, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_finding ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_finding({ finding: finding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_finding(::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_finding_client_stub.call_rpc_count - end - end - - def test_update_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - mute_config = {} - update_mask = {} - - update_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::MuteConfig), request["mute_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_mute_config mute_config: mute_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_mute_config ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_mute_config(::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_mute_config_client_stub.call_rpc_count - end - end - - def test_update_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - notification_config = {} - update_mask = {} - - update_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::NotificationConfig), request["notification_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_notification_config notification_config: notification_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_notification_config ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_notification_config(::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_notification_config_client_stub.call_rpc_count - end - end - - def test_update_organization_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - organization_settings = {} - update_mask = {} - - update_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_organization_settings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::OrganizationSettings), request["organization_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_organization_settings ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_organization_settings(::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_organization_settings_client_stub.call_rpc_count - end - end - - def test_update_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - security_health_analytics_custom_module = {} - update_mask = {} - - update_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_security_health_analytics_custom_module security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_update_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - source = {} - update_mask = {} - - update_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Source), request["source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_source({ source: source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_source source: source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_source ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_source({ source: source, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_source(::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_source_client_stub.call_rpc_count - end - end - - def test_update_security_marks - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - start_time = {} - - update_security_marks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_marks, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityMarks), request["security_marks"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_security_marks(::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_marks_client_stub.call_rpc_count - end - end - - def test_create_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - big_query_export = {} - big_query_export_id = "hello world" - - create_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::BigQueryExport), request["big_query_export"] - assert_equal "hello world", request["big_query_export_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_big_query_export ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_big_query_export(::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_big_query_export_client_stub.call_rpc_count - end - end - - def test_delete_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_big_query_export({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_big_query_export name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_big_query_export ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_big_query_export({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_big_query_export(::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_big_query_export_client_stub.call_rpc_count - end - end - - def test_update_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - big_query_export = {} - update_mask = {} - - update_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::BigQueryExport), request["big_query_export"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_big_query_export ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_big_query_export(::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_big_query_export_client_stub.call_rpc_count - end - end - - def test_list_big_query_exports - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_big_query_exports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_big_query_exports, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_big_query_exports_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_big_query_exports ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_big_query_exports(::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_big_query_exports_client_stub.call_rpc_count - end - end - - def test_create_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - event_threat_detection_custom_module = {} - - create_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_delete_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_event_threat_detection_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_event_threat_detection_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_get_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_event_threat_detection_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_event_threat_detection_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_list_descendant_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_descendant_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_descendant_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_update_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - event_threat_detection_custom_module = {} - update_mask = {} - - update_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_event_threat_detection_custom_module event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_validate_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - raw_text = "hello world" - type = "hello world" - - validate_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :validate_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["raw_text"] - assert_equal "hello world", request["type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, validate_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_get_effective_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_effective_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_effective_event_threat_detection_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_effective_event_threat_detection_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_effective_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_list_effective_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_effective_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_effective_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_batch_create_resource_value_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_resource_value_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_resource_value_configs parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_resource_value_configs({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_resource_value_configs_client_stub.call_rpc_count - end - end - - def test_delete_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_resource_value_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_resource_value_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_resource_value_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_resource_value_config_client_stub.call_rpc_count - end - end - - def test_get_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_resource_value_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_resource_value_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_resource_value_config ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_resource_value_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_resource_value_config(::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_resource_value_config_client_stub.call_rpc_count - end - end - - def test_list_resource_value_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_resource_value_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_resource_value_configs_client_stub.call_rpc_count - end - end - - def test_update_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource_value_config = {} - update_mask = {} - - update_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig), request["resource_value_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_resource_value_config ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_resource_value_config(::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_resource_value_config_client_stub.call_rpc_count - end - end - - def test_list_valued_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - - list_valued_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_valued_resources, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_valued_resources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_valued_resources ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_valued_resources(::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_valued_resources_client_stub.call_rpc_count - end - end - - def test_list_attack_paths - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_attack_paths_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_attack_paths, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_attack_paths_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_attack_paths ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_attack_paths(::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_attack_paths_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"